{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/846","labels_url":"https://api.github.com/repos/balderdashy/waterline/issues/846/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/waterline/issues/846/comments","events_url":"https://api.github.com/repos/balderdashy/waterline/issues/846/events","html_url":"https://github.com/balderdashy/waterline/issues/846","id":58366575,"number":846,"title":"[Feature Request] New migration strategy: \"create\"","user":{"login":"dmarcelino","id":1280446,"avatar_url":"https://avatars.githubusercontent.com/u/1280446?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarcelino","html_url":"https://github.com/dmarcelino","followers_url":"https://api.github.com/users/dmarcelino/followers","following_url":"https://api.github.com/users/dmarcelino/following{/other_user}","gists_url":"https://api.github.com/users/dmarcelino/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarcelino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarcelino/subscriptions","organizations_url":"https://api.github.com/users/dmarcelino/orgs","repos_url":"https://api.github.com/users/dmarcelino/repos","events_url":"https://api.github.com/users/dmarcelino/events{/privacy}","received_events_url":"https://api.github.com/users/dmarcelino/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-20T15:20:48Z","updated_at":"2015-03-11T05:48:04Z","closed_at":"2015-03-11T05:48:04Z","body":"Hi,\r\n\r\nI've started to play with \"migratable\" interface on [waterline-orientdb](https://github.com/appscot/waterline-orientdb) and one of the things I've noticed is that \"migratable\" doesn't have an option to \"safely alter\" the database. By this I mean not performing any destructive operations (drops) but creating any tables/columns (through `define()`/`addAttribute()`) that were added to the schema. I believe such strategy would make sense, even in production as most times we want new tables/columns to be added. The advantage of such strategy in production is reducing manual intervention (which is error prone).\r\n\r\nTo give an example from real life, in my previous job (a multinational bank), we would rarely drop tables or delete columns from shared databases (few would bother with the risk, bureaucracy, chasing other teams, etc) but we would frequently add tables and columns.\r\n\r\nI suggest we add a new strategy called `create` that will only perform the additive operations. I say \"we\" as I don't mind contributing to this provided the maintainers agree to the change.\r\n\r\nPS: I've searched for this in the issues but couldn't find anything, if there is an issue on the same topic redirect me and I'll comment there.\r\nPPS: Initially I called this strategy \"alter-safe\" but after sleeping on it (literally) I arrived to the conclusion that \"create\" is a better name and falls in nicely with the other strategies : `drop`, `alter`, `create`, `safe`."},"comment":{"url":"https://api.github.com/repos/balderdashy/waterline/issues/comments/78208848","html_url":"https://github.com/balderdashy/waterline/issues/846#issuecomment-78208848","issue_url":"https://api.github.com/repos/balderdashy/waterline/issues/846","id":78208848,"user":{"login":"particlebanana","id":370260,"avatar_url":"https://avatars.githubusercontent.com/u/370260?v=3","gravatar_id":"","url":"https://api.github.com/users/particlebanana","html_url":"https://github.com/particlebanana","followers_url":"https://api.github.com/users/particlebanana/followers","following_url":"https://api.github.com/users/particlebanana/following{/other_user}","gists_url":"https://api.github.com/users/particlebanana/gists{/gist_id}","starred_url":"https://api.github.com/users/particlebanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/particlebanana/subscriptions","organizations_url":"https://api.github.com/users/particlebanana/orgs","repos_url":"https://api.github.com/users/particlebanana/repos","events_url":"https://api.github.com/users/particlebanana/events{/privacy}","received_events_url":"https://api.github.com/users/particlebanana/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T05:48:04Z","updated_at":"2015-03-11T05:48:04Z","body":"merged"}}