thesis-scripts/migrations/versions/16d350f2e166_add_content_to_entry.py

39 lines
1.1 KiB
Python
Raw Permalink Normal View History

2026-06-14 19:38:09 +00:00
"""add content to entry
Revision ID: 16d350f2e166
Revises:
Create Date: 2026-06-14 16:20:09.110465
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '16d350f2e166'
down_revision: Union[str, Sequence[str], None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('entries',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('title', sa.String(length=255), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_entries_id'), 'entries', ['id'], unique=False)
# ### end Alembic commands ###
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_entries_id'), table_name='entries')
op.drop_table('entries')
# ### end Alembic commands ###