]> git.donarmstrong.com Git - wannabuild.git/commitdiff
add update-schema.sh to auto-commit schema changes
authorDebian wanna-build admins <debian-wb-team@lists.debian.org>
Mon, 7 Feb 2011 18:30:03 +0000 (18:30 +0000)
committerDebian wanna-build admins <debian-wb-team@lists.debian.org>
Mon, 7 Feb 2011 18:30:03 +0000 (18:30 +0000)
schema/update-schema.sh [new file with mode: 0755]

diff --git a/schema/update-schema.sh b/schema/update-schema.sh
new file mode 100755 (executable)
index 0000000..72f2230
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Dump the schema.
+pg_dump --cluster 8.4/wanna-build -s wanna-build > wanna-build.sql
+git add wanna-build.sql
+
+# Dump the roles.
+sudo -u postgres pg_dumpall --cluster 8.4/wanna-build | egrep '^(GRANT.*TO.*BY|CREATE ROLE)' > roles.sql
+git add roles.sql
+
+git commit wanna-build.sql roles.sql -m 'Auto-committed schema changes.'
+