Add missing counter usage cases. (#120)

3.1-servicing
Laurents Meyer 4 years ago committed by GitHub
parent 7de5da5755
commit dc5f216c1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -735,14 +735,11 @@ namespace Microsoft.EntityFrameworkCore.Migrations
{
var storeType = operation.ColumnType;
if (IsIdentity(operation))
if (IsIdentity(operation) &&
(storeType == null || Dependencies.TypeMappingSource.FindMapping(storeType) is JetIntTypeMapping))
{
// This column represents the actual identity.
if (storeType != null &&
Dependencies.TypeMappingSource.FindMapping(storeType) is JetIntTypeMapping)
{
storeType = "counter";
}
storeType = "counter";
}
else if (storeType != null &&
IsExplicitIdentityColumnType(storeType))

@ -36,7 +36,7 @@ namespace EntityFrameworkCore.Jet
AssertSql(
$@"CREATE TABLE `Cookie` (
`CookieId` integer NOT NULL,
`CookieId` counter NOT NULL,
`Name` longchar NULL,
`BestServedBefore` datetime NOT NULL DEFAULT #2021-12-31#,
CONSTRAINT `PK_Cookie` PRIMARY KEY (`CookieId`)

Loading…
Cancel
Save