Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit f01b520

Browse files
committed
chore(db): use mariadb-friendly drop index syntax
Sometimes we get self-hosters or contributors showing up who want to use MariaDB. Even though the official line is that we don't support it, it happens often enough that we may as well just fix the places where we're incompatible. Afaik, that is just the `DROP INDEX` syntax in a couple of places. Note there are also occurrences in the reverse migrations, which I haven't bothered to fix. Seeing as they're not invoked in normal running and need to be manually uncommented before running anyway, it seems reasonable for them to be manually edited if anyone needs to do so.
1 parent b033726 commit f01b520

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/db/schema/patch-035-036.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ END;
9595
-- Any queries that were using it will just start using the
9696
-- new one instead.
9797

98-
DROP INDEX securityEvents_uid_ipAddrHmac
99-
ON securityEvents
100-
ALGORITHM = INPLACE LOCK = NONE;
98+
ALTER TABLE securityEvents
99+
DROP INDEX securityEvents_uid_ipAddrHmac,
100+
ALGORITHM = INPLACE, LOCK = NONE;
101101

102102
-- But it's *not* safe to do the following in the same deployment,
103103
-- because of the potential for `verifyToken_2` to be called:

lib/db/schema/patch-038-039.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ DROP TABLE eventLog;
1313

1414
DROP TABLE eventLogPublishState;
1515

16-
DROP INDEX securityEvents_uid_tokenId
17-
ON securityEvents
18-
ALGORITHM = INPLACE LOCK = NONE;
16+
ALTER TABLE securityEvents
17+
DROP INDEX securityEvents_uid_tokenId,
18+
ALGORITHM = INPLACE, LOCK = NONE;
1919

2020
ALTER TABLE securityEvents
2121
DROP COLUMN tokenId,

0 commit comments

Comments
 (0)