Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1278] Pass model config to migration functions

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2017-05-09T19:23:31.000+0000
Affected Version/sAlloy 1.6.0
Fix Version/sRelease 6.2.3
ComponentsModels
Labelsalloy, migration, sqlite
ReporterFar
AssigneeRadamantis Torres-Lechuga
Created2015-05-06T23:05:04.000+0000
Updated2017-07-24T18:05:01.000+0000

Description

It will be nice if sql sync adapter will pass model config to migration functions. It will get access to model columns inside migration for example.
migration.up = function(migrator, config) {
    migrator.createTable(config);
    // other migration actions
};
Community PR: https://github.com/appcelerator/alloy/pull/684

Comments

  1. Feon Sua Xin Miao 2017-05-09

    PR merged.
  2. Abir Mukherjee 2017-07-24

    Node Version: 6.10.3 NPM Version: 3.10.10 Mac OS: 10.12.4 Appc CLI: 6.2.3-master.21 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.1.1.GA Validated fix with test app provided by development using the above environment.

JSON Source