12 changed files with 80 additions and 28 deletions
@ -0,0 +1,11 @@ |
|||||||
|
class FurtherCoreMigrations < ActiveRecord::Migration[6.1] |
||||||
|
def up |
||||||
|
remove_column :case_logs, :condition_effects_prefer_not_to_say |
||||||
|
rename_column :case_logs, :reason_for_leaving_last_settled_home, :reason |
||||||
|
end |
||||||
|
|
||||||
|
def down |
||||||
|
add_column :case_logs, :condition_effects_prefer_not_to_say, :integer |
||||||
|
rename_column :case_logs, :reason, :reason_for_leaving_last_settled_home |
||||||
|
end |
||||||
|
end |
@ -1,13 +0,0 @@ |
|||||||
class RemainingCoreMigrations < ActiveRecord::Migration[6.1] |
|
||||||
def up |
|
||||||
change_table :case_logs, bulk: true do |_t| |
|
||||||
remove_column :case_logs, :condition_effects_prefer_not_to_say |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
def down |
|
||||||
change_table :case_logs, bulk: true do |_t| |
|
||||||
add_column :case_logs, :condition_effects_prefer_not_to_say, :integer |
|
||||||
end |
|
||||||
end |
|
||||||
end |
|
@ -0,0 +1,13 @@ |
|||||||
|
class ChangeReasonType < ActiveRecord::Migration[6.1] |
||||||
|
def up |
||||||
|
change_table :case_logs, bulk: true do |t| |
||||||
|
t.change :reason, "integer USING reason::integer" |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
def down |
||||||
|
change_table :case_logs, bulk: true do |t| |
||||||
|
t.change :reason, :string |
||||||
|
end |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue