{"action":"created","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/829","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/829/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/829/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/829/events","html_url":"https://github.com/npgsql/npgsql/issues/829","id":112335942,"number":829,"title":"error: 42883: function uuid_generate_v4() does not exist","user":{"login":"raditch","id":6491501,"avatar_url":"https://avatars.githubusercontent.com/u/6491501?v=3","gravatar_id":"","url":"https://api.github.com/users/raditch","html_url":"https://github.com/raditch","followers_url":"https://api.github.com/users/raditch/followers","following_url":"https://api.github.com/users/raditch/following{/other_user}","gists_url":"https://api.github.com/users/raditch/gists{/gist_id}","starred_url":"https://api.github.com/users/raditch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raditch/subscriptions","organizations_url":"https://api.github.com/users/raditch/orgs","repos_url":"https://api.github.com/users/raditch/repos","events_url":"https://api.github.com/users/raditch/events{/privacy}","received_events_url":"https://api.github.com/users/raditch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T10:26:04Z","updated_at":"2015-10-21T07:40:54Z","closed_at":null,"body":"Maybe to fix it NpgsqlMigrationSqlGenerator can call create extension \"uuid-ossp\" somewhere after create schema?\r\n\r\nMinimal test to reproduce:\r\n\r\n\tpublic class Foo\r\n\t{\r\n\t\t// if comment out line below - the test works\r\n\t\t[DatabaseGenerated(DatabaseGeneratedOption.Identity)]\r\n\t\t[Key]\r\n\t\tpublic Guid Id { get; set; }\r\n\t}\r\n\r\n\tpublic class MyContext : DbContext\r\n\t{\r\n\t\tpublic DbSet<Foo> Foos { get; set; }\r\n\t\tprotected override void OnModelCreating(DbModelBuilder modelBuilder)\r\n\t\t{\r\n\t\t\tmodelBuilder.HasDefaultSchema(\"public\");\r\n\t\t\tbase.OnModelCreating(modelBuilder);\r\n\t\t}\r\n\t}\r\n\r\n\t[TestClass]\r\n\tpublic class PgFixture\r\n\t{\r\n\t\t[TestMethod]\r\n\t\tpublic void GuidIdentityColumnTest()\r\n\t\t{\r\n\t\t\tDatabase.SetInitializer(new DropCreateDatabaseAlways<MyContext>());\r\n\t\t\tusing (var context = new MyContext())\r\n\t\t\t{\r\n\t\t\t\tcontext.Foos.Add(new Foo());\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n"},"comment":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/comments/149806185","html_url":"https://github.com/npgsql/npgsql/issues/829#issuecomment-149806185","issue_url":"https://api.github.com/repos/npgsql/npgsql/issues/829","id":149806185,"user":{"login":"roji","id":1862641,"avatar_url":"https://avatars.githubusercontent.com/u/1862641?v=3","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T07:40:53Z","updated_at":"2015-10-21T07:40:53Z","body":"Yeah, I'm aware of this issue... I'm not sure how OK it is for the EF provider to implicitly add an extension as you suggest...\r\n\r\nNote that you you should be able to easily work around this by defining your own database initializer (inheriting `DropCreateDatabaseAlways` or any other) and sending the SQL yourself...\r\n\r\nAny comments/views on this from anyone? @Emill?"}}