2022-12-14 09:53:10 +03:00
|
|
|
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
|
|
|
|
"MigrationId" character varying(150) NOT NULL,
|
|
|
|
"ProductVersion" character varying(32) NOT NULL,
|
|
|
|
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
|
|
|
|
);
|
|
|
|
|
|
|
|
START TRANSACTION;
|
|
|
|
|
|
|
|
CREATE TABLE "Products" (
|
2023-05-11 07:55:26 +03:00
|
|
|
"Id" text NOT NULL,
|
2022-12-14 09:53:10 +03:00
|
|
|
"Name" text NOT NULL,
|
2023-05-11 07:55:26 +03:00
|
|
|
"ProductSku" text NOT NULL,
|
|
|
|
"DeprecatedSkus" text[] NOT NULL,
|
|
|
|
"ProductLines" text[] NOT NULL,
|
|
|
|
"IsOnWarehouse" boolean NOT NULL,
|
2022-12-14 09:53:10 +03:00
|
|
|
"ProductMeasure" integer NOT NULL,
|
2024-01-18 22:35:09 +03:00
|
|
|
"DeliveryMakeUp" double precision,
|
2023-05-11 07:55:26 +03:00
|
|
|
"Price" numeric NOT NULL,
|
2022-12-14 09:53:10 +03:00
|
|
|
CONSTRAINT "PK_Products" PRIMARY KEY ("Id")
|
|
|
|
);
|
|
|
|
|
2024-01-18 22:35:09 +03:00
|
|
|
CREATE INDEX "IX_Products_Name" ON "Products" USING GIN (to_tsvector('russian', "Name"));
|
|
|
|
|
2022-12-14 09:53:10 +03:00
|
|
|
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
|
2024-01-18 22:35:09 +03:00
|
|
|
VALUES ('20240117210635_Init', '8.0.0');
|
2022-12-14 09:53:10 +03:00
|
|
|
|
|
|
|
COMMIT;
|