Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revision 678eefb4ab44 throws an error when downgrading #29789

Closed
3 tasks done
michael-s-molina opened this issue Jul 31, 2024 · 0 comments · Fixed by #29799
Closed
3 tasks done

Revision 678eefb4ab44 throws an error when downgrading #29789

michael-s-molina opened this issue Jul 31, 2024 · 0 comments · Fixed by #29799
Labels
change:backend Requires changing the backend

Comments

@michael-s-molina
Copy link
Member

Bug description

#27631 contains a migration that throws an error when downgrading.

def downgrade():
    op.drop_index("idx_user_id_database_id", table_name="database_user_oauth2_tokens")
    op.drop_table("database_user_oauth2_tokens")

Executing the downgrade command will produce:

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

How to reproduce the bug

Execute superset db downgrade be1b217cd8cd which is the previous revision.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:backend Requires changing the backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant