You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial migration is looking great, and postgresql nulls not distinct works.
But when I rerun autogenerate it always detect the same change.
alembic revision --autogenerate -m "test"
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.ddl.postgresql] Detected sequence named 'dummy_id_seq' as owned by integer column 'dummy(id)', assuming SERIAL and omitting
INFO [alembic.autogenerate.compare] Detected changed unique constraint 'dummy_a_b_tomb_date_key' on 'dummy': expression ('UNIQUE_CONSTRAINT', 'a', 'b', 'tomb_date') to ('UNIQUE_CONSTRAINT', 'a', 'b', 'tomb_date', ('nulls_not_distinct', True))
Generating ... /alembic/versions/733f639ec673_test.py ... done
It generates a new migration file every time with the same content
"""testRevision ID: 733f639ec673Revises: a96502e5e7d3Create Date: 2023-08-08 17:29:31.612196"""fromtypingimportSequence, Unionfromalembicimportopimportsqlalchemyassa# revision identifiers, used by Alembic.revision: str='733f639ec673'down_revision: Union[str, None] ='a96502e5e7d3'branch_labels: Union[str, Sequence[str], None] =Nonedepends_on: Union[str, Sequence[str], None] =Nonedefupgrade() ->None:
# ### commands auto generated by Alembic - please adjust! ###op.drop_constraint('dummy_a_b_tomb_date_key', 'dummy', type_='unique')
op.create_unique_constraint('dummy_a_b_tomb_date_key', 'dummy', ['a', 'b', 'tomb_date'], postgresql_nulls_not_distinct=True)
# ### end Alembic commands ###defdowngrade() ->None:
# ### commands auto generated by Alembic - please adjust! ###op.drop_constraint('dummy_a_b_tomb_date_key', 'dummy', type_='unique')
op.create_unique_constraint('dummy_a_b_tomb_date_key', 'dummy', ['a', 'b', 'tomb_date'])
# ### end Alembic commands ###
We have updated to alembic
1.10.4
and we see some changes are always detected and not expected, everytime we generate a new migration.-- requirements.txt
-- models.py
Initial migration is looking great, and postgresql nulls not distinct works.
But when I rerun autogenerate it always detect the same change.
It generates a new migration file every time with the same content
Originally posted by @cedric-roussel in #1288 (comment)
The text was updated successfully, but these errors were encountered: