34 lines
967 B
Python
34 lines
967 B
Python
"""appointment relation table
|
|
|
|
Revision ID: a3a9b7d17bdd
|
|
Revises: 827c736d4aeb
|
|
Create Date: 2025-05-13 11:09:24.512689
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = 'a3a9b7d17bdd'
|
|
down_revision: Union[str, None] = '827c736d4aeb'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
op.add_column('clinic_doctors', sa.Column('clinic_id', sa.Integer(), nullable=True))
|
|
op.create_foreign_key(None, 'clinic_doctors', 'clinics', ['clinic_id'], ['id'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'clinic_doctors', type_='foreignkey')
|
|
op.drop_column('clinic_doctors', 'clinic_id')
|
|
# ### end Alembic commands ###
|