create : Creates the tables. The target database should be empty
migrate : Migrates the database to the latest version or creates the tables if the database is empty. Use "info" to see the current version and the pending migrations
info : Shows the list of migrations applied and the pending migration waiting to be applied on the target database
validate : Checks if the all the migrations haven been applied on the target database
drop : Drops all the tables in the target database
drop-create : Drops and recreates all the tables in the target database.
repair : Repairs the DATABASE_CHANGE_LOG table which is used to track all the migrations on the target database.
This involves removing entries for the failed migrations and update the checksum of migrations already applied on the target databsase.
check-connection : Checks if a connection can be sucessfully obtained for the target database
EOF
}
if[$# -gt 1]
then
echo"More than one argument specified, please use only one of the below options"
printUsage
exit1
fi
opt="$1"
case"${opt}" in
create | drop | migrate | info | validate | repair | check-connection )