views:

26

answers:

0

I've got a table with five columns, one of which is the primary key. This primary key is using a non-standard name, like nearly all tables in that database. I've added a migration to rename the other four columns in that table. The problem is after running that migration, the primary key constraint is gone! I've done that renaming thing for a many other tables in that database and never had that problem. Does someone have an explanation for such a behavior?

Update: By the way, I'm using SQLite as the backend.

Update: Looking at the log, the problem shows off right at the beginning while creating a temporary table with the altered_ prefix. Ended up using change_column to get the primary key back.