Rattache les anciennes tables au suivi Alembic
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
This commit is contained in:
parent
092e4cc8ff
commit
26979b2927
1 changed files with 5 additions and 0 deletions
|
|
@ -14,6 +14,11 @@ depends_on = None
|
|||
|
||||
|
||||
def upgrade():
|
||||
inspector = sa.inspect(op.get_bind())
|
||||
if "audit_logs" in inspector.get_table_names():
|
||||
# Compatibilité avec les installations où l'ancien create_all avait
|
||||
# déjà créé la table avant la prise en charge complète par Alembic.
|
||||
return
|
||||
op.create_table(
|
||||
"audit_logs",
|
||||
sa.Column("id", sa.BigInteger(), autoincrement=True, nullable=False),
|
||||
|
|
|
|||
Loading…
Reference in a new issue