From fd13c219d4cf3757335708c9c7d7a60d053b169f Mon Sep 17 00:00:00 2001 From: Lisa Marie Maginnis <lisam@fsf.org> Date: Sun, 28 Feb 2016 02:23:29 -0500 Subject: [PATCH] added sql to move to utf8 --- files/etc/init.d/install-mediagoblin/DEFAULT | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files/etc/init.d/install-mediagoblin/DEFAULT b/files/etc/init.d/install-mediagoblin/DEFAULT index 0b3986f..dcf7e8e 100755 --- a/files/etc/init.d/install-mediagoblin/DEFAULT +++ b/files/etc/init.d/install-mediagoblin/DEFAULT @@ -4,6 +4,12 @@ cd GMG_PATH_TOKEN if [ ! -d mediagoblin ]; then # Create the GMG user + sudo -u poostgres psql -c "UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1'" + sudo -u poostgres psql -c "DROP DATABASE template1" + sudo -u poostgres psql -c "CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING='UNICODE' LC_COLLATE='en_US.UTF8' LC_CTYPE='en_US.UTF8'" + sudo -u poostgres psql -c "UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1'" + sudo -u poostgres psql -c "UPDATE pg_database SET datallowconn = FALSE WHERE datname = 'template1'" + sudo -u postgres createuser -A -D mediagoblin # Crea te GMG database sudo -u postgres createdb -E UNICODE -O mediagoblin mediagoblin -- 2.25.1