timmyomahony / craft-matrix-field-preview

Configure a screenshot preview for all your matrix field blocks, giving your clients a better publishing experience.
https://plugins.craftcms.com/matrix-field-preview
Other
16 stars 4 forks source link

Foreign key deletions aren't working on MySQL #80

Open timmyomahony opened 2 years ago

timmyomahony commented 2 years ago

Our migrations for deleting FKs look like:

$this->dropColumn(
  "{{%matrixfieldpreview_blocktypes_config}}",
  "categoryId");

Which works OK on Postgres, but seems to cause an issue with MySQL. It seems like both the index and constraint have to be deleted separately. When I tried this though I got further errors.