From 05fc50006dc25fb0a6e4fcdc7a13412090cd273b Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 1 Aug 2013 11:57:06 -0400 Subject: [PATCH] Rename the PK index to support table rename --- db/migrate/20130801155107_rename_staff_action_pk.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130801155107_rename_staff_action_pk.rb diff --git a/db/migrate/20130801155107_rename_staff_action_pk.rb b/db/migrate/20130801155107_rename_staff_action_pk.rb new file mode 100644 index 00000000000..8631731b3b4 --- /dev/null +++ b/db/migrate/20130801155107_rename_staff_action_pk.rb @@ -0,0 +1,9 @@ +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