Overview
Comment: | Fix migration |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
1a5bb28aea71b9fc3c68c71e496dfc8f |
User & Date: | bohwaz on 2021-04-08 16:06:34 |
Other Links: | branch diff | manifest | tags |
Context
2021-04-08
| ||
16:28 | Fix change of id field check-in: 3bbe7a49e5 user: bohwaz tags: dev | |
16:06 | Fix migration check-in: 1a5bb28aea user: bohwaz tags: dev | |
11:37 | Remove useless config call check-in: da5b2c2db6 user: bohwaz tags: dev | |
Changes
Modified src/include/data/1.1.0_migration.sql from [32c4e00c3b] to [9f5de55bec].
1 2 3 4 5 6 7 8 9 10 11 | -- Remove triggers in case they interact with the migration DROP TRIGGER IF EXISTS wiki_recherche_delete; DROP TRIGGER IF EXISTS wiki_recherche_update; DROP TRIGGER IF EXISTS wiki_recherche_contenu_insert; DROP TRIGGER IF EXISTS wiki_recherche_contenu_chiffre; -- Fix some rare edge cases where date_inscription is incorrect UPDATE membres SET date_inscription = date() WHERE date(date_inscription) IS NULL; -- Uh, force another login id if email is not correct UPDATE config SET valeur = 'numero' WHERE cle = 'champ_identifiant' AND valeur = 'email' | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | -- Remove triggers in case they interact with the migration DROP TRIGGER IF EXISTS wiki_recherche_delete; DROP TRIGGER IF EXISTS wiki_recherche_update; DROP TRIGGER IF EXISTS wiki_recherche_contenu_insert; DROP TRIGGER IF EXISTS wiki_recherche_contenu_chiffre; -- Fix some rare edge cases where date_inscription is incorrect UPDATE membres SET date_inscription = date() WHERE date(date_inscription) IS NULL; -- Uh, force another login id if email is not correct UPDATE config SET valeur = 'numero' WHERE cle = 'champ_identifiant' AND valeur = 'email' AND (SELECT COUNT(*) FROM membres WHERE email IS NOT NULL GROUP BY LOWER(email) HAVING COUNT(*) > 1 LIMIT 1); -- Other weird things to fix before migration UPDATE wiki_pages SET uri = 'page_' || id WHERE uri = '' OR uri IS NULL; DELETE FROM config WHERE cle = 'connexion' OR cle = 'wiki'; ALTER TABLE membres_categories RENAME TO membres_categories_old; |
︙ | ︙ |