summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cezar-db-import.sh2
-rwxr-xr-xbin/rankings-csv-import.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/cezar-db-import.sh b/bin/cezar-db-import.sh
index 4db5261..c91eeaf 100755
--- a/bin/cezar-db-import.sh
+++ b/bin/cezar-db-import.sh
@@ -1,6 +1,6 @@
#!/bin/bash
DBCONFIG=($(jq -r '.[]' config/import-db.json))
-mysql -h ${DBCONFIG[2]} -P ${DBCONFIG[3]} -u ${DBCONFIG[0]} --password=${DBCONFIG[1]} -e "SET foreign_key_checks = 0;
+mysql --local-infile=1 -h ${DBCONFIG[2]} -P ${DBCONFIG[3]} -u ${DBCONFIG[0]} --password=${DBCONFIG[1]} -e "SET foreign_key_checks = 0;
LOAD DATA LOCAL INFILE '$1'
REPLACE
INTO TABLE players
diff --git a/bin/rankings-csv-import.sh b/bin/rankings-csv-import.sh
index 9eddd82..cf6ec06 100755
--- a/bin/rankings-csv-import.sh
+++ b/bin/rankings-csv-import.sh
@@ -1,6 +1,6 @@
#!/bin/bash
DBCONFIG=($(jq -r '.[]' config/import-db.json))
-mysql -h ${DBCONFIG[2]} -P ${DBCONFIG[3]} -u ${DBCONFIG[0]} --password=${DBCONFIG[1]} -e "SET foreign_key_checks = 0;
+mysql --local-infile=1 -h ${DBCONFIG[2]} -P ${DBCONFIG[3]} -u ${DBCONFIG[0]} --password=${DBCONFIG[1]} -e "SET foreign_key_checks = 0;
DELETE FROM temp_rankings;
LOAD DATA LOCAL INFILE '$1'
REPLACE