Skip to content

Commit 7a07b2c

Browse files
fix: alembic migrations (#342)
1 parent 8de9a79 commit 7a07b2c

File tree

2 files changed

+16
-136
lines changed

2 files changed

+16
-136
lines changed

alembic/versions/150ac8a20e59_change_schema.py

Lines changed: 0 additions & 126 deletions
This file was deleted.

alembic/versions/7334713b30a6_add_integration_sharepoint_property_sync.py renamed to alembic/versions/de396670d10f_adds_sharepoint_property_sync_table.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""add integration sharepoint property sync
1+
"""adds sharepoint_property_sync table
22
3-
Revision ID: 7334713b30a6
4-
Revises: 6868ac66ea92
5-
Create Date: 2025-07-29 12:31:04.171629
3+
Revision ID: de396670d10f
4+
Revises: 312568866ac4
5+
Create Date: 2025-09-04 16:53:25.748371
66
77
"""
88

@@ -11,7 +11,7 @@
1111
from sqlalchemy.dialects import postgresql
1212

1313
# revision identifiers, used by Alembic.
14-
revision = "7334713b30a6"
14+
revision = "de396670d10f"
1515
down_revision = "312568866ac4"
1616
branch_labels = None
1717
depends_on = None
@@ -34,31 +34,37 @@ def upgrade():
3434
["integration_id"], ["cognition.integration.id"], ondelete="CASCADE"
3535
),
3636
sa.PrimaryKeyConstraint("id"),
37+
sa.UniqueConstraint("integration_id"),
38+
schema="integration",
3739
)
3840
op.create_index(
39-
op.f("ix_sharepoint_property_sync_created_by"),
41+
op.f("ix_integration_sharepoint_property_sync_created_by"),
4042
"sharepoint_property_sync",
4143
["created_by"],
4244
unique=False,
45+
schema="integration",
4346
)
4447
op.create_index(
45-
op.f("ix_sharepoint_property_sync_integration_id"),
48+
op.f("ix_integration_sharepoint_property_sync_integration_id"),
4649
"sharepoint_property_sync",
4750
["integration_id"],
4851
unique=False,
52+
schema="integration",
4953
)
5054
# ### end Alembic commands ###
5155

5256

5357
def downgrade():
5458
# ### commands auto generated by Alembic - please adjust! ###
5559
op.drop_index(
56-
op.f("ix_sharepoint_property_sync_integration_id"),
60+
op.f("ix_integration_sharepoint_property_sync_integration_id"),
5761
table_name="sharepoint_property_sync",
62+
schema="integration",
5863
)
5964
op.drop_index(
60-
op.f("ix_sharepoint_property_sync_created_by"),
65+
op.f("ix_integration_sharepoint_property_sync_created_by"),
6166
table_name="sharepoint_property_sync",
67+
schema="integration",
6268
)
63-
op.drop_table("sharepoint_property_sync")
69+
op.drop_table("sharepoint_property_sync", schema="integration")
6470
# ### end Alembic commands ###

0 commit comments

Comments
 (0)