magicmilo
3 years ago
4 changed files with 7 additions and 34 deletions
@ -1,12 +1,13 @@ |
|||||||
class AddPropertyInfoFields < ActiveRecord::Migration[6.1] |
class AddPropertyInfoFields < ActiveRecord::Migration[6.1] |
||||||
def change |
def change |
||||||
change_table :case_logs, bulk: true do |t| |
change_table :case_logs, bulk: true do |t| |
||||||
t.column :do_you_know_the_postcode, :integer |
t.column :do_you_know_the_postcode, :string |
||||||
t.column :do_you_know_the_local_authority, :integer |
t.column :do_you_know_the_local_authority, :string |
||||||
t.column :why_dont_you_know_la, :string |
t.column :why_dont_you_know_la, :string |
||||||
t.column :first_time_property_let_as_social_housing, :integer |
t.column :first_time_property_let_as_social_housing, :string |
||||||
t.column :type_property_most_recently_let_as, :integer |
t.column :type_property_most_recently_let_as, :string |
||||||
t.column :builtype, :integer |
t.column :builtype, :string |
||||||
|
t.rename :tenant_same_property_renewal, :renewal |
||||||
end |
end |
||||||
end |
end |
||||||
end |
end |
||||||
|
@ -1,7 +0,0 @@ |
|||||||
class ChangeRenewal < ActiveRecord::Migration[6.1] |
|
||||||
def change |
|
||||||
rename_column :case_logs, :tenant_same_property_renewal, :renewal |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@ |
|||||||
class ChangeColumnTypes < ActiveRecord::Migration[6.1] |
|
||||||
def up |
|
||||||
change_table :case_logs, bulk: true do |t| |
|
||||||
t.change :first_time_property_let_as_social_housing, :string |
|
||||||
t.change :type_property_most_recently_let_as, :string |
|
||||||
t.change :builtype, :string |
|
||||||
t.change :do_you_know_the_local_authority, :string |
|
||||||
t.change :do_you_know_the_postcode, :string |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
def down |
|
||||||
change_table :case_logs, bulk: true do |t| |
|
||||||
t.change :first_time_property_let_as_social_housing, :int |
|
||||||
t.change :type_property_most_recently_let_as, :int |
|
||||||
t.change :builtype, :int |
|
||||||
t.change :do_you_know_the_local_authority, :int |
|
||||||
t.change :do_you_know_the_postcode, :int |
|
||||||
end |
|
||||||
end |
|
||||||
end |
|
Loading…
Reference in new issue