Skip to content

Add if_exists=True to index drops in migration b8f3cda5e023#2009

Open
Ahmad-Wahid wants to merge 1 commit intomainfrom
fix/skip-index-if-does-not-exit
Open

Add if_exists=True to index drops in migration b8f3cda5e023#2009
Ahmad-Wahid wants to merge 1 commit intomainfrom
fix/skip-index-if-does-not-exit

Conversation

@Ahmad-Wahid
Copy link
Contributor

@Ahmad-Wahid Ahmad-Wahid commented Mar 7, 2026

Description

This PR makes index drops in b8f3cda5e023_correct_order_in_index_for_single_most_.py conditional by using if_exists=True in both upgrade() and downgrade().

How to test

Run the following commands on a test database.

  • flexmeasures db upgrade
  • flexmeasures db downgrade
  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
@Ahmad-Wahid Ahmad-Wahid marked this pull request as ready for review March 7, 2026 19:50
@Ahmad-Wahid Ahmad-Wahid linked an issue Mar 7, 2026 that may be closed by this pull request
@Ahmad-Wahid Ahmad-Wahid self-assigned this Mar 7, 2026
@Ahmad-Wahid Ahmad-Wahid requested a review from nhoening March 7, 2026 19:50
@read-the-docs-community
Copy link

Documentation build overview

📚 flexmeasures | 🛠️ Build #31707026 | 📁 Comparing 70a09c2 against latest (ccfd069)


🔍 Preview build

Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
File Status
api/v3_0.html 📝 modified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make migration index drop resilient with if_exists=True

1 participant