mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 14:33:26 +00:00
build: joke alembic migration
This commit is contained in:
parent
18abf87598
commit
8722d79ee0
|
@ -0,0 +1,37 @@
|
|||
"""Added initial table
|
||||
|
||||
Revision ID: 9749b063b095
|
||||
Revises:
|
||||
Create Date: 2023-10-02 19:46:05.078494
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "9749b063b095"
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"joke",
|
||||
sa.Column("type", sa.String(), nullable=False),
|
||||
sa.Column("setup", sa.String(), nullable=False),
|
||||
sa.Column("punchline", sa.String(), nullable=False),
|
||||
sa.Column("id", sa.Uuid(), nullable=False),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("joke")
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in New Issue
Block a user