|
5 | 5 | Create Date: 2023-07-03 11:00:31.216789
|
6 | 6 |
|
7 | 7 | """
|
8 |
| -from alembic import op |
9 | 8 | import sqlalchemy as sa
|
10 |
| -from sqlalchemy.dialects import postgresql |
| 9 | +from alembic import op |
11 | 10 |
|
12 | 11 | # revision identifiers, used by Alembic.
|
13 |
| -revision = 'a6fb75892950' |
14 |
| -down_revision = '08ba6879b865' |
| 12 | +revision = "a6fb75892950" |
| 13 | +down_revision = "08ba6879b865" |
15 | 14 | branch_labels = None
|
16 | 15 | depends_on = None
|
17 | 16 |
|
18 | 17 |
|
19 |
| -def upgrade(): #noqa |
| 18 | +def upgrade(): # noqa |
20 | 19 | # ### commands auto generated by Alembic - please adjust! ###
|
21 | 20 |
|
22 |
| - op.add_column('forecast_value', sa.Column('properties', sa.JSON(), nullable=True)) |
23 |
| - op.add_column('forecast_value_2022_09', sa.Column('properties', sa.JSON(), nullable=True)) |
24 |
| - op.add_column('forecast_value_2022_10', sa.Column('properties', sa.JSON(), nullable=True)) |
25 |
| - op.add_column('forecast_value_2022_11', sa.Column('properties', sa.JSON(), nullable=True)) |
26 |
| - op.add_column('forecast_value_2022_12', sa.Column('properties', sa.JSON(), nullable=True)) |
27 |
| - op.add_column('forecast_value_2023_01', sa.Column('properties', sa.JSON(), nullable=True)) |
28 |
| - op.add_column('forecast_value_2023_02', sa.Column('properties', sa.JSON(), nullable=True)) |
29 |
| - op.add_column('forecast_value_2023_03', sa.Column('properties', sa.JSON(), nullable=True)) |
30 |
| - op.add_column('forecast_value_2023_04', sa.Column('properties', sa.JSON(), nullable=True)) |
31 |
| - op.add_column('forecast_value_2023_05', sa.Column('properties', sa.JSON(), nullable=True)) |
32 |
| - op.add_column('forecast_value_2023_06', sa.Column('properties', sa.JSON(), nullable=True)) |
33 |
| - op.add_column('forecast_value_2023_07', sa.Column('properties', sa.JSON(), nullable=True)) |
34 |
| - op.add_column('forecast_value_2023_08', sa.Column('properties', sa.JSON(), nullable=True)) |
35 |
| - op.add_column('forecast_value_2023_09', sa.Column('properties', sa.JSON(), nullable=True)) |
36 |
| - op.add_column('forecast_value_2023_10', sa.Column('properties', sa.JSON(), nullable=True)) |
37 |
| - op.add_column('forecast_value_2023_11', sa.Column('properties', sa.JSON(), nullable=True)) |
38 |
| - op.add_column('forecast_value_2023_12', sa.Column('properties', sa.JSON(), nullable=True)) |
39 |
| - op.add_column('forecast_value_last_seven_days', sa.Column('properties', sa.JSON(), nullable=True)) |
40 |
| - op.add_column('forecast_value_latest', sa.Column('properties', sa.JSON(), nullable=True)) |
41 |
| - op.add_column('forecast_value_old', sa.Column('properties', sa.JSON(), nullable=True)) |
| 21 | + op.add_column("forecast_value", sa.Column("properties", sa.JSON(), nullable=True)) |
| 22 | + op.add_column("forecast_value_2022_09", sa.Column("properties", sa.JSON(), nullable=True)) |
| 23 | + op.add_column("forecast_value_2022_10", sa.Column("properties", sa.JSON(), nullable=True)) |
| 24 | + op.add_column("forecast_value_2022_11", sa.Column("properties", sa.JSON(), nullable=True)) |
| 25 | + op.add_column("forecast_value_2022_12", sa.Column("properties", sa.JSON(), nullable=True)) |
| 26 | + op.add_column("forecast_value_2023_01", sa.Column("properties", sa.JSON(), nullable=True)) |
| 27 | + op.add_column("forecast_value_2023_02", sa.Column("properties", sa.JSON(), nullable=True)) |
| 28 | + op.add_column("forecast_value_2023_03", sa.Column("properties", sa.JSON(), nullable=True)) |
| 29 | + op.add_column("forecast_value_2023_04", sa.Column("properties", sa.JSON(), nullable=True)) |
| 30 | + op.add_column("forecast_value_2023_05", sa.Column("properties", sa.JSON(), nullable=True)) |
| 31 | + op.add_column("forecast_value_2023_06", sa.Column("properties", sa.JSON(), nullable=True)) |
| 32 | + op.add_column("forecast_value_2023_07", sa.Column("properties", sa.JSON(), nullable=True)) |
| 33 | + op.add_column("forecast_value_2023_08", sa.Column("properties", sa.JSON(), nullable=True)) |
| 34 | + op.add_column("forecast_value_2023_09", sa.Column("properties", sa.JSON(), nullable=True)) |
| 35 | + op.add_column("forecast_value_2023_10", sa.Column("properties", sa.JSON(), nullable=True)) |
| 36 | + op.add_column("forecast_value_2023_11", sa.Column("properties", sa.JSON(), nullable=True)) |
| 37 | + op.add_column("forecast_value_2023_12", sa.Column("properties", sa.JSON(), nullable=True)) |
| 38 | + op.add_column( |
| 39 | + "forecast_value_last_seven_days", sa.Column("properties", sa.JSON(), nullable=True) |
| 40 | + ) |
| 41 | + op.add_column("forecast_value_latest", sa.Column("properties", sa.JSON(), nullable=True)) |
| 42 | + op.add_column("forecast_value_old", sa.Column("properties", sa.JSON(), nullable=True)) |
42 | 43 | # ### end Alembic commands ###
|
43 | 44 |
|
44 | 45 |
|
45 |
| -def downgrade(): #noqa |
| 46 | +def downgrade(): # noqa |
46 | 47 | # ### commands auto generated by Alembic - please adjust! ###
|
47 |
| - op.drop_column('forecast_value_old', 'properties') |
48 |
| - op.drop_column('forecast_value_latest', 'properties') |
49 |
| - op.drop_column('forecast_value_last_seven_days', 'properties') |
50 |
| - op.drop_column('forecast_value_2023_12', 'properties') |
51 |
| - op.drop_column('forecast_value_2023_11', 'properties') |
52 |
| - op.drop_column('forecast_value_2023_10', 'properties') |
53 |
| - op.drop_column('forecast_value_2023_09', 'properties') |
54 |
| - op.drop_column('forecast_value_2023_08', 'properties') |
55 |
| - op.drop_column('forecast_value_2023_07', 'properties') |
56 |
| - op.drop_column('forecast_value_2023_06', 'properties') |
57 |
| - op.drop_column('forecast_value_2023_05', 'properties') |
58 |
| - op.drop_column('forecast_value_2023_04', 'properties') |
59 |
| - op.drop_column('forecast_value_2023_03', 'properties') |
60 |
| - op.drop_column('forecast_value_2023_02', 'properties') |
61 |
| - op.drop_column('forecast_value_2023_01', 'properties') |
62 |
| - op.drop_column('forecast_value_2022_12', 'properties') |
63 |
| - op.drop_column('forecast_value_2022_11', 'properties') |
64 |
| - op.drop_column('forecast_value_2022_10', 'properties') |
65 |
| - op.drop_column('forecast_value_2022_09', 'properties') |
66 |
| - op.drop_column('forecast_value', 'properties') |
| 48 | + op.drop_column("forecast_value_old", "properties") |
| 49 | + op.drop_column("forecast_value_latest", "properties") |
| 50 | + op.drop_column("forecast_value_last_seven_days", "properties") |
| 51 | + op.drop_column("forecast_value_2023_12", "properties") |
| 52 | + op.drop_column("forecast_value_2023_11", "properties") |
| 53 | + op.drop_column("forecast_value_2023_10", "properties") |
| 54 | + op.drop_column("forecast_value_2023_09", "properties") |
| 55 | + op.drop_column("forecast_value_2023_08", "properties") |
| 56 | + op.drop_column("forecast_value_2023_07", "properties") |
| 57 | + op.drop_column("forecast_value_2023_06", "properties") |
| 58 | + op.drop_column("forecast_value_2023_05", "properties") |
| 59 | + op.drop_column("forecast_value_2023_04", "properties") |
| 60 | + op.drop_column("forecast_value_2023_03", "properties") |
| 61 | + op.drop_column("forecast_value_2023_02", "properties") |
| 62 | + op.drop_column("forecast_value_2023_01", "properties") |
| 63 | + op.drop_column("forecast_value_2022_12", "properties") |
| 64 | + op.drop_column("forecast_value_2022_11", "properties") |
| 65 | + op.drop_column("forecast_value_2022_10", "properties") |
| 66 | + op.drop_column("forecast_value_2022_09", "properties") |
| 67 | + op.drop_column("forecast_value", "properties") |
67 | 68 |
|
68 | 69 | # ### end Alembic commands ###
|
0 commit comments