Add new fields to signature

- Add :date_of_birth and :postal_code to Signature to allow send these
  fields to CustomCensusAPI

- Add new model presence validates: Only validate :date_of_birth and
  :postal_code presence when the application has configured Remote Census
  and their alias fields has values.
This commit is contained in:
taitus
2019-05-14 11:12:29 +02:00
committed by Javi Martín
parent 837c45599d
commit 5d68e1a43d
5 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class AddDateOfBirthToSignatures < ActiveRecord::Migration
def change
add_column :signatures, :date_of_birth, :date
end
end

View File

@@ -0,0 +1,5 @@
class AddPostalCodeToSignatures < ActiveRecord::Migration
def change
add_column :signatures, :postal_code, :string
end
end

View File

@@ -1476,6 +1476,8 @@ ActiveRecord::Schema.define(version: 20190607160900) do
t.boolean "verified", default: false
t.datetime "created_at"
t.datetime "updated_at"
t.date "date_of_birth"
t.string "postal_code"
end
create_table "site_customization_content_blocks", force: :cascade do |t|