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