mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Command to add memes
This commit is contained in:
parent
86dd6cb27b
commit
dbb570420b
9 changed files with 188 additions and 2 deletions
37
alembic/versions/36300b558ef1_meme_templates.py
Normal file
37
alembic/versions/36300b558ef1_meme_templates.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"""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 ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue