gate2: fix all migrations for fresh DB installation
This commit is contained in:
@@ -34,7 +34,7 @@ def upgrade() -> None:
|
||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.func.now()),
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.func.now()),
|
||||
)
|
||||
op.create_index("ix_plugins_name", "plugins", ["name"], unique=True)
|
||||
op.execute('CREATE INDEX IF NOT EXISTS ix_plugins_name ON plugins (name)')
|
||||
|
||||
# --- plugin_migrations table (tracks which migrations have been applied) ---
|
||||
op.create_table(
|
||||
@@ -47,7 +47,7 @@ def upgrade() -> None:
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.func.now()),
|
||||
sa.UniqueConstraint("plugin_name", "migration_file", name="ix_plugin_migrations_unique"),
|
||||
)
|
||||
op.create_index("ix_plugin_migrations_plugin", "plugin_migrations", ["plugin_name"])
|
||||
op.execute('CREATE INDEX IF NOT EXISTS ix_plugin_migrations_plugin ON plugin_migrations (plugin_name)')
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
|
||||
Reference in New Issue
Block a user