From 34ecd07b1bf746211fbe34b777f5ca810fa690e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Thu, 14 Feb 2019 17:30:17 +0100 Subject: [PATCH] Modify migrate for development environment --- neo4j/migrate.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/neo4j/migrate.sh b/neo4j/migrate.sh index 30a58c306..cdb9ec46c 100755 --- a/neo4j/migrate.sh +++ b/neo4j/migrate.sh @@ -1,4 +1,8 @@ #!/usr/bin/env bash set -e -echo "CALL dbms.security.changePassword('${NEO4J_PASSWORD}');" | cypher-shell --username neo4j --password neo4j -echo 'CALL db.index.fulltext.createNodeIndex("full_text_search",["Post"],["title", "content"]);' | cypher-shell --username neo4j --password $NEO4J_PASSWORD +if [[ -z "${NEO4J_PASSWORD}" ]]; then + echo 'CALL db.index.fulltext.createNodeIndex("full_text_search",["Post"],["title", "content"]);' | cypher-shell +else + echo "CALL dbms.security.changePassword('${NEO4J_PASSWORD}');" | cypher-shell --username neo4j --password neo4j + echo 'CALL db.index.fulltext.createNodeIndex("full_text_search",["Post"],["title", "content"]);' | cypher-shell --username neo4j --password $NEO4J_PASSWORD +fi