我正在用WebAPI核心net5.0开发一个asp.net在域对象中,我使用Ltree作为层次结构。在添加和更新迁移时,会得到以下错误:Npgsql.PostgresException: type "ltree" does not exist。我做了一些研究发现,如果我在"create extension Ltree"数据库上运行
我首先使用EF代码,并在我的迁移文件中包含以下内容。AddColumn("dbo.ConsumerFee", "VATCodeId", c => c.Int(nullable: false, defaultValue: 1));但是,当将列添加到表中时当我手动运行迁移时,我可以看到它生成了以下sql:
alter table `ConsumerFee` add column `VATCodeId` i