diff --git a/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py b/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py new file mode 100644 index 000000000..14508606f --- /dev/null +++ b/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py @@ -0,0 +1,26 @@ +"""partition weather_station_model_predictions part 2 + +Revision ID: 4014ddf1f874 +Revises: 362d268606f3 +Create Date: 2024-11-25 09:19:43.594892 + +""" + +from alembic import op + +# revision identifiers, used by Alembic. +revision = "4014ddf1f874" +down_revision = "362d268606f3" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### drop table that's now partitioned ### + op.execute("DROP MATERIALIZED VIEW morecast_2_materialized_view") + op.drop_table("weather_station_model_predictions_retired") + + +def downgrade(): + # ### restore from backup instead ### + pass