33 lines
1.0 KiB
Python
33 lines
1.0 KiB
Python
"""Initial migrationA
|
|
|
|
Revision ID: 61aeb99662ba
|
|
Revises: f8f3f414b162
|
|
Create Date: 2025-02-06 20:37:40.995282
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '61aeb99662ba'
|
|
down_revision: Union[str, None] = 'f8f3f414b162'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint('mailing_options_option_id_fkey', 'mailing_options', type_='foreignkey')
|
|
op.create_foreign_key(None, 'mailing_options', 'mailing_delivery_methods', ['option_id'], ['id'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'mailing_options', type_='foreignkey')
|
|
op.create_foreign_key('mailing_options_option_id_fkey', 'mailing_options', 'patients', ['option_id'], ['id'])
|
|
# ### end Alembic commands ###
|