summaryrefslogtreecommitdiffstats
path: root/main/acf-weblog/acf-weblog.post-upgrade
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-07 12:49:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-07 12:49:22 +0000
commitc03f98fabc089e021d54144b32da5ed94d96dd26 (patch)
tree6be5582fb38ca8cbde621f94bd3a7a46c0ebe275 /main/acf-weblog/acf-weblog.post-upgrade
parentf9571415138bb58380471de7aa022a4ce46915f8 (diff)
downloadaports-c03f98fabc089e021d54144b32da5ed94d96dd26.tar.bz2
aports-c03f98fabc089e021d54144b32da5ed94d96dd26.tar.xz
main/acf-weblog: upgrade to 0.4.0
Diffstat (limited to 'main/acf-weblog/acf-weblog.post-upgrade')
-rw-r--r--main/acf-weblog/acf-weblog.post-upgrade21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/acf-weblog/acf-weblog.post-upgrade b/main/acf-weblog/acf-weblog.post-upgrade
new file mode 100644
index 000000000..325f8cb32
--- /dev/null
+++ b/main/acf-weblog/acf-weblog.post-upgrade
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+new=$1
+old=$2
+
+if ! [ "$(apk version -t $old 0.4.0)" = "<" ]; then
+ exit 0
+fi
+
+
+psql -U postgres -c "ALTER TABLE weblog ADD COLUMN shortreason text" \
+ webproxylog
+psql -U postgres -c "ALTER TABLE pubweblog ADD COLUMN shortreason text" \
+ webproxylog
+psql -U postgres -c "ALTER TABLE pubblocklog ADD COLUMN shortreason text" \
+ webproxylog
+psql -U postgres -c "ALTER TABLE blocklog ADD COLUMN shortreason text" \
+ webproxylog
+
+exit 0
+