FriendsOfFlarum / cookie-consent

Cookie Consent notice for your Flarum site
MIT License
6 stars 5 forks source link

fix: migrations assume flarum is already installed #31

Closed dsevillamartin closed 2 years ago

dsevillamartin commented 2 years ago

Relates to https://github.com/flarum/framework/pull/3655

Changes proposed in this pull request: Use Schema DB connection instead of resolving flarum.settings. If the key exists (whether old or new), update with new key. This avoids creating a duplicate & overcomplicating this code more than necessary.

Not sure if the new key thing in the query is necessary, as if both are present it'll error regardless. And the migration should exist in the DB if that setting uses the new key.

Confirmed