Rework configuration handling
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
# localhost
|
||||
export PSQL_OPTS="-h localhost -U root"
|
||||
|
||||
# Prod
|
||||
#export PSQL_OPTS="-h PRODUCTION.SERVER.URL -U root"
|
||||
#export DB_NAME=DATABASE_NAME
|
||||
@@ -1 +1,2 @@
|
||||
.configuration.sh
|
||||
env/*.conf
|
||||
|
||||
+7
-1
@@ -1,6 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
source .configuration.sh
|
||||
|
||||
DB_ENVIRONMENT=$1
|
||||
if [ -z $DB_ENVIRONMENT ] ; then
|
||||
DB_ENVIRONMENT="default"
|
||||
fi
|
||||
|
||||
source env/$DB_ENVIRONMENT.conf
|
||||
|
||||
function add-version() {
|
||||
psql $PSQL_OPTS -c "update database_versions set is_active = false where is_active = true" $DB_NAME
|
||||
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
export PSQL_OPTS="-h localhost -U root"
|
||||
export DB_NAME=photowall
|
||||
Reference in New Issue
Block a user