为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】: 8
【操作系统】:windows 11
【CPU】: Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz 2.90 GHz
【问题描述】*:1.首先问一下有没有ef core 8的驱动了?
2. 使用到的包DM.Microsoft.EntityFrameworkCore版本号7.0.0.20986,在dotnet ef migrations add添加迁移成功生成,在dotnet ef database update时报错,报错信息如下
Failed executing DbCommand (4ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE "AbpBackgroundJobs" (
"Id" CHAR(36) NOT NULL,
"JobName" NVARCHAR2(128) NOT NULL,
"JobArgs" clob NOT NULL,
"TryCount" SMALLINT DEFAULT 0 NOT NULL,
"CreationTime" TIMESTAMP NOT NULL,
"NextTryTime" TIMESTAMP NOT NULL,
"LastTryTime" TIMESTAMP NULL,
"IsAbandoned" BIT DEFAULT FALSE NOT NULL,
"Priority" TINYINT DEFAULT 15 NOT NULL,
"ExtraProperties" NVARCHAR2(8188) NOT NULL,
"ConcurrencyStamp" NVARCHAR2(40) NOT NULL,
CONSTRAINT "PK_AbpBackgroundJobs" PRIMARY KEY ("Id")
);
Dm.DmException (0x80004005): 第14 行附近出现错误:
对象[IsAbandoned]DEFAULT约束表达式无效
at Dm.DmError.ThrowDmException(DmError err)
at A.c.A(b, String, Boolean)
at A.c.A(b, A, DmConnProperty)
at A.B.A(b, b, A, String, Boolean, Int32)
at A.A.C(String)
at Dm.DmCommand.do_ExecuteNonQuery()
at Dm.DmCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable
1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
第14 行附近出现错误:
对象[IsAbandoned]DEFAULT约束表达式无效;
达梦数据库BIT类型不直接支持在列定义中使用 FALSE作为默认值,可以将默认值设置为0