question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alembic's `--autogenerate` tries to remove primary key

See original GitHub issue

I.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:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
MSealcommented, Sep 16, 2020

Is there any update on this issue? This is making automatic migration generation impossible to use as our model count grows.

1reaction
MSealcommented, Sep 24, 2020

Awesome, thanks for digging into the issue!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found