Actions
Anomalie #678
closedGalette v0.7.5. Mise à jour des tables défectueuse.
Start date:
08/18/2013
Due date:
% Done:
100%
Estimated time:
Version utilisée:
Vote:
Description
Lors d'une mise à jour de Galette v0.7.4.2 vers Galettev0.7.5, l'anomalie suivante se déclenche (Création/Mise à jour des tables) :
ALTER TABLE galette_tmppasswds ...SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT galette_tmppasswds_ibfk_1, ADD CONSTRAINT galette_tmppasswds_ibfk_1' at line 2 (ALTER TABLE galette_tmppasswds DROP CONSTRAINT galette_tmppasswds_ibfk_1, ADD CONSTRAINT galette_tmppasswds_ibfk_1 FOREIGN KEY (id_adh) REFERENCES galette_adherents ON DELETE CASCADE)
Updated by Roland Telle about 11 years ago
Le correctif proposé dans le message https://mail.gna.org/public/galette-discussion/2013-08/msg00024.html fonctionne parfaitement. Merci ;-)
Updated by Johan Cwiklinski about 11 years ago
- Status changed from Nouveau to In Progress
- Assignee set to Johan Cwiklinski
- Category set to Database
Le correctif :
diff --git a/galette/install/sql/upgrade-to-0.75-mysql.sql b/galette/install/sql/upgrade-to-0.75-mysql.sql
index 28389dd..b95f24f 100644
--- a/galette/install/sql/upgrade-to-0.75-mysql.sql
+++ b/galette/install/sql/upgrade-to-0.75-mysql.sql
@@ -27,9 +27,9 @@ CREATE TABLE galette_pdfmodels (
PRIMARY KEY (model_id)
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE galette_tmppasswds DROP FOREIGN KEY galette_tmppasswds_ibfk_1;
ALTER TABLE galette_tmppasswds
- DROP CONSTRAINT galette_tmppasswds_ibfk_1,
ADD CONSTRAINT galette_tmppasswds_ibfk_1
- FOREIGN KEY (id_adh) REFERENCES galette_adherents ON DELETE CASCADE;
+ FOREIGN KEY (id_adh) REFERENCES galette_adherents (id_adh) ON DELETE CASCADE ON UPDATE RESTRICT ;
UPDATE galette_database SET version = 0.703;
Updated by Johan Cwiklinski about 11 years ago
- Status changed from In Progress to Résolu
- % Done changed from 0 to 100
Appliqué par commit 9349b19d4e8fa79f94c827902a59ae88b836f99e.
Updated by Johan Cwiklinski about 11 years ago
- Status changed from Résolu to Fermé
Actions