35 lines
852 B
Python
35 lines
852 B
Python
"""Add Department table
|
|
|
|
Revision ID: 60b4aee3ad2d
|
|
Revises: 48f1ca8fa73a
|
|
Create Date: 2026-02-23 20:56:21.095082
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '60b4aee3ad2d'
|
|
down_revision = '48f1ca8fa73a'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('departments',
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('name', sa.String(length=100), nullable=False),
|
|
sa.Column('description', sa.Text(), nullable=True),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('name')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('departments')
|
|
# ### end Alembic commands ###
|