Fix custom db name bug (#304)
Co-authored-by: papacarlo <builder@onlyoffice.com>
This commit is contained in:
parent
bdef500858
commit
9e63609c14
|
@ -329,20 +329,12 @@ create_db_tbl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
create_postgresql_tbl() {
|
create_postgresql_tbl() {
|
||||||
CONNECTION_PARAMS="-h$DB_HOST -p$DB_PORT -U$DB_USER -w"
|
|
||||||
if [ -n "$DB_PWD" ]; then
|
if [ -n "$DB_PWD" ]; then
|
||||||
export PGPASSWORD=$DB_PWD
|
export PGPASSWORD=$DB_PWD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PSQL="psql -q $CONNECTION_PARAMS"
|
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
|
||||||
CREATEDB="createdb $CONNECTION_PARAMS"
|
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
|
||||||
|
|
||||||
# Create db on remote server
|
|
||||||
if $PSQL -lt | cut -d\| -f 1 | grep -qw $DB_NAME | grep 0; then
|
|
||||||
$CREATEDB $DB_NAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
$PSQL -d "$DB_NAME" -f "$APP_DIR/server/schema/postgresql/createdb.sql"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
create_mysql_tbl() {
|
create_mysql_tbl() {
|
||||||
|
|
Loading…
Reference in a new issue