{ "id": "140823", "key": "ALOY-1195", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "16692", "name": "Alloy 1.7.0", "archived": false, "released": true, "releaseDate": "2015-07-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-12-16T12:44:56.000+0000", "created": "2014-12-02T19:46:55.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-12-16T12:44:56.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12600", "name": "Samples & Templates" }, { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "When generating a migration with the Alloy CLI (1.5.1), the generated file has this code:\r\n{noformat}\r\nmigration.up = function(db) {\r\n\r\n};\r\n\r\nmigration.down = function(db) {\r\n\t\r\n};\r\n{noformat}\r\n\r\nBut documentation uses 'migrator' in place of 'db' for the function parameter.\r\n\r\nSince the passed-in object itself has a 'db' parameter, the 'migrator' naming helps to avoid potential confusion.\r\n\r\nmigrator.db.execute(...)\r\n\r\nvs.\r\n\r\ndb.db.execute(...)", "attachment": [], "flagged": false, "summary": "Alloy Migrations: Template up.down functions do not match documentation", "creator": { "name": "axmo", "key": "axmo", "displayName": "Alex Montgomery", "active": true, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 288, "state": "closed", "name": "2014 Sprint 25 Tooling", "startDate": "2014-12-08T17:30:22.215Z", "endDate": "2014-12-20T02:30:00.000Z", "completeDate": "2014-12-29T18:24:09.765Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "334611", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's easy to change the docs to match the generated code, but the report says *\"the 'migrator' naming helps to avoid potential confusion\"*. So, maybe we should consider changing the CLI output to match the docs, rather than the other way around. [~axmo] [~sliang], [~skypanther]?", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-03T19:53:12.000+0000", "updated": "2014-12-03T19:53:12.000+0000" }, { "id": "334614", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I agree, this would make more sense as an update to Alloy. It would be an easy change to make in Alloy, too. Can you convert this to an Alloy ticket?", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-03T19:57:47.000+0000", "updated": "2014-12-03T19:57:47.000+0000" }, { "id": "334617", "author": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moved, thanks Tim. Still assigned to Ben, however.", "updateAuthor": { "name": "tstatler", "key": "tstatler", "displayName": "Tim Statler", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-12-03T20:03:06.000+0000", "updated": "2014-12-03T20:03:06.000+0000" }, { "id": "334620", "author": { "name": "axmo", "key": "axmo", "displayName": "Alex Montgomery", "active": true, "timeZone": "America/Havana" }, "body": "Yes, a change to the Alloy migration template was what I had in mind when creating the ticket.", "updateAuthor": { "name": "axmo", "key": "axmo", "displayName": "Alex Montgomery", "active": true, "timeZone": "America/Havana" }, "created": "2014-12-03T20:09:55.000+0000", "updated": "2014-12-03T20:09:55.000+0000" }, { "id": "334623", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Thanks Alex. We already have an Alloy version in the testing queue. This change will have to be in the next release. But it's a simple change so it shouldn't be a problem.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-03T20:12:09.000+0000", "updated": "2014-12-03T20:12:09.000+0000" }, { "id": "336405", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR: https://github.com/appcelerator/alloy/pull/635 \r\n\r\nFunctional test:\r\n\r\n1. Create a new Alloy project\r\n2. In the project's directory, enter {{alloy generate model foo sql name:text age:integer}} to create a model.\r\n3. Enter {{alloy generate migration foo}}\r\n4. Open the migration file; it will contain empty functions in a form like documented in [the migrations guide|http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Sync_Adapters_and_Migrations-section-36739597_AlloySyncAdaptersandMigrations-Migrations] with arguments named {{migrator}} not db.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-12-15T19:14:31.000+0000", "updated": "2014-12-15T19:14:31.000+0000" }, { "id": "336566", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR merged.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2014-12-16T12:44:56.000+0000", "updated": "2014-12-16T12:44:56.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }