devops tenant api

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2019-04-23 20:47:47 +08:00
committed by zryfish
parent 78f2dab18c
commit 5a6f51d775
143 changed files with 19533 additions and 341 deletions

17
pkg/db/scripts/ddl_init.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
cd /flyway/sql/ddl
[ -n "$PASSWORD" ] && OPT="-p$(echo "$PASSWORD" | tr -d '\n')"
for F in $(ls *.sql)
do
echo "Start process $F"
mysql "$@" "$OPT" < "$F"
if [ $? -ne 0 ]; then
echo "Process $F failed"
return 1
else
echo "Process $F successful"
fi
done