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

Fix migration init from scratch #169

Closed
raphaelrpl opened this issue Aug 11, 2022 · 0 comments
Closed

Fix migration init from scratch #169

raphaelrpl opened this issue Aug 11, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@raphaelrpl
Copy link
Contributor

I've been facing issues while generating migrations from scratch database. It seems like the alembic is executing wrong order.

INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 03d259000eac, create-initial-tables
INFO [alembic.runtime.migration] Running upgrade 03d259000eac -> e8b12ba52665, create classes view.
INFO [alembic.runtime.migration] Running upgrade e8b12ba52665 -> d3db4a1a7f75, add_index
INFO [alembic.runtime.migration] Running upgrade d3db4a1a7f75 -> 237031a776fb, revision-0_6
INFO [alembic.runtime.migration] Running upgrade 237031a776fb -> 91c0103d0284, add_unique_in_class
INFO [alembic.runtime.migration] Running upgrade 03d259000eac -> 432e3447c36b, v0.4.0
INFO [alembic.runtime.migration] Running upgrade 432e3447c36b -> 02d16d3da520, 0.4.1
INFO [alembic.runtime.migration] Running upgrade 02d16d3da520 -> f3f27ad116d2, timeline
INFO [alembic.runtime.migration] Running upgrade f3f27ad116d2 -> be5ae740887a, v0.6.0
INFO [alembic.runtime.migration] Running upgrade be5ae740887a -> 566a05da999d, edit enums
INFO [alembic.runtime.migration] Running upgrade 91c0103d0284 -> 803fd73df983, rename_system_table.
INFO [alembic.runtime.migration] Running upgrade 803fd73df983 -> 83db828c55ad, system_lineage.
INFO [alembic.runtime.migration] Running upgrade 83db828c55ad -> 561ebe6266ad, internationalization
INFO [alembic.runtime.migration] Running upgrade 566a05da999d -> c68b17b1860b, v0.8.0.
File "/home/user/bdc-catalog/venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "lccs.class_systems" does not exist

We should review c68b17b1860b_v0_8_0.py and add way to walkthrough.

@raphaelrpl raphaelrpl added the bug Something isn't working label Aug 11, 2022
@raphaelrpl raphaelrpl added this to the Version 1.0.0-alpha2 milestone Aug 11, 2022
@raphaelrpl raphaelrpl self-assigned this Aug 11, 2022
raphaelrpl added a commit that referenced this issue Aug 24, 2022
WIP: 🐛 Fix migration init (close #169)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant