Skip to content

Conversation

@michael-s-molina
Copy link
Member

SUMMARY

Fixes the following error when downgrading revision 678eefb4ab44:

sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) 
(1553, "Cannot drop index 'idx_user_id_database_id': needed in a foreign key constraint")

Fixes #29789

TESTING INSTRUCTIONS

Make sure you can downgrade the revision.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@michael-s-molina michael-s-molina requested a review from a team as a code owner July 31, 2024 17:00
@github-actions github-actions bot added the risk:db-migration PRs that require a DB migration label Jul 31, 2024
@michael-s-molina michael-s-molina removed the risk:db-migration PRs that require a DB migration label Jul 31, 2024
@codecov
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.70%. Comparing base (76d897e) to head (2553857).
⚠️ Report is 2419 commits behind head on master.

Files with missing lines Patch % Lines
superset/migrations/shared/constraints.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #29799       +/-   ##
===========================================
+ Coverage   60.48%   83.70%   +23.21%     
===========================================
  Files        1931      527     -1404     
  Lines       76236    38012    -38224     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    31819    -14295     
+ Misses      28017     6193    -21824     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive ∅ <0.00%> (∅)
javascript ?
mysql ∅ <0.00%> (?)
postgres ∅ <0.00%> (?)
presto ∅ <0.00%> (∅)
python ∅ <0.00%> (∅)
sqlite ∅ <0.00%> (?)
unit ∅ <0.00%> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - though it could be nice to implement as a reusable function def drop_fks_for_table(table_name) in superset/migrations/shared/constraints.py

@github-actions github-actions bot added the risk:db-migration PRs that require a DB migration label Jul 31, 2024
@michael-s-molina
Copy link
Member Author

LGTM - though it could be nice to implement as a reusable function def drop_fks_for_table(table_name) in superset/migrations/shared/constraints.py

Good point. Done 👍🏼

@michael-s-molina michael-s-molina removed the risk:db-migration PRs that require a DB migration label Jul 31, 2024
@michael-s-molina michael-s-molina merged commit 249f5ec into apache:master Aug 1, 2024
@sadpandajoe
Copy link
Member

@supersetbot label 4.1

@github-actions github-actions bot added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Aug 1, 2024
sadpandajoe pushed a commit that referenced this pull request Aug 13, 2024
@github-actions github-actions bot added 🍒 4.1.0 Cherry-picked to 4.1.0 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Nov 14, 2024
@mistercrunch mistercrunch added the 🍒 4.1.1 Cherry-picked to 4.1.1 label Nov 27, 2024
@github-actions github-actions bot added the 🍒 4.1.2 Cherry-picked to 4.1.2 label Apr 1, 2025
@mistercrunch mistercrunch added 🍒 4.1.3 Cherry-picked to 4.1.3 🚢 5.0.0 First shipped in 5.0.0 labels Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch 🍒 4.1.0 Cherry-picked to 4.1.0 🍒 4.1.1 Cherry-picked to 4.1.1 🍒 4.1.2 Cherry-picked to 4.1.2 🍒 4.1.3 Cherry-picked to 4.1.3 🍒 4.1.4 🚢 5.0.0 First shipped in 5.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revision 678eefb4ab44 throws an error when downgrading

3 participants