didier/alembic/versions/36300b558ef1_meme_templates.py

38 lines
988 B
Python
Raw Normal View History

2022-08-25 02:07:02 +02:00
"""Meme templates
Revision ID: 36300b558ef1
Revises: 08d21b2d1a0a
Create Date: 2022-08-25 01:34:22.845955
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "36300b558ef1"
down_revision = "08d21b2d1a0a"
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"meme",
sa.Column("meme_id", sa.Integer(), nullable=False),
sa.Column("name", sa.Text(), nullable=False),
sa.Column("template_id", sa.Integer(), nullable=False),
sa.Column("field_count", sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint("meme_id"),
sa.UniqueConstraint("name"),
sa.UniqueConstraint("template_id"),
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("meme")
# ### end Alembic commands ###