You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Running the script with rails runner gives an error, and the deletion of the database data fails:
$ rails r scripts/wipe_everything.rb
Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails (qpixel_dev.user_abilities, CONSTRAINT fk_rails_de15a6ad96 FOREIGN KEY (ability_id) REFERENCES abilities (id)) (ActiveRecord::InvalidForeignKey)
To Reproduce
Steps to reproduce the behavior:
No preparation required - simply run the script from the terminal as described.
Expected behavior
The database should be emptied and reseeded as if starting from a new installation.
A decision needs to be made to either fix this script (which may involve deleting the data per table in a specific order) or to delete this script if it is no longer required.
The text was updated successfully, but these errors were encountered:
Fully addresses it; so yes, this can be closed now 🙂 (Sorry, used to issues auto-closing when an associated PR is merged and closed; didn't realize this was a manual process at the moment)
Describe the bug
Running the script with rails runner gives an error, and the deletion of the database data fails:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The database should be emptied and reseeded as if starting from a new installation.
A decision needs to be made to either fix this script (which may involve deleting the data per table in a specific order) or to delete this script if it is no longer required.
The text was updated successfully, but these errors were encountered: