gate2: fix duplicate column/index in migrations for fresh DB installation
This commit is contained in:
@@ -67,9 +67,9 @@ def upgrade() -> None:
|
||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.func.now()),
|
||||
)
|
||||
op.create_index("ix_contacts_tenant_id", "contacts", ["tenant_id"])
|
||||
op.create_index("ix_contacts_tenant_deleted", "contacts", ["tenant_id", "deleted_at"])
|
||||
op.create_index("ix_contacts_tenant_name", "contacts", ["tenant_id", "last_name", "first_name"])
|
||||
op.create_index("ix_contacts_email", "contacts", ["email"])
|
||||
op.execute("CREATE INDEX IF NOT EXISTS ix_contacts_tenant_deleted ON contacts (tenant_id, deleted_at)")
|
||||
op.execute("CREATE INDEX IF NOT EXISTS ix_contacts_tenant_name ON contacts (tenant_id, last_name, first_name)")
|
||||
op.execute("CREATE INDEX IF NOT EXISTS ix_contacts_email ON contacts (email)")
|
||||
|
||||
# --- company_contacts (N:M join) ---
|
||||
op.create_table(
|
||||
|
||||
Reference in New Issue
Block a user