gate2: fix ix_contacts_tenant_id duplicate (index=True in 0021 vs create_index in 0002)
This commit is contained in:
@@ -66,7 +66,7 @@ def upgrade() -> None:
|
|||||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.func.now()),
|
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()),
|
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.execute("CREATE INDEX IF NOT EXISTS ix_contacts_tenant_id ON contacts (tenant_id)")
|
||||||
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_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_tenant_name ON contacts (tenant_id, last_name, first_name)")
|
||||||
op.execute("CREATE INDEX IF NOT EXISTS ix_contacts_email ON contacts (email)")
|
op.execute("CREATE INDEX IF NOT EXISTS ix_contacts_email ON contacts (email)")
|
||||||
|
|||||||
Reference in New Issue
Block a user