altered mysql code to use mediumblob instead of blob to avoid 64k limit

This commit is contained in:
Brad Rydzewski 2014-10-26 10:17:17 -07:00
parent 1fd1c5e292
commit cbd5ef2874

View file

@ -13,6 +13,7 @@ func transform(stmt string) string {
switch meddler.Default { switch meddler.Default {
case meddler.MySQL: case meddler.MySQL:
stmt = strings.Replace(stmt, "AUTOINCREMENT", "AUTO_INCREMENT", -1) stmt = strings.Replace(stmt, "AUTOINCREMENT", "AUTO_INCREMENT", -1)
stmt = strings.Replace(stmt, "BLOB", "MEDIUMBLOB", -1)
case meddler.PostgreSQL: case meddler.PostgreSQL:
stmt = strings.Replace(stmt, "INTEGER PRIMARY KEY AUTOINCREMENT", "SERIAL PRIMARY KEY", -1) stmt = strings.Replace(stmt, "INTEGER PRIMARY KEY AUTOINCREMENT", "SERIAL PRIMARY KEY", -1)
stmt = strings.Replace(stmt, "BLOB", "BYTEA", -1) stmt = strings.Replace(stmt, "BLOB", "BYTEA", -1)