diff --git a/lib/mysql.js b/lib/mysql.js index 8192336..c606211 100644 --- a/lib/mysql.js +++ b/lib/mysql.js @@ -19,6 +19,7 @@ exports.initialize = function initializeSchema(schema, callback) { schema.adapter = new MySQL(schema.client); schema.adapter.schema = schema; + // schema.client.query('SET TIME_ZONE = "+04:00"', callback); schema.client.query('USE `' + s.database + '`', function (err) { if (err && err.message.match(/^unknown database/i)) { @@ -32,6 +33,11 @@ exports.initialize = function initializeSchema(schema, callback) { }); } else callback(); }); + + // MySQL specific column types + schema.types = { + Point: function Point() {} + }; }; /** @@ -528,6 +534,9 @@ function datatype(p) { case 'Boolean': dt = 'TINYINT(1)'; break; + case 'Point': + dt = 'POINT'; + break; } return dt; }