Last active
May 10, 2016 18:24
-
-
Save EmmanuelKasper/04d40bfd8e82fac3144e7a2cc2b2fe1b to your computer and use it in GitHub Desktop.
Create an evolution script for the play framework based on pg_dump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# after that you need to insert # --- !Ups on top of the generated file | |
echo '# --- !Ups' > conf/evolutions/default/2.sql | |
# column inserts are needed in case of new model properties | |
# we keep only the insert statements, pg_dump comments confuse ebean/play | |
pg_dump --column-inserts \ | |
--inserts --data-only --exclude-table=play_evolutions \ | |
--username popcon -h localhost popcon \ | |
| grep '^INSERT INTO' \ | |
>> conf/evolutions/default/2.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment