"""Phase 13.4 — Patient Portal."""
from alembic import op
from app.core.database import Base
import app.models  # noqa: F401

revision = "0005_phase_134_patient_portal"
down_revision = "0004_phase_133_clinic_management"
branch_labels = None
depends_on = None


def upgrade():
    bind = op.get_bind()
    Base.metadata.create_all(bind=bind)


def downgrade():
    for table in (
        "patient_notification_preferences",
        "patient_document_refs",
        "patient_portal_profiles",
    ):
        op.drop_table(table)
