From 85cc4624e9caf22c7ea715a6753b704af50e88c4 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 00:08:53 +0000 Subject: [PATCH] Add migration for None --- .../20250328_000842_71f02909_create_none.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 alembic/versions/20250328_000842_71f02909_create_none.py diff --git a/alembic/versions/20250328_000842_71f02909_create_none.py b/alembic/versions/20250328_000842_71f02909_create_none.py new file mode 100644 index 0000000..0cffff8 --- /dev/null +++ b/alembic/versions/20250328_000842_71f02909_create_none.py @@ -0,0 +1,28 @@ +"""create nones table +Revision ID: a2b3c4d5e6f7 +Revises: +Create Date: 2023-01-01 12:00:00.000000 +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.sql import func +import uuid + +# revision identifiers +revision = 'a2b3c4d5e6f7' +down_revision = None +branch_labels = None +depends_on = None + +def upgrade(): + op.create_table( + 'nones', + sa.Column('id', sa.String(), primary_key=True, server_default=sa.text('uuid_generate_v4()')), + sa.Column('message', sa.String(), nullable=False, server_default='yoloo!!'), + sa.Column('created_at', sa.DateTime(), server_default=sa.func.now()), + sa.Column('updated_at', sa.DateTime(), server_default=sa.func.now(), onupdate=sa.func.now()), + sa.PrimaryKeyConstraint('id') + ) + +def downgrade(): + op.drop_table('nones') \ No newline at end of file