{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/22481002","id":22481002,"diff_hunk":"@@ -238,9 +238,7 @@ public override void Generate(CreateDatabaseOperation createDatabaseOperation, I\n             Check.NotNull(stringBuilder, \"stringBuilder\");\n \n             stringBuilder\n-                .Append(\"CreateDatabase(\")\n-                .Append(GenerateLiteral(createDatabaseOperation.DatabaseName))\n-                .Append(\")\");\n+                .Append(\"CreateDatabaseIfNotExists()\");","path":"src/EntityFramework.Commands/Migrations/CSharpMigrationCodeGenerator.cs","position":7,"original_position":7,"commit_id":"2633b6b8438a9d4ea09573e5e2e0e808b7935991","original_commit_id":"2633b6b8438a9d4ea09573e5e2e0e808b7935991","user":{"login":"rowanmiller","id":4741851,"avatar_url":"https://avatars.githubusercontent.com/u/4741851?v=3","gravatar_id":"","url":"https://api.github.com/users/rowanmiller","html_url":"https://github.com/rowanmiller","followers_url":"https://api.github.com/users/rowanmiller/followers","following_url":"https://api.github.com/users/rowanmiller/following{/other_user}","gists_url":"https://api.github.com/users/rowanmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/rowanmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rowanmiller/subscriptions","organizations_url":"https://api.github.com/users/rowanmiller/orgs","repos_url":"https://api.github.com/users/rowanmiller/repos","events_url":"https://api.github.com/users/rowanmiller/events{/privacy}","received_events_url":"https://api.github.com/users/rowanmiller/received_events","type":"User","site_admin":false},"body":"Within the generated code none of the other operations are idempotent (i.e. CreateTable will fail if there is already a table with that name). \r\n\r\nWe discussed with @divega and @ajcvickers and we had agreed on CreateDatabaseIfNotExists name... but not sure how strongly they feel about it. I prefer to call it out, but I'm not super opposed to just calling it CreateDatabase if others agree.","created_at":"2015-01-05T18:57:55Z","updated_at":"2015-01-05T18:57:55Z","html_url":"https://github.com/aspnet/EntityFramework/pull/1354#discussion_r22481002","pull_request_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354","_links":{"self":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/22481002"},"html":{"href":"https://github.com/aspnet/EntityFramework/pull/1354#discussion_r22481002"},"pull_request":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354","id":26841680,"html_url":"https://github.com/aspnet/EntityFramework/pull/1354","diff_url":"https://github.com/aspnet/EntityFramework/pull/1354.diff","patch_url":"https://github.com/aspnet/EntityFramework/pull/1354.patch","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1354","number":1354,"state":"open","locked":false,"title":"Databases are now only created if explicitly specified in the initial migration","user":{"login":"lukewaters","id":1403604,"avatar_url":"https://avatars.githubusercontent.com/u/1403604?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewaters","html_url":"https://github.com/lukewaters","followers_url":"https://api.github.com/users/lukewaters/followers","following_url":"https://api.github.com/users/lukewaters/following{/other_user}","gists_url":"https://api.github.com/users/lukewaters/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewaters/subscriptions","organizations_url":"https://api.github.com/users/lukewaters/orgs","repos_url":"https://api.github.com/users/lukewaters/repos","events_url":"https://api.github.com/users/lukewaters/events{/privacy}","received_events_url":"https://api.github.com/users/lukewaters/received_events","type":"User","site_admin":false},"body":" EF now scripts idempotent database creation code for migrations and only executes database creation when the line is present in the initial migration.","created_at":"2015-01-05T18:35:02Z","updated_at":"2015-01-05T18:57:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f742ee05300704f1b04c58e02419e23d6c4ac01c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354/commits","review_comments_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354/comments","review_comment_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/1354/comments","statuses_url":"https://api.github.com/repos/aspnet/EntityFramework/statuses/2633b6b8438a9d4ea09573e5e2e0e808b7935991","head":{"label":"lukewaters:AddCreateIfNotExists","ref":"AddCreateIfNotExists","sha":"2633b6b8438a9d4ea09573e5e2e0e808b7935991","user":{"login":"lukewaters","id":1403604,"avatar_url":"https://avatars.githubusercontent.com/u/1403604?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewaters","html_url":"https://github.com/lukewaters","followers_url":"https://api.github.com/users/lukewaters/followers","following_url":"https://api.github.com/users/lukewaters/following{/other_user}","gists_url":"https://api.github.com/users/lukewaters/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewaters/subscriptions","organizations_url":"https://api.github.com/users/lukewaters/orgs","repos_url":"https://api.github.com/users/lukewaters/repos","events_url":"https://api.github.com/users/lukewaters/events{/privacy}","received_events_url":"https://api.github.com/users/lukewaters/received_events","type":"User","site_admin":false},"repo":{"id":24731371,"name":"EntityFramework","full_name":"lukewaters/EntityFramework","owner":{"login":"lukewaters","id":1403604,"avatar_url":"https://avatars.githubusercontent.com/u/1403604?v=3","gravatar_id":"","url":"https://api.github.com/users/lukewaters","html_url":"https://github.com/lukewaters","followers_url":"https://api.github.com/users/lukewaters/followers","following_url":"https://api.github.com/users/lukewaters/following{/other_user}","gists_url":"https://api.github.com/users/lukewaters/gists{/gist_id}","starred_url":"https://api.github.com/users/lukewaters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukewaters/subscriptions","organizations_url":"https://api.github.com/users/lukewaters/orgs","repos_url":"https://api.github.com/users/lukewaters/repos","events_url":"https://api.github.com/users/lukewaters/events{/privacy}","received_events_url":"https://api.github.com/users/lukewaters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lukewaters/EntityFramework","description":"","fork":true,"url":"https://api.github.com/repos/lukewaters/EntityFramework","forks_url":"https://api.github.com/repos/lukewaters/EntityFramework/forks","keys_url":"https://api.github.com/repos/lukewaters/EntityFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lukewaters/EntityFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lukewaters/EntityFramework/teams","hooks_url":"https://api.github.com/repos/lukewaters/EntityFramework/hooks","issue_events_url":"https://api.github.com/repos/lukewaters/EntityFramework/issues/events{/number}","events_url":"https://api.github.com/repos/lukewaters/EntityFramework/events","assignees_url":"https://api.github.com/repos/lukewaters/EntityFramework/assignees{/user}","branches_url":"https://api.github.com/repos/lukewaters/EntityFramework/branches{/branch}","tags_url":"https://api.github.com/repos/lukewaters/EntityFramework/tags","blobs_url":"https://api.github.com/repos/lukewaters/EntityFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lukewaters/EntityFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lukewaters/EntityFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/lukewaters/EntityFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lukewaters/EntityFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/lukewaters/EntityFramework/languages","stargazers_url":"https://api.github.com/repos/lukewaters/EntityFramework/stargazers","contributors_url":"https://api.github.com/repos/lukewaters/EntityFramework/contributors","subscribers_url":"https://api.github.com/repos/lukewaters/EntityFramework/subscribers","subscription_url":"https://api.github.com/repos/lukewaters/EntityFramework/subscription","commits_url":"https://api.github.com/repos/lukewaters/EntityFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/lukewaters/EntityFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/lukewaters/EntityFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/lukewaters/EntityFramework/issues/comments/{number}","contents_url":"https://api.github.com/repos/lukewaters/EntityFramework/contents/{+path}","compare_url":"https://api.github.com/repos/lukewaters/EntityFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lukewaters/EntityFramework/merges","archive_url":"https://api.github.com/repos/lukewaters/EntityFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lukewaters/EntityFramework/downloads","issues_url":"https://api.github.com/repos/lukewaters/EntityFramework/issues{/number}","pulls_url":"https://api.github.com/repos/lukewaters/EntityFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/lukewaters/EntityFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/lukewaters/EntityFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lukewaters/EntityFramework/labels{/name}","releases_url":"https://api.github.com/repos/lukewaters/EntityFramework/releases{/id}","created_at":"2014-10-02T18:35:08Z","updated_at":"2015-01-05T18:02:19Z","pushed_at":"2015-01-05T18:27:19Z","git_url":"git://github.com/lukewaters/EntityFramework.git","ssh_url":"git@github.com:lukewaters/EntityFramework.git","clone_url":"https://github.com/lukewaters/EntityFramework.git","svn_url":"https://github.com/lukewaters/EntityFramework","homepage":null,"size":10556,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"3ea8f1a4309742cae407938146fea5f60d4065a7","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16157746,"name":"EntityFramework","full_name":"aspnet/EntityFramework","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/EntityFramework","description":"Microsoft's recommended data access technology for new applications in .NET.","fork":false,"url":"https://api.github.com/repos/aspnet/EntityFramework","forks_url":"https://api.github.com/repos/aspnet/EntityFramework/forks","keys_url":"https://api.github.com/repos/aspnet/EntityFramework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/EntityFramework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/EntityFramework/teams","hooks_url":"https://api.github.com/repos/aspnet/EntityFramework/hooks","issue_events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/EntityFramework/events","assignees_url":"https://api.github.com/repos/aspnet/EntityFramework/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/EntityFramework/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/EntityFramework/tags","blobs_url":"https://api.github.com/repos/aspnet/EntityFramework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/EntityFramework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/EntityFramework/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/EntityFramework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/EntityFramework/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/EntityFramework/languages","stargazers_url":"https://api.github.com/repos/aspnet/EntityFramework/stargazers","contributors_url":"https://api.github.com/repos/aspnet/EntityFramework/contributors","subscribers_url":"https://api.github.com/repos/aspnet/EntityFramework/subscribers","subscription_url":"https://api.github.com/repos/aspnet/EntityFramework/subscription","commits_url":"https://api.github.com/repos/aspnet/EntityFramework/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/EntityFramework/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/{number}","contents_url":"https://api.github.com/repos/aspnet/EntityFramework/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/EntityFramework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/EntityFramework/merges","archive_url":"https://api.github.com/repos/aspnet/EntityFramework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/EntityFramework/downloads","issues_url":"https://api.github.com/repos/aspnet/EntityFramework/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/EntityFramework/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/EntityFramework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/EntityFramework/releases{/id}","created_at":"2014-01-23T00:52:01Z","updated_at":"2015-01-05T18:00:21Z","pushed_at":"2015-01-05T17:26:20Z","git_url":"git://github.com/aspnet/EntityFramework.git","ssh_url":"git@github.com:aspnet/EntityFramework.git","clone_url":"https://github.com/aspnet/EntityFramework.git","svn_url":"https://github.com/aspnet/EntityFramework","homepage":"","size":35406,"stargazers_count":1137,"watchers_count":1137,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":268,"mirror_url":null,"open_issues_count":346,"forks":268,"open_issues":346,"watchers":1137,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354"},"html":{"href":"https://github.com/aspnet/EntityFramework/pull/1354"},"issue":{"href":"https://api.github.com/repos/aspnet/EntityFramework/issues/1354"},"comments":{"href":"https://api.github.com/repos/aspnet/EntityFramework/issues/1354/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/aspnet/EntityFramework/pulls/1354/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/EntityFramework/statuses/2633b6b8438a9d4ea09573e5e2e0e808b7935991"}}}}