Skip to content

Syntax Error at GENERATED column " GENERATED ALWAYS AS ([UnitPrice] * [Quantity]) " #3845

Description

@kss277870778-del

Failed executing DbCommand (18ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
CREATE TABLE "InvoicesLineItems" (
"Id" text NOT NULL,
"InvoiceId" text NOT NULL,
"Description" text NOT NULL,
"UnitPrice" double precision NOT NULL,
"Quantity" double precision NOT NULL,
"TotalPrice" double precision GENERATED ALWAYS AS ([UnitPrice] * [Quantity]) STORED NOT NULL,
"UserId" text NOT NULL,
CONSTRAINT "PK_InvoicesLineItems" PRIMARY KEY ("Id"),
CONSTRAINT "FK_InvoicesLineItems_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id"),
CONSTRAINT "FK_InvoicesLineItems_Invoices_InvoiceId" FOREIGN KEY ("InvoiceId") REFERENCES "Invoices" ("Id")
);
Npgsql.PostgresException (0x80004005): 42601: 语法错误 在 "[" 或附近的

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions