Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

Commit 3aa85d4

Browse files
AmmarpadMatmaRex
authored andcommitted
Add if exists guard to DROP DATABASE command
This script can sometimes be called when the database is not yet created, currently it spits out errors
1 parent 7abad9c commit 3aa85d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deletewiki.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -ex
44
rm -rf $PATCHDEMO/wikis/$WIKI
55

66
# delete database
7-
mysql -u patchdemo --password=patchdemo -e "DROP DATABASE patchdemo_$WIKI";
7+
mysql -u patchdemo --password=patchdemo -e "DROP DATABASE IF EXISTS patchdemo_$WIKI";

0 commit comments

Comments
 (0)