3 changed files with 33 additions and 2 deletions
@ -0,0 +1,12 @@ |
|||||||
|
class PersistUserAndOrganisationInfoOnDataProtectionConfirmation < ActiveRecord::Migration[7.0] |
||||||
|
def change |
||||||
|
change_table :data_protection_confirmations, bulk: true do |t| |
||||||
|
t.column :signed_at, :datetime |
||||||
|
t.column :organisation_name, :string |
||||||
|
t.column :organisation_address, :string |
||||||
|
t.column :organisation_phone_number, :string |
||||||
|
t.column :data_protection_officer_email, :string |
||||||
|
t.column :data_protection_officer_name, :string |
||||||
|
end |
||||||
|
end |
||||||
|
end |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
class RemoveDataProtectionConfirmationUniqueIndex < ActiveRecord::Migration[7.0] |
||||||
|
def up |
||||||
|
remove_index :data_protection_confirmations, |
||||||
|
%i[organisation_id data_protection_officer_id confirmed], |
||||||
|
unique: true |
||||||
|
end |
||||||
|
|
||||||
|
def down |
||||||
|
add_index :data_protection_confirmations, |
||||||
|
%i[organisation_id data_protection_officer_id confirmed], |
||||||
|
unique: true, |
||||||
|
name: "data_protection_confirmations_unique" |
||||||
|
end |
||||||
|
end |
||||||
Loading…
Reference in new issue