Skip to content

Commit 4eb0bd2

Browse files
committed
simplify the creation of an empty baseline
Signed-off-by: Qun Li <qun.li@zstack.io>
1 parent e29b07e commit 4eb0bd2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

conf/deploydb.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ url="jdbc:mysql://$host:$port/zstack"
4848
bash $flyway -user=$user -password=$password -url=$url clean
4949

5050
# create baseline and clean its contents for 'beforeValidate.sql'
51-
mysql_run -se "SELECT table_name FROM information_schema.tables WHERE table_name = 'schema_version'" | \
52-
grep -wq schema_version || \
53-
( bash $flyway -user=$user -password=$password -url=$url baseline; mysql_run zstack -e "DELETE FROM schema_version" )
51+
bash $flyway -user=$user -password=$password -url=$url baseline
52+
mysql_run zstack -e "DELETE FROM schema_version"
5453

5554
bash $flyway -user=$user -password=$password -url=$url migrate
5655

0 commit comments

Comments
 (0)