summaryrefslogtreecommitdiff
path: root/Database/init-database.sql
blob: 91e9f959881aa9aefc6f037dbebb6a6ada33cc56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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" (
    "Id" text NOT NULL,
    "Name" text NOT NULL,
    "ProductSku" text NOT NULL,
    "DeprecatedSkus" text[] NOT NULL,
    "ProductLines" text[] NOT NULL,
    "IsOnWarehouse" boolean NOT NULL,
    "ProductMeasure" integer NOT NULL,
    "DeliveryMakeUp" double precision NULL,
    "Price" numeric NOT NULL,
    CONSTRAINT "PK_Products" PRIMARY KEY ("Id")
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20230511043408_Init', '7.0.5');

COMMIT;