{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13333","repository_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore","labels_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13333/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13333/comments","events_url":"https://api.github.com/repos/aspnet/EntityFrameworkCore/issues/13333/events","html_url":"https://github.com/aspnet/EntityFrameworkCore/issues/13333","id":360541934,"node_id":"MDU6SXNzdWUzNjA1NDE5MzQ=","number":13333,"title":"Migrations are not database brand agnostics","user":{"login":"ctrl-alt-d","id":3105983,"node_id":"MDQ6VXNlcjMxMDU5ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/3105983?v=4","gravatar_id":"","url":"https://api.github.com/users/ctrl-alt-d","html_url":"https://github.com/ctrl-alt-d","followers_url":"https://api.github.com/users/ctrl-alt-d/followers","following_url":"https://api.github.com/users/ctrl-alt-d/following{/other_user}","gists_url":"https://api.github.com/users/ctrl-alt-d/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrl-alt-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrl-alt-d/subscriptions","organizations_url":"https://api.github.com/users/ctrl-alt-d/orgs","repos_url":"https://api.github.com/users/ctrl-alt-d/repos","events_url":"https://api.github.com/users/ctrl-alt-d/events{/privacy}","received_events_url":"https://api.github.com/users/ctrl-alt-d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-15T13:51:10Z","updated_at":"2018-09-15T13:51:10Z","closed_at":null,"author_association":"NONE","body":"[EF Core generated migration has database brand annotations.](https://stackoverflow.com/questions/52310236/ef-core-generated-migration-has-database-brand-annotations-looking-for-database) Digging into auto generated migrations files (`dotnet ef migrations add mymigration1`) I see references to specific database brand:\r\n\r\n```c#\r\n    Id = table.Column<int>(nullable: false)\r\n        .Annotation(\"SqlServer:ValueGenerationStrategy\", //<-- here\r\n                     SqlServerValueGenerationStrategy.IdentityColumn), //<--here\r\n```\r\n\r\nI use EF2 core to be able to deploy and run application on several database brands, because this, I include in app references to several database providers:\r\n\r\n```\r\n    <PackageReference Include=\"Microsoft.EntityFrameworkCore.Sqlite\" ... />\r\n    <PackageReference Include=\"Microsoft.EntityFrameworkCore.SqlServer\" ... />\r\n```\r\n\r\nEF is able to generate specific sql for each database branch from the same linq expression, it is impressive. The only dependency to a database brand I have found in whole framework is in migrations.\r\nIn my opinion EF2 should be full agnostic about database brand on migrations files. Something like:\r\n\r\n```c#\r\n    Id = table.Column<int>(nullable: false, autofield: true ),\r\n```\r\n\r\nIs there a way to generate automatically migrations files, with all needed information (indent fields), and database brand agnostics?\r\n\r\n### Steps to reproduce\r\nJust make a migration and inspect files.\r\n\r\n### Further technical details\r\nEF Core version: 2.1.3\r\nDatabase Provider: Sqlite, SqlServer, ...\r\nOperating system: Any\r\nIDE: Any\r\n"}}
{"actor":{"display_login":"ctrl-alt-d"}}