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
1111from sqlalchemy .dialects import postgresql
1212
1313# revision identifiers, used by Alembic.
14- revision = "7334713b30a6 "
14+ revision = "de396670d10f "
1515down_revision = "312568866ac4"
1616branch_labels = None
1717depends_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
5357def 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