From: Debian wanna-build admins Date: Mon, 7 Feb 2011 18:30:03 +0000 (+0000) Subject: add update-schema.sh to auto-commit schema changes X-Git-Url: https://git.donarmstrong.com/?p=wannabuild.git;a=commitdiff_plain;h=4f9e76c2aece92a0bc59579c8d1f55d9a54a174d add update-schema.sh to auto-commit schema changes --- diff --git a/schema/update-schema.sh b/schema/update-schema.sh new file mode 100755 index 0000000..72f2230 --- /dev/null +++ b/schema/update-schema.sh @@ -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.' +