main
py 37 lines 1.35 KB
Raw
1 """Add to snapshot and restore
2
3 Revision ID: 2ef4b8b77790
4 Revises: 980bb08dd1cd
5 Create Date: 2026-04-26 17:02:24.164444
6
7 """
8 from typing import Sequence
9 from typing import Union
10
11 import sqlalchemy as sa
12
13 from alembic import op
14
15 # revision identifiers, used by Alembic.
16 revision: str = "2ef4b8b77790"
17 down_revision: Union[str, None] = "980bb08dd1cd"
18 branch_labels: Union[str, Sequence[str], None] = None
19 depends_on: Union[str, Sequence[str], None] = None
20
21
22 def upgrade() -> None:
23 # ### commands auto generated by Alembic - please adjust! ###
24 op.add_column("index_snapshot_schedules", sa.Column("scheduled_hour", sa.Integer(), nullable=True))
25 op.add_column("index_snapshot_schedules", sa.Column("scheduled_minute", sa.Integer(), nullable=True))
26 op.add_column("index_snapshot_schedules", sa.Column("interval_days", sa.Integer(), nullable=False))
27 op.add_column("index_snapshot_schedules", sa.Column("timezone", sa.String(length=50), nullable=False))
28 # ### end Alembic commands ###
29
30
31 def downgrade() -> None:
32 # ### commands auto generated by Alembic - please adjust! ###
33 op.drop_column("index_snapshot_schedules", "timezone")
34 op.drop_column("index_snapshot_schedules", "interval_days")
35 op.drop_column("index_snapshot_schedules", "scheduled_minute")
36 op.drop_column("index_snapshot_schedules", "scheduled_hour")
37 # ### end Alembic commands ###