diff --git a/dev/scripts/database/schema.reset.sh b/dev/scripts/database/schema.reset.sh index 1d59567d..c1c96bff 100755 --- a/dev/scripts/database/schema.reset.sh +++ b/dev/scripts/database/schema.reset.sh @@ -93,12 +93,14 @@ fi # Generate a Start.sql file using the user-provided schema name. cat <<-EOF > $MAGMA_RES_SQL/Start.sql +SET SQL_SAFE_UPDATES = 0; DROP DATABASE IF EXISTS \`${MYSQL_SCHEMA}\`; CREATE DATABASE IF NOT EXISTS \`${MYSQL_SCHEMA}\`; +SET SQL_SAFE_UPDATES = 0; USE \`${MYSQL_SCHEMA}\`; - SET SESSION sql_mode = 'ALLOW_INVALID_DATES'; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; +SET SQL_SAFE_UPDATES = 0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; EOF