Skip to content

Commit

Permalink
Disable foreign keys before changing encoding
Browse files Browse the repository at this point in the history
Hate that it’s mysql specific
  • Loading branch information
infostreams committed May 22, 2019
1 parent 625fcb3 commit 7d3abb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/db-change
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ change_charset()

if [ "${code}" -eq 0 ]; then
# Initial SQL ran successfully
run_sql "${output}"
run_sql "SET FOREIGN_KEY_CHECKS=0; ${output}; SET FOREIGN_KEY_CHECKS=1;"

if [ "${code}" -eq 0 ]; then
echo "${colored_alias}${COLOR_GREEN}Successfully changed character set to '${_charset}' and collation to '${_collation}'.${COLOR_NC}"
Expand Down

0 comments on commit 7d3abb2

Please sign in to comment.