masterrecord 0.3.54 → 0.3.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154,6 +154,7 @@ class schema{
154
154
  await this._ensureReady();
155
155
  if(table){
156
156
  this.fullTable = table.___table;
157
+ this._tableObj = table;
157
158
  }
158
159
  }
159
160
 
@@ -490,7 +491,8 @@ class schema{
490
491
  if(this.context.isSQLite){
491
492
  var sqliteQuery = require("./migrationSQLiteQuery");
492
493
  var queryBuilder = new sqliteQuery();
493
- var queryObj = queryBuilder.alterColumn(this.fullTable.new, table);
494
+ var tableSchema = (this._tableObj && this._tableObj[table.tableName]) || this.fullTable.new;
495
+ var queryObj = queryBuilder.alterColumn(tableSchema, table);
494
496
  for (var key in queryObj) {
495
497
  var query = queryObj[key];
496
498
  await this.context._execute(query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "masterrecord",
3
- "version": "0.3.54",
3
+ "version": "0.3.55",
4
4
  "description": "An Object-relational mapping for the Master framework. Master Record connects classes to relational database tables to establish a database with almost zero-configuration ",
5
5
  "main": "MasterRecord.js",
6
6
  "bin": {