Browse Source
* Run migrations * Infer lettype * Rename org_type column * Change misssed org_type * Change domain variable name to org_type * Humanise the variable name"pull/130/head
kosiakkatrina
3 years ago
committed by
GitHub
15 changed files with 88 additions and 42 deletions
@ -0,0 +1,19 @@
|
||||
class ChangeLettypeDerivedField < ActiveRecord::Migration[6.1] |
||||
def up |
||||
change_table :case_logs, bulk: true do |t| |
||||
t.remove :needs_type |
||||
t.column :needstype, :integer |
||||
t.remove :lettype |
||||
t.column :lettype, :integer |
||||
end |
||||
end |
||||
|
||||
def down |
||||
change_table :case_logs, bulk: true do |t| |
||||
t.column :needs_type, :string |
||||
t.remove :needstype |
||||
t.remove :lettype |
||||
t.column :lettype, :string |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class RenameOrgType < ActiveRecord::Migration[6.1] |
||||
def change |
||||
rename_column :organisations, :org_type, :providertype |
||||
end |
||||
end |
Loading…
Reference in new issue