diff --git a/alembic/versions/20250329_125007_84a03fa6_create_list.py b/alembic/versions/20250329_125007_84a03fa6_create_list.py new file mode 100644 index 0000000..482bd01 --- /dev/null +++ b/alembic/versions/20250329_125007_84a03fa6_create_list.py @@ -0,0 +1,32 @@ +"""create lists table + +Revision ID: 2f3c1d4e6a7b +Revises: 0001 +Create Date: 2023-05-26 15:37:28.753290 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects.postgresql import UUID +import uuid + +# revision identifiers, used by Alembic. +revision = '2f3c1d4e6a7b' +down_revision = '0001' +branch_labels = None +depends_on = None + + +def upgrade(): + op.create_table( + 'lists', + sa.Column('id', UUID(as_uuid=True), primary_key=True, default=uuid.uuid4), + sa.Column('name', sa.String, nullable=False), + sa.Column('description', sa.String), + 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()) + ) + + +def downgrade(): + op.drop_table('lists') \ No newline at end of file