JBAS-2098 Dev DB builder schema-only option
authorBill Erickson <berickxx@gmail.com>
Fri, 31 Aug 2018 15:21:23 +0000 (11:21 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Note the script must be manually modified for now, pending support for
getopt.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/sample-data/tools/create-dev-db.sh

index 68c4910..e976419 100755 (executable)
@@ -7,6 +7,7 @@
 # development data export
 # -------------------------------------------------------------------
 set -euo pipefail
+SCHEMA_ONLY=''
 
 if [ ! $(which sqitch) ]; then
     echo "Could not find 'sqitch'."
@@ -28,8 +29,11 @@ echo "Deploying base schema"
 cd ../../schema
 sqitch --db-user evergreen deploy
 
-# deploy sample data
-echo "Deploying sample data"
-cd ../sample-data
-sqitch --db-user evergreen deploy --set exportdir="'$PWD/exports'"
+if [ -z "$SCHEMA_ONLY" ]; then
+
+    # deploy sample data
+    echo "Deploying sample data"
+    cd ../sample-data
+    sqitch --db-user evergreen deploy --set exportdir="'$PWD/exports'"
+fi;