mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-09-26 16:38:37 +03:00
fix: ongeki more resilient db migrations
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
-- should have been not nullable in the first place smh
|
||||
DELETE FROM ongeki_user_event_map
|
||||
WHERE user_id IS NULL;
|
||||
|
||||
ALTER TABLE ongeki_user_event_map
|
||||
MODIFY user_id BIGINT NOT NULL;
|
||||
|
||||
-- dedupe before adding new constraint just in case
|
||||
DELETE FROM ongeki_user_event_map
|
||||
WHERE id NOT IN (
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
-- allow separate Technical Challenge records for each chart difficulty
|
||||
-- drop the old constraint and dedupe with the new constraint just in case again
|
||||
ALTER TABLE ongeki_user_event_music
|
||||
DROP INDEX UKo5PU3BgZeTKB8SNykq9U7xjfshp;
|
||||
DROP INDEX IF EXISTS UKo5PU3BgZeTKB8SNykq9U7xjfshp;
|
||||
|
||||
DELETE FROM ongeki_user_event_music
|
||||
WHERE user_id IS NULL;
|
||||
|
||||
ALTER TABLE ongeki_user_event_music
|
||||
MODIFY user_id BIGINT NOT NULL;
|
||||
|
||||
DELETE FROM ongeki_user_event_music
|
||||
WHERE id NOT IN (
|
||||
|
||||
Reference in New Issue
Block a user