gitscope
https://dev.kronoz.win/r/marzneshin.git
app/db/migrations/versions/20241127_79271458a973_drop_notification_reminders_table.py · v0.7.2
Source
1 8440155 mahdim10 1y ago """drop notification reminders table
2 8440155 mahdim10 1y ago
3 8440155 mahdim10 1y ago Revision ID: 79271458a973
4 7fb7482 dawsh 1y ago Revises: a015ed8ce227
5 8440155 mahdim10 1y ago Create Date: 2024-11-27 04:43:24.448736
6 8440155 mahdim10 1y ago
7 8440155 mahdim10 1y ago """
8 8440155 mahdim10 1y ago
9 8440155 mahdim10 1y ago import sqlalchemy as sa
10 7fb7482 dawsh 1y ago from alembic import op
11 8440155 mahdim10 1y ago
12 8440155 mahdim10 1y ago # revision identifiers, used by Alembic.
13 8440155 mahdim10 1y ago revision = "79271458a973"
14 7fb7482 dawsh 1y ago down_revision = "a015ed8ce227"
15 8440155 mahdim10 1y ago branch_labels = None
16 8440155 mahdim10 1y ago depends_on = None
17 8440155 mahdim10 1y ago
18 8440155 mahdim10 1y ago
19 8440155 mahdim10 1y ago def upgrade() -> None:
20 8440155 mahdim10 1y ago # ### commands auto generated by Alembic - please adjust! ###
21 8440155 mahdim10 1y ago op.drop_table("notification_reminders")
22 8440155 mahdim10 1y ago # ### end Alembic commands ###
23 8440155 mahdim10 1y ago
24 8440155 mahdim10 1y ago
25 8440155 mahdim10 1y ago def downgrade() -> None:
26 8440155 mahdim10 1y ago # ### commands auto generated by Alembic - please adjust! ###
27 8440155 mahdim10 1y ago op.create_table(
28 8440155 mahdim10 1y ago "notification_reminders",
29 8440155 mahdim10 1y ago sa.Column("id", sa.Integer(), nullable=False),
30 8440155 mahdim10 1y ago sa.Column("user_id", sa.Integer(), nullable=True),
31 8440155 mahdim10 1y ago sa.Column(
32 8440155 mahdim10 1y ago "type",
33 8440155 mahdim10 1y ago sa.Enum("expiration_date", "data_usage", name="remindertype"),
34 8440155 mahdim10 1y ago nullable=False,
35 8440155 mahdim10 1y ago ),
36 8440155 mahdim10 1y ago sa.Column("expires_at", sa.DateTime(), nullable=True),
37 8440155 mahdim10 1y ago sa.Column("created_at", sa.DateTime(), nullable=True),
38 8440155 mahdim10 1y ago sa.ForeignKeyConstraint(
39 8440155 mahdim10 1y ago ["user_id"],
40 8440155 mahdim10 1y ago ["users.id"],
41 8440155 mahdim10 1y ago ),
42 8440155 mahdim10 1y ago sa.PrimaryKeyConstraint("id"),
43 8440155 mahdim10 1y ago )
44 8440155 mahdim10 1y ago # ### end Alembic commands ###