Skip to content

Commit

Permalink
Add IF EXISTs clause for partitioned and mat view tables (#4133)
Browse files Browse the repository at this point in the history
So that dev deployments that aren't partitioned can run
  • Loading branch information
conbrad authored Nov 25, 2024
1 parent 3cfabd7 commit 8185c92
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 8185c92

Please sign in to comment.