{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/466","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/466/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/466/comments","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/466/events","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/466","id":58661312,"number":466,"title":"Add fine-grained migration APIs","user":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/3.0","name":"3.0","color":"eeeeee"},{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels/api/ux","name":"api/ux","color":"eeeeee"}],"state":"open","locked":false,"assignee":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/milestones/29","html_url":"https://github.com/strongloop/loopback-datasource-juggler/milestones/%23Epic:%20Connector%20Refactor","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/milestones/29/labels","id":1013207,"number":29,"title":"#Epic: Connector Refactor","description":null,"creator":{"login":"altsang","id":2261105,"avatar_url":"https://avatars.githubusercontent.com/u/2261105?v=3","gravatar_id":"","url":"https://api.github.com/users/altsang","html_url":"https://github.com/altsang","followers_url":"https://api.github.com/users/altsang/followers","following_url":"https://api.github.com/users/altsang/following{/other_user}","gists_url":"https://api.github.com/users/altsang/gists{/gist_id}","starred_url":"https://api.github.com/users/altsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altsang/subscriptions","organizations_url":"https://api.github.com/users/altsang/orgs","repos_url":"https://api.github.com/users/altsang/repos","events_url":"https://api.github.com/users/altsang/events{/privacy}","received_events_url":"https://api.github.com/users/altsang/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":3,"state":"open","created_at":"2015-03-09T18:36:54Z","updated_at":"2015-06-01T16:24:01Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-02-23T22:36:33Z","updated_at":"2016-01-19T08:13:42Z","closed_at":null,"body":"LB supports `automigrate` and `autoupdate` today. It will be useful to expose more fine-grained apis so that application developers can have better control of the process. "},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/172771475","html_url":"https://github.com/strongloop/loopback-datasource-juggler/issues/466#issuecomment-172771475","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/466","id":172771475,"user":{"login":"alFReD-NSH","id":822510,"avatar_url":"https://avatars.githubusercontent.com/u/822510?v=3","gravatar_id":"","url":"https://api.github.com/users/alFReD-NSH","html_url":"https://github.com/alFReD-NSH","followers_url":"https://api.github.com/users/alFReD-NSH/followers","following_url":"https://api.github.com/users/alFReD-NSH/following{/other_user}","gists_url":"https://api.github.com/users/alFReD-NSH/gists{/gist_id}","starred_url":"https://api.github.com/users/alFReD-NSH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alFReD-NSH/subscriptions","organizations_url":"https://api.github.com/users/alFReD-NSH/orgs","repos_url":"https://api.github.com/users/alFReD-NSH/repos","events_url":"https://api.github.com/users/alFReD-NSH/events{/privacy}","received_events_url":"https://api.github.com/users/alFReD-NSH/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T08:13:42Z","updated_at":"2016-01-19T08:13:42Z","body":"I'm also using postgres and I would love the following functionalities in autoupdate(Of course all optional): \r\n\r\n- Old columns are not deleted, and if they have `NOT NULL`(required property/column), `NOT NULL` should be dropped(so that new data will work fine without it).\r\n- If column has a type change, then the old column should be renamed so the old data is not removed, mentioned in here: strongloop/loopback#1942\r\n- If column has a type change, the old data is casted to the new type whenever possible.\r\n- A dry-run mode where the connector will only return a string which is the sql changes to be made without executing them, mentioned in here: strongloop/loopback#207\r\n- If a new column is required and has a default value, then all the rows should have that default values(right now it fails), mentioned in here: strongloop/loopback-connector-postgresql#123."}}