mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Remove the organisation_to_service table.
This table is no longer used or referenced in the code. We can remove this mapping table now that the organisation to service relationship is handled by the foreign key in Services.
This commit is contained in:
29
migrations/versions/0304_remove_org_to_service.py
Normal file
29
migrations/versions/0304_remove_org_to_service.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0304_remove_org_to_service
|
||||
Revises: 0303_populate_services_org_id
|
||||
Create Date: 2019-08-15 14:49:00.754390
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
revision = '0304_remove_org_to_service'
|
||||
down_revision = '0303_populate_services_org_id'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_table('organisation_to_service')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.create_table('organisation_to_service',
|
||||
sa.Column('service_id', postgresql.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('organisation_id', postgresql.UUID(), autoincrement=False, nullable=False),
|
||||
sa.ForeignKeyConstraint(['organisation_id'], ['organisation.id'],
|
||||
name='organisation_to_service_organisation_id_fkey'),
|
||||
sa.ForeignKeyConstraint(['service_id'], ['services.id'],
|
||||
name='organisation_to_service_service_id_fkey'),
|
||||
sa.PrimaryKeyConstraint('service_id', name='organisation_to_service_pkey')
|
||||
)
|
||||
Reference in New Issue
Block a user