-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Hi,
My app has a very large table (lets call it articles) and another slightly smaller table called comments. I added a migration to rename the comments table to messages and was very surprised to see our app blow up when the migration started hanging. After some research it appeared that a constraint was being removed and re-added here. I understand the constraint is being removed and re-added because it cannot be renamed in all cases, but I would expect there to be some way to disable this. Since the following migration:
def change
rename_table :comments, :messages
endAppears to have no side affects. Changing the name of the constraints isn't a necessity so it would be nice to turn this off.
Also, in PostgreSQL versions later than 9.2, it's possible to rename a constraint:
alter table messages rename constraint fk_comments_article_id to fk_messages_article_idIs it possible to have a configuration option to enable constraint renaming or at the very least, disable removing and re-creating these constraints?