"""initial Revision ID: 8282d5b2badc Revises: Create Date: 2023-07-21 22:53:46.768440 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '8282d5b2badc' down_revision = None branch_labels = None depends_on = None def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.create_table('medical_cards', sa.Column('number', sa.String(length=100), nullable=False), sa.Column('confidant_persons', postgresql.ARRAY(sa.UUID()), nullable=True), sa.Column('id', sa.UUID(), nullable=False), sa.Column('created_at', sa.TIMESTAMP(), nullable=False), sa.Column('updated_at', sa.TIMESTAMP(), nullable=False), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_medical_cards_id'), 'medical_cards', ['id'], unique=False) op.create_table('checkups', sa.Column('medical_card_id', sa.UUID(), nullable=False), sa.Column('medic_id', sa.UUID(), nullable=True), sa.Column('claims', postgresql.ARRAY(sa.String()), nullable=True), sa.Column('allergies', postgresql.ARRAY(sa.String()), nullable=True), sa.Column('diseases', postgresql.ARRAY(sa.String()), nullable=True), sa.Column('medicines', postgresql.ARRAY(sa.String()), nullable=True), sa.Column('disease_process', sa.Text(), nullable=True), sa.Column('visual_inspection', postgresql.ARRAY(sa.String()), nullable=True), sa.Column('dental_formula', postgresql.JSONB(astext_type=sa.Text()), nullable=True), sa.Column('dental_formula_ext', postgresql.JSONB(astext_type=sa.Text()), nullable=True), sa.Column('id', sa.UUID(), nullable=False), sa.Column('created_at', sa.TIMESTAMP(), nullable=False), sa.Column('updated_at', sa.TIMESTAMP(), nullable=False), sa.ForeignKeyConstraint(['medical_card_id'], ['medical_cards.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_checkups_id'), 'checkups', ['id'], unique=False) op.create_table('health_maps', sa.Column('comment', sa.Text(), nullable=True), sa.Column('attachments', postgresql.ARRAY(sa.String()), nullable=True), sa.Column('medical_card_id', sa.UUID(), nullable=False), sa.Column('id', sa.UUID(), nullable=False), sa.Column('created_at', sa.TIMESTAMP(), nullable=False), sa.Column('updated_at', sa.TIMESTAMP(), nullable=False), sa.ForeignKeyConstraint(['medical_card_id'], ['medical_cards.id'], ), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('ix_health_maps_id'), 'health_maps', ['id'], unique=False) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_health_maps_id'), table_name='health_maps') op.drop_table('health_maps') op.drop_index(op.f('ix_checkups_id'), table_name='checkups') op.drop_table('checkups') op.drop_index(op.f('ix_medical_cards_id'), table_name='medical_cards') op.drop_table('medical_cards') # ### end Alembic commands ###