diff --git a/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py b/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py index 14508606f..0cee3c25b 100644 --- a/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py +++ b/api/alembic/versions/4014ddf1f874_partition_weather_station_model_.py @@ -17,8 +17,8 @@ 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") + op.execute("DROP MATERIALIZED VIEW IF EXISTS morecast_2_materialized_view") + op.drop_table("weather_station_model_predictions_retired", if_exists=True) def downgrade():