-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrectly generate CREATE SEQUENCE when using decimal #26562
Labels
area-migrations
area-sqlserver
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
Comments
Is there an easy way to override this when creating a sequence of type decimal ? |
bobbyangers
added a commit
to bobbyangers/efcore
that referenced
this issue
Nov 8, 2021
bobbyangers
added a commit
to bobbyangers/efcore
that referenced
this issue
Nov 8, 2021
- Generated SQL >> CREATE SEQUENCE wrong when using decimal was generating (18, 2) which SQL returned an error - Added tests for int, long, short, byte, decimal Fixes dotnet#26562
bobbyangers
added a commit
to bobbyangers/efcore
that referenced
this issue
Nov 8, 2021
- Generated SQL >> CREATE SEQUENCE wrong when using decimal was generating (18, 2) which SQL returned an error - Added tests for int, long, short, byte, decimal Fixes dotnet#26562
bobbyangers
added a commit
to bobbyangers/efcore
that referenced
this issue
Nov 8, 2021
- Generated SQL >> CREATE SEQUENCE wrong when using decimal was generating (18, 2) which SQL returned an error - Added tests for int, long, short, byte, decimal Fixes #26562Summary of the changes - Generated SQL >> CREATE SEQUENCE wrong when using decimal was generating (18, 2) which SQL returned an error - Added tests for int, long, short, byte, decimal Fixes dotnet#26562
bobbyangers
added a commit
to bobbyangers/efcore
that referenced
this issue
Nov 8, 2021
- Generated SQL >> CREATE SEQUENCE wrong when using decimal was generating (18, 2) which SQL returned an error - Added tests for int, long, short, byte, decimal Fixes dotnet#26562
bobbyangers
added a commit
to bobbyangers/efcore
that referenced
this issue
Nov 8, 2021
- Generated SQL >> CREATE SEQUENCE wrong when using decimal was generating (18, 2) which SQL returned an error - Added tests for int, long, short, byte, decimal Fixes dotnet#26562
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-migrations
area-sqlserver
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
EF Core version:
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 5.0
Operating system: Windows 10 Pro 21H1 19043.1320
IDE: Visual Studio 2019 16.11.5
when using DbContext.Datase.EnsureCreated();
if the dbContext contains a sequence using decimal, ie
for example >>
this generates:
But this fails to execute
Msg 11702, Level 16, State 2, Line 3
The sequence object 'dbo.CountByDecimal' must be of data type int, bigint, smallint, tinyint, or decimal or numeric with a scale of 0, or any user-defined data type that is based on one of the above integer data types.
This works
SqlServerMigrationsSqlGenerator.cs && MigrationsSqlGenerator.cs
File a bug
Remember:
The text was updated successfully, but these errors were encountered: