Ticket #339 (new enhancement)

Opened 1 year ago

Last modified 5 months ago

le script createdao devrait accepter une parametre -update

Reported by: bastnic Assigned to:
Priority: low Milestone:
Component: jelix-scripts Version: 1.0 beta 3.1
Severity: minor Keywords:
Cc: Php version:
Review: Hosting Provider:
Documentation needed: 0 Blocking:

Description

on pourrait par exemple ainsi mettre a jour un dao si un champs a ete modifie dans la structure de la BD, sans pour autant perdre tous les champs deja modifies.

Change History

11/13/07 17:29:29 changed by laurentj

En théorie, c'est faisable, mais compliqué à faire, cela pose pas mal de questions.

Si des champs ont disparu, que fait-on de l'utilisation des propriétés correspondantes dans les méthodes XML ? On supprime lesdites méthodes ?

Si un champs a été renommé, comment détecte-t-on lequel a été renommé ? à priori, impossible à savoir.. Cela revient donc à supprimer une propriété dans le dao (donc on revient au problème précédent), et à rajouter une nouvelle propriété (facile).

07/02/08 11:32:27 changed by bballizlife

  • review changed.
  • docneeded changed.

I also think that the script could not understand every updates made on the table structure and so it could not update the dao file.

Eventually, we may use the work on ticket #263. On this ticket there will be a file to describe updates to do on the database.

We may use this file to do the job here too. But we have not to forget that the framework is here to help us. If updating on hands the dao file is quicker than creating a migration file for the table and calling a updatedao script, there's no need for such a feature ;)

07/07/08 11:36:18 changed by laurentj

One thing we could do, is a script updatedao, on which we indicate the field to change and what we want to change on this field. Then, the script update the table, and the dao files..

Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed