summaryrefslogtreecommitdiff
path: root/RhSolutions.Deploy/database/init-database.sql
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-12-14 09:53:10 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-12-14 09:53:10 +0300
commitda94ed6d89ac2b933718419bbe42f2d913514231 (patch)
tree4c3f9ba7f5c54c564ee28b0e3c973c374f2499ac /RhSolutions.Deploy/database/init-database.sql
Init commit
Diffstat (limited to 'RhSolutions.Deploy/database/init-database.sql')
-rw-r--r--RhSolutions.Deploy/database/init-database.sql25
1 files changed, 25 insertions, 0 deletions
diff --git a/RhSolutions.Deploy/database/init-database.sql b/RhSolutions.Deploy/database/init-database.sql
new file mode 100644
index 0000000..ec6ac7d
--- /dev/null
+++ b/RhSolutions.Deploy/database/init-database.sql
@@ -0,0 +1,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" integer GENERATED BY DEFAULT AS IDENTITY,
+ "ProductSku" text NULL,
+ "DeprecatedSkus" text[] NOT NULL,
+ "Name" text NOT NULL,
+ "ProductLine" text NULL,
+ "IsOnWarehouse" boolean NULL,
+ "ProductMeasure" integer NOT NULL,
+ "DeliveryMakeUp" double precision NULL,
+ "Price" numeric(8,2) NOT NULL,
+ CONSTRAINT "PK_Products" PRIMARY KEY ("Id")
+);
+
+INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
+VALUES ('20221201071323_Init', '7.0.0');
+
+COMMIT; \ No newline at end of file