Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

livre.play.deux.web > autre méthode pour initialiser la base de données #35

Open
rakiz opened this issue May 31, 2012 · 1 comment
Open

Comments

@rakiz
Copy link

rakiz commented May 31, 2012

J'ai également exploré Play2 de mon coté, et je n'utilise pas la même méthode pour initialiser la base.

dans le répertoire "conf\evolutions\default' se trouvent les fichiers scripts "evolutions" qui sont nommés 1.sql 2.sql etc...

Chacun comporte deux parties: "Ups" pour appliquer des transformations, "Downs" pour les annuler
Il est donc assez facile de l'utiliser pour remplir la base:

--- !Ups

insert into user ......

--- !Downs

delete from user;

Plus d'informations ici: https://github.com/playframework/Play20/wiki/Evolutions
ou ici: http://www.playframework.org/documentation/2.0.1/Evolutions

@k33g
Copy link
Collaborator

k33g commented Jun 1, 2012

Merci :) je ferias un § à ce sujet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants