Alembic's `--autogenerate` tries to remove primary key
See original GitHub issueI.e. I see the following in the log:
INFO [alembic.autogenerate.compare] Detected removed index 'primary' on 'users'
And the following operations in generated upgrade script:
op.drop_index('primary', table_name='users')
I think the list of indexes that cockroachdb (the server or python bindings) generates is somehow different from the one of postgres, but I haven’t compared them directly.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Alembic's --autogenerate tries to remove primary key #42
I.e. I see the following in the log: INFO [alembic.autogenerate.compare] Detected removed index 'primary' on 'users' And the following ...
Read more >alembic autogenerate after primary key rename failing
It looks like alembic is trying to recreate all of the migrations when trying to autogenerate. Or at least the table creation. Am...
Read more >Auto Generating Migrations — Alembic 1.9.1 documentation
Autogenerate can't currently, but will eventually detect: Some free-standing constraint additions and removals may not be supported, including PRIMARY KEY, ...
Read more >alembic problem creating "base" revision on brand new schema
It drops keys that exist, and then tries recreates them under a different (and incorrect) name. But when I try to apply (via...
Read more >Defining Constraints and Indexes
The referenced columns almost always define the primary key for their owning ... the system will therefore attempt to emit DROP for only...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there any update on this issue? This is making automatic migration generation impossible to use as our model count grows.
Awesome, thanks for digging into the issue!