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
Cleanup invalid relations row in foreign key migrations #6013
Comments
I'm not sure where it's getting directus.notes_sku ... we have a table for nots and we have a table for sku, but they don't interact anywhere. |
It's trying to add foreign key constraints for your existing relations in Directus. Could it be that you have a stray row in |
directus_migrations shows this data: |
My bad, meant |
I do see some data regarding notes and sku in directus_relations regarding notes and sku but that doesn't strike a bell in my brain. notes and skus don't really interact. for our setup, it's more notes and features |
@doodlemania2 Could you confirm the rows for any non-existing tables in |
perhaps this record: |
This yielded LOTS of more errors :( I guess we ended up in a bad state. Any way to roll this back, clean, and then move forward? 021-06-02T21:22:31.151626106Z 21:22:31 ✨ Database already initialized, skipping install |
Cleared the first batch, now getting these: 021-06-02T21:36:11.589144976Z ✨ Applying Add Foreign Key Constraints... |
(discord seems to be messing up :( ) |
Gonna roll back to .68 and hopefully things will at least come back online while we tinker |
okay - .68 did come back and things seem okay even though i've been removing a few rows from directus_relations. curious how we could clean up further to get to .70/.71? |
edit by @rijkvanzanten: The migration is looping over directus_relations in order to setup the foreign key constraints. However, if for whatever reason you have a relationship configured in directus_relations, that doesn't actually map to existing tables in the database, the migration will fail
The text was updated successfully, but these errors were encountered: