"""Add legal documents table

Revision ID: 7f9d151f5ad2
Revises: 270dba323212
Create Date: 2025-06-24 21:08:24.366397

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '7f9d151f5ad2'
down_revision = '270dba323212'
branch_labels = None
depends_on = None


def upgrade():
    pass
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('legal_documents',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('document_type', sa.String(length=50), nullable=False),
    sa.Column('title', sa.String(length=200), nullable=False),
    sa.Column('content', sa.Text(), nullable=False),
    sa.Column('version', sa.String(length=20), nullable=True),
    sa.Column('is_active', sa.Boolean(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.Column('updated_at', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('document_type')
    )
    ### end Alembic commands ###

def downgrade():
    pass
    # ### commands auto generated by Alembic - please adjust! ###
    # op.drop_table('legal_documents')
    # ### end Alembic commands ###
