-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error when performing DB migration 22 #2458
Comments
Confirmed, but the problem isn't that MySQL doesn't support CHECK constraints. MySQL parses but ignores them. The problem is that MySQL doesn't know Since the constraints aren't applied in MySQL this won't cause any issues with databases, but we should handle it better. |
FYI, I got this error migrating to 22 using MariaDB. I have 4 machines running mariadb so I can't remember which it was, but they all have 10.1xx or 10.2xx |
@dongemus I've just tested on MariaDB and it worked properly. Could you reproduce the problem on MariaDB and paste the logs? |
InfiniteChaos had it happen on MariaDB as well, he posted about it in Devkat #help I had a machine that I hadn't used for RM in a while and so I did a pull and got the error on schema upgrade. It worked fine after restarting. |
Expected Behavior
DB migrations should run without errors on all supported DBs.
Current Behavior
Running migration 22 (#2416) on a MySQL database produces an error:
Note: the concern here is the error message - the migration gets applied 'correctly'.
Possible Solution
MySQL doesn't support CHECK constraints, so the migration is not actually required for MySQL DBs. This is why the migration gets applied 'correctly' - in this case 'correctly' means not applying it at all.
The error is raised because MySQL also doesn't used the
DROP CONSTRAINT
syntax use in the PR.It may therefore be necessary to detect the DB type and only apply the migration to MariaDB databases.
Alternatively, as this doesn't cause any particular issues we could just ignore it - most users have probably updated by now, and new users don't have to run DB migrations.
Steps to Reproduce (for bugs)
Context
It's a small issue - particularly as our docs recommend using MariaDB - but I've seen it come up a couple of times in
#help
so there are at least some users using MySQL.Your Environment
MySQL DB, rather than MariaDB.
The text was updated successfully, but these errors were encountered: