Skip to content
Snippets Groups Projects
Commit abf4b9ca authored by Robert Anderson's avatar Robert Anderson
Browse files

Added mysql 5.5 support

TYPE was removed and replaced by ENGINE in mysql 5.5
parent cc53c2bf
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ display_usage() { ...@@ -27,6 +27,7 @@ display_usage() {
echo "Usage: $0 <database type> <file> [prefix]" echo "Usage: $0 <database type> <file> [prefix]"
echo echo
echo "Valid database types:" echo "Valid database types:"
echo " mysql55 - For MySQL v5.5"
echo " mysql4 - For MySQL v4" echo " mysql4 - For MySQL v4"
echo " mysql - For MySQL v5" echo " mysql - For MySQL v5"
echo " pgsql - For PostgreSQL" echo " pgsql - For PostgreSQL"
...@@ -53,6 +54,19 @@ fi ...@@ -53,6 +54,19 @@ fi
# Check what we converting for # Check what we converting for
case "$database" in case "$database" in
"mysql55")
sed \
-e "s/@PREFIX@/$prefix/g" \
-e 's/@PRELOAD@/SET FOREIGN_KEY_CHECKS=0;/' \
-e 's/@POSTLOAD@/SET FOREIGN_KEY_CHECKS=1;/' \
-e 's/@CREATE_TABLE_SUFFIX@/ENGINE=InnoDB CHARACTER SET latin1 COLLATE latin1_bin/' \
-e 's/@SERIAL_TYPE@/SERIAL/' \
-e 's/@BIGINT_UNSIGNED@/BIGINT UNSIGNED/' \
-e 's/@INT_UNSIGNED@/INT UNSIGNED/' \
-e 's/@TRACK_KEY_LEN@/512/' \
-e 's/@SERIAL_REF_TYPE@/BIGINT UNSIGNED/' < "$file"
;;
"mysql4") "mysql4")
sed \ sed \
-e "s/@PREFIX@/$prefix/g" \ -e "s/@PREFIX@/$prefix/g" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment