Closed Tuxem closed 3 years ago
Là comme ça on dirait un souci de préfixe...
Est-ce qu'il serait possible d'avoir la liste des tables dans la base robert2
(SHOW TABLES;
) ?
Bien évidemment :)
mysql> show tables;
+----------------------------------+
| Tables_in_robert2 |
+----------------------------------+
| event_technicians |
| phinxlog |
| robert2_attribute_categories |
| robert2_attributes |
| robert2_bills |
| robert2_categories |
| robert2_companies |
| robert2_countries |
| robert2_documents |
| robert2_estimates |
| robert2_event_beneficiaries |
| robert2_event_material_units |
| robert2_event_materials |
| robert2_events |
| robert2_groups |
| robert2_inventories |
| robert2_inventory_material_units |
| robert2_inventory_materials |
| robert2_material_attributes |
| robert2_material_unit_states |
| robert2_material_units |
| robert2_materials |
| robert2_parks |
| robert2_persons |
| robert2_settings |
| robert2_sub_categories |
| robert2_taggables |
| robert2_tags |
| robert2_user_settings |
| robert2_users |
+----------------------------------+
30 rows in set (0.01 sec)
Il semble bien y avoir un souci avec la table event_technicians
, qui devrait se nommer robert2_event_technicians
.
=> Pour corriger le souci rapidement chez vous, il faudrait la renommer manuellement.
Après, pour ce qui est de savoir pourquoi le rename
n'a pas fonctionné dans votre cas, ça ...
Effectivement, un dump pré-migration pourrait être utile pour qu'on essaie de reproduire si possible. 👍
(cc @polosson)
Okay, effectivement, en faisant un RENAME TABLE event_technicians TO robert2_event_technicians;
ça résoud le problème, c'était tellement simple xD
Je t'envoie les dumps si vous voulez creuser le pourquoi du comment ;)
Je vous laisse gérer si vous voulez clôre ou pas l'issue. Je reste dispo si jamais :)
Merci pour le signalement, on va essayer de reproduire / corriger avant de fermer le ticket.
Pour le suivi / futur debug:
Je me demande si la méthode rename()
de Phinx prend en compte la configuration des préfixes de table.
C'est la première fois qu'on l'utilise dans les migrations sauf erreur, donc probable qu'on ait pas remarqué le souci avant.
(cc @polosson)
Bon apparemment :
rename()
semble bien prendre en compte le préfixe : voir le codeDonc je vais regarder ce que ça donne avec le dump pré-migration fourni, et tenter de reproduire ceci. Je verrai si on peut corriger nous-même ou pas...
Mais pffff, décidément ces préfixes, c'est un peu la m... à gérer lol
OK, j'ai pu reproduire le bug en local, effectivement Phinx ne semble pas tenir compte de la config pour le préfixe quand on renomme la table. Strange ! Je vais regarder un peu plus en détail, ouvrir un ticket chez Phinx, et faire un hotfix qui corrige ça "à la main" en ajoutant directement le préfixe dans le nom passé à rename()
...
Voilà qui est fait pour le ticket chez Phinx : https://github.com/cakephp/phinx/issues/2018
Le hotfix arrivera cet après midi. Cheers !
Bonjour,
J'ai mit à jour en suivant de la 14.3 vers la 15.0 et malgré le fait de n'avoir eut aucune erreurs dans la migration de la BDD, j'ai cette erreur lorsque je charge l'interface :+1:
Pour info, voici les logs de mise à jour :