{"action":"created","issue":{"url":"https://api.github.com/repos/learningequality/ka-lite/issues/4099","labels_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4099/labels{/name}","comments_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4099/comments","events_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4099/events","html_url":"https://github.com/learningequality/ka-lite/pull/4099","id":95037001,"number":4099,"title":"Add versioning to database; migrate if version is not current","user":{"login":"MCGallaspy","id":8888020,"avatar_url":"https://avatars.githubusercontent.com/u/8888020?v=3","gravatar_id":"","url":"https://api.github.com/users/MCGallaspy","html_url":"https://github.com/MCGallaspy","followers_url":"https://api.github.com/users/MCGallaspy/followers","following_url":"https://api.github.com/users/MCGallaspy/following{/other_user}","gists_url":"https://api.github.com/users/MCGallaspy/gists{/gist_id}","starred_url":"https://api.github.com/users/MCGallaspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MCGallaspy/subscriptions","organizations_url":"https://api.github.com/users/MCGallaspy/orgs","repos_url":"https://api.github.com/users/MCGallaspy/repos","events_url":"https://api.github.com/users/MCGallaspy/events{/privacy}","received_events_url":"https://api.github.com/users/MCGallaspy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/learningequality/ka-lite/labels/has%20PR","name":"has PR","color":"ededed"},{"url":"https://api.github.com/repos/learningequality/ka-lite/labels/release%20blocker","name":"release blocker","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"benjaoming","id":374612,"avatar_url":"https://avatars.githubusercontent.com/u/374612?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/learningequality/ka-lite/milestones/41","html_url":"https://github.com/learningequality/ka-lite/milestones/0.14.0","labels_url":"https://api.github.com/repos/learningequality/ka-lite/milestones/41/labels","id":795036,"number":41,"title":"0.14.0","description":"","creator":{"login":"aronasorman","id":191955,"avatar_url":"https://avatars.githubusercontent.com/u/191955?v=3","gravatar_id":"","url":"https://api.github.com/users/aronasorman","html_url":"https://github.com/aronasorman","followers_url":"https://api.github.com/users/aronasorman/followers","following_url":"https://api.github.com/users/aronasorman/following{/other_user}","gists_url":"https://api.github.com/users/aronasorman/gists{/gist_id}","starred_url":"https://api.github.com/users/aronasorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronasorman/subscriptions","organizations_url":"https://api.github.com/users/aronasorman/orgs","repos_url":"https://api.github.com/users/aronasorman/repos","events_url":"https://api.github.com/users/aronasorman/events{/privacy}","received_events_url":"https://api.github.com/users/aronasorman/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":418,"state":"open","created_at":"2014-09-18T21:53:07Z","updated_at":"2015-07-14T20:49:52Z","due_on":"2015-07-01T07:00:00Z","closed_at":null},"comments":2,"created_at":"2015-07-14T20:49:52Z","updated_at":"2015-07-14T20:56:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/learningequality/ka-lite/pulls/4099","html_url":"https://github.com/learningequality/ka-lite/pull/4099","diff_url":"https://github.com/learningequality/ka-lite/pull/4099.diff","patch_url":"https://github.com/learningequality/ka-lite/pull/4099.patch"},"body":"Fixes #4069 and learningequality/installers#96.\r\n\r\nEdit: fixes learningequality/installers#96. Gotta trigger those robots."},"comment":{"url":"https://api.github.com/repos/learningequality/ka-lite/issues/comments/121383130","html_url":"https://github.com/learningequality/ka-lite/pull/4099#issuecomment-121383130","issue_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4099","id":121383130,"user":{"login":"MCGallaspy","id":8888020,"avatar_url":"https://avatars.githubusercontent.com/u/8888020?v=3","gravatar_id":"","url":"https://api.github.com/users/MCGallaspy","html_url":"https://github.com/MCGallaspy","followers_url":"https://api.github.com/users/MCGallaspy/followers","following_url":"https://api.github.com/users/MCGallaspy/following{/other_user}","gists_url":"https://api.github.com/users/MCGallaspy/gists{/gist_id}","starred_url":"https://api.github.com/users/MCGallaspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MCGallaspy/subscriptions","organizations_url":"https://api.github.com/users/MCGallaspy/orgs","repos_url":"https://api.github.com/users/MCGallaspy/repos","events_url":"https://api.github.com/users/MCGallaspy/events{/privacy}","received_events_url":"https://api.github.com/users/MCGallaspy/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T20:56:14Z","updated_at":"2015-07-14T20:56:14Z","body":"You're right, setting the database_version should be handled in `setup`. In both your cases, the database will be created for the first time. The use case I wished to address is when a user upgrades from 0.13 to 0.14 without migrating the database (as happens in Windows)."}}