You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
suspect that something is lost in translation with regard to primary keys/sequences during the migration.
I've been battling with a strange bug on rails 3.1 where running db:schema:dump was dumping the tables without the "id" primary key specified, e.g.
create_table "activities", :force => true do |t|
was becoming:
create_table "activities", :id => false, :force => true do |t|
This was only happening for tables that were created prior to the migration, so I suspected something was missing in the schema structure and tracked it down to missing owners on the ID sequences - tables added after the migration from mysql had the owner set when I dumped the schema manually, e.g:
ALTER SEQUENCE "accounts_id_seq" OWNED BY "accounts"."id";
Those that were ported from MySQL did not.
The text was updated successfully, but these errors were encountered:
suspect that something is lost in translation with regard to primary keys/sequences during the migration.
I've been battling with a strange bug on rails 3.1 where running db:schema:dump was dumping the tables without the "id" primary key specified, e.g.
create_table "activities", :force => true do |t|
was becoming:
create_table "activities", :id => false, :force => true do |t|
This was only happening for tables that were created prior to the migration, so I suspected something was missing in the schema structure and tracked it down to missing owners on the ID sequences - tables added after the migration from mysql had the owner set when I dumped the schema manually, e.g:
ALTER SEQUENCE "accounts_id_seq" OWNED BY "accounts"."id";
Those that were ported from MySQL did not.
The text was updated successfully, but these errors were encountered: