mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Rails upgrade changed behavior of column/table renames
This commit is contained in:
parent
ff4bbf51d2
commit
8772643e63
2 changed files with 0 additions and 11 deletions
|
@ -1,9 +0,0 @@
|
|||
class RenameStaffActionPk < ActiveRecord::Migration
|
||||
def up
|
||||
execute "ALTER INDEX admin_logs_pkey RENAME TO staff_action_logs_pkey"
|
||||
end
|
||||
|
||||
def down
|
||||
execute "ALTER INDEX staff_action_logs_pkey RENAME TO admin_logs_pkey"
|
||||
end
|
||||
end
|
|
@ -3,7 +3,6 @@ class RenameStaffActionLogsToUserHistory < ActiveRecord::Migration
|
|||
remove_index :staff_action_logs, [:staff_user_id, :id]
|
||||
rename_table :staff_action_logs, :user_histories
|
||||
rename_column :user_histories, :staff_user_id, :acting_user_id
|
||||
execute "ALTER INDEX staff_action_logs_pkey RENAME TO user_histories_pkey"
|
||||
add_index :user_histories, [:acting_user_id, :action, :id]
|
||||
end
|
||||
|
||||
|
@ -11,7 +10,6 @@ class RenameStaffActionLogsToUserHistory < ActiveRecord::Migration
|
|||
remove_index :user_histories, [:acting_user_id, :action, :id]
|
||||
rename_table :user_histories, :staff_action_logs
|
||||
rename_column :staff_action_logs, :acting_user_id, :staff_user_id
|
||||
execute "ALTER INDEX user_histories_pkey RENAME TO staff_action_logs_pkey"
|
||||
add_index :staff_action_logs, [:staff_user_id, :id]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue