Hello, I am new to alembic and expect this to have a simple solution, but with my limited knowledge I can't find it. I have a database, genereted from scratch with sqlalchemy in postgresql. After that I wanted to try the alembic autogenerate tool. I initialize in env.py with exactly the same schema with that the database was just created. Now I get:
jbr@AIRA-207:~/code/database$ alembic -c alembic/alembic.local.ini revision --autogenerate -m "Startup state" INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. /usr/local/lib64/python3.8/site-packages/sqlalchemy/sql/ddl.py:1211: SAWarning: Cannot correctly sort tables; there are unresolvable cycles between tables "application.products, application.versions", which is usually caused by mutually dependent foreign key constraints. Foreign key constraints involving these tables will not be considered; this warning may raise an error in a future release. util.warn( INFO [alembic.autogenerate.compare] Detected added table 'application.customers' INFO [alembic.autogenerate.compare] Detected added table 'application.documents' [...] And so on. All the "added table" do already exist. An "upgrade" of cours fails with a lot of SQL errors, telling me exactly that, that those tables are already existing. Can you give me a pointer at what I am missing? Thanks. -- You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alembic+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy-alembic/2c6d35c2-378e-4f0b-9456-695da3eedfabn%40googlegroups.com.