Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequence owner #35

Open
tekin opened this issue Sep 23, 2011 · 1 comment
Open

sequence owner #35

tekin opened this issue Sep 23, 2011 · 1 comment

Comments

@tekin
Copy link

tekin commented Sep 23, 2011

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.

@paazmaya
Copy link
Contributor

Possibly related to #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants