ewbs / synapse

Synapse : Outil de suivi et de pilotage des projets et actions de simplification administrative en Wallonie et Fédération Wallonie-Bruxelles
GNU General Public License v3.0
0 stars 1 forks source link

Migration : Contraintes de clés primaires et unicité manquantes #41

Open mgrenson opened 7 years ago

mgrenson commented 7 years ago

J'ai repéré que certaines tables n'avaient pas de clé primaire et parfois contrainte d'unicité (notamment dans les tables intermédiaires) => les identifier => voir quelle mesure prendre par ex. créer une colonne id en + & ajouter une contrainte d'unicité pour des clés composites, ou faire une clé primaire composite ?) => corriger les scripts de migration => appliquer un script sql dans les différents environnements afin de les créer (attention que le script puisse bien s'appliquer, cf. contrainte d'unicité qui ne passerait pas parce que les données auraient été dédoublées de par l'absence de contrainte)

pour les contraintes d'unicité, il n'y a pas que les clés composite : parfois un élément devrait être unique et ne l'est pas (par ex. l'id d'une démarche nostra au sein d'une démarche)

=> à remettre au propre !

mgrenson commented 7 years ago

Clés primaires

ERROR administration_demarche (TABLE) Generic Table has no primary key defined [] ERROR administration_idea (TABLE) Generic Table has no primary key defined [] ERROR administration_user (TABLE) Generic Table has no primary key defined [] ERROR demarche_taxonomy_tag (TABLE) Generic Table has no primary key defined [] ERROR ewbs_action_taxonomy_tag (TABLE) Generic Table has no primary key defined [] ERROR ewbsservice_taxonomytag (TABLE) Generic Table has no primary key defined [] ERROR idea_minister (TABLE) Generic Table has no primary key defined [] ERROR idea_nostra_demarche (TABLE) Generic Table has no primary key defined [] ERROR idea_nostra_public (TABLE) Generic Table has no primary key defined [] ERROR idea_taxonomy_tag (TABLE) Generic Table has no primary key defined [] ERROR nostra_demarche_nostra_document (TABLE) Generic Table has no primary key defined [] ERROR nostra_demarche_nostra_evenement (TABLE) Generic Table has no primary key defined [] ERROR nostra_demarche_nostra_form (TABLE) Generic Table has no primary key defined [] ERROR nostra_demarche_nostra_public (TABLE) Generic Table has no primary key defined [] ERROR nostra_demarche_nostra_thematiqueabc (TABLE) Generic Table has no primary key defined [] ERROR nostra_demarche_nostra_thematiqueadm (TABLE) Generic Table has no primary key defined [] ERROR nostra_evenement_nostra_public (TABLE) Generic Table has no primary key defined [] ERROR nostra_evenement_nostra_thematiqueabc (TABLE) Generic Table has no primary key defined [] ERROR nostra_public_nostra_thematiqueabc (TABLE) Generic Table has no primary key defined [] ERROR password_reminders (TABLE) Generic Table has no primary key defined [] ERROR v_calculateddemarchegains (TABLE) Generic Table has no primary key defined [] ERROR v_demarchegains (TABLE) Generic Table has no primary key defined [] ERROR v_firstrevisionewbsaction (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisionannexes (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisiondemarcheeform (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisioneforms (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisionewbsaction (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisionfromdemarche (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisionpiecesfromdemarche (TABLE) Generic Table has no primary key defined [] ERROR v_lastrevisiontasksfromdemarche (TABLE) Generic Table has no primary key defined []