From 40c64ccdc2a67de8868ada0034646a882358e685 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Sun, 14 May 2023 00:51:53 +0200 Subject: [PATCH] Add migration --- src/app/alembic/versions/c6ab48565c49_.py | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/app/alembic/versions/c6ab48565c49_.py diff --git a/src/app/alembic/versions/c6ab48565c49_.py b/src/app/alembic/versions/c6ab48565c49_.py new file mode 100644 index 0000000..d83be01 --- /dev/null +++ b/src/app/alembic/versions/c6ab48565c49_.py @@ -0,0 +1,35 @@ +"""empty message + +Revision ID: c6ab48565c49 +Revises: 64fe2045bf28 +Create Date: 2023-05-13 22:50:52.525440 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = "c6ab48565c49" +down_revision = "64fe2045bf28" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table( + "chat_donate_notifications", + sa.Column("id", sa.BigInteger(), nullable=False), + sa.Column("chat_id", sa.BigInteger(), nullable=False), + sa.Column("sended", sa.DateTime(), nullable=False), + sa.PrimaryKeyConstraint("id"), + sa.UniqueConstraint("chat_id"), + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table("chat_donate_notifications") + # ### end Alembic commands ###