diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-25 21:27:17 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-25 21:27:17 +0100 |
commit | c178411209e896db2ca6ba874e877f41fe3ba966 (patch) | |
tree | 020c0ffb7d0acdf68f47e1e97032c414f4c609e8 | |
parent | Fix order of properties on firstseen (diff) | |
download | gentoobrowse-api-c178411209e896db2ca6ba874e877f41fe3ba966.tar.bz2 gentoobrowse-api-c178411209e896db2ca6ba874e877f41fe3ba966.tar.xz gentoobrowse-api-c178411209e896db2ca6ba874e877f41fe3ba966.zip |
Add make file for updating schemagentoobrowse-api-0.4
-rw-r--r-- | gentoobrowse-api/db/database.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gentoobrowse-api/db/database.mk b/gentoobrowse-api/db/database.mk new file mode 100644 index 0000000..c8b68ce --- /dev/null +++ b/gentoobrowse-api/db/database.mk @@ -0,0 +1,13 @@ +.PHONY : database current.sql schema.sql + +database: bin/patch.sql + psql -U gentoo gentoobrowse -qf $< + +bin/current.sql : + mkdir -p bin + pg_dump -U gentoo gentoobrowse -n gentoobrowse -s -E utf8 | grep -v _gentoo > $@ + +bin/patch.sql : bin/current.sql schema.sql + mkdir -p bin + apgdiff --add-transaction bin/current.sql schema.sql | tee $@ + |