diff --git a/database scripts/00_dump.sql b/database scripts/00_dump.sql index 3cf317a..0362cdc 100644 --- a/database scripts/00_dump.sql +++ b/database scripts/00_dump.sql @@ -2838,7 +2838,9 @@ CREATE TABLE "public"."tblFamilies" ( "FamilyType" character varying(2), "InsureeID" integer NOT NULL, "LocationId" integer, - "RowID" "text" + "RowID" "text", + "Source" VARCHAR(50) NULL, + "SourceVersion" VARCHAR(15) NULL ); @@ -2868,6 +2870,17 @@ CREATE SEQUENCE "public"."tblFamilies_FamilyID_seq" ALTER SEQUENCE "public"."tblFamilies_FamilyID_seq" OWNED BY "public"."tblFamilies"."FamilyID"; +CREATE TABLE "public"."tblFamilySMS" ( + FamilyID INT NOT NULL, + ApprovalOfSMS BOOLEAN, + LanguageOfSMS VARCHAR(5), + ValidityFrom TIMESTAMPTZ NOT NULL, + ValidityTo TIMESTAMPTZ, + CONSTRAINT UC_FamilySMS UNIQUE (FamilyID, ValidityTo) +); + + +-- ALTER TABLE "public"."tblFamilySMS" OWNER TO "postgres"; -- -- TOC entry 262 (class 1259 OID 20726) @@ -3208,8 +3221,9 @@ CREATE TABLE "public"."tblIMISDefaults" ( "SMSType" integer, "AppVersionFeedbackRenewal" numeric(3,1), "AppVersionImis" numeric(3,1), - "APIKey" character varying(100) -); + "APIKey" character varying(100), + "ActivationOption" smallint DEFAULT 2 NOT NULL, + "BypassReviewClaim" boolean DEFAULT true NOT NULL); -- ALTER TABLE "public"."tblIMISDefaults" OWNER TO "postgres"; @@ -3221,7 +3235,8 @@ CREATE TABLE "public"."tblIMISDefaults" ( CREATE TABLE "public"."tblIMISDefaultsPhone" ( "RuleName" character varying(100), - "RuleValue" boolean + "RuleValue" boolean, + "Usage" character varying(200) NULL ); @@ -3278,7 +3293,9 @@ CREATE TABLE "public"."tblInsuree" ( "ValidityTo" timestamp with time zone, "Vulnerability" boolean, "isOffline" boolean, - "passport" character varying(25) + "passport" character varying(25), + "Source" character varying(50) NULL, + "SourceVersion" character varying(15) NULL ); @@ -3418,7 +3435,8 @@ ALTER SEQUENCE "public"."tblItems_ItemID_seq" OWNED BY "public"."tblItems"."Item CREATE TABLE "public"."tblLanguages" ( "LanguageCode" character varying(5) NOT NULL, "LanguageName" character varying(50) NOT NULL, - "SortOrder" integer + "SortOrder" integer, + "CountryCode" character varying(10) NULL ); @@ -3587,7 +3605,8 @@ CREATE TABLE "public"."tblPLItems" ( "ValidityTo" timestamp with time zone, "LegacyID" integer, "AuditUserID" integer NOT NULL, - "LocationId" integer + "LocationId" integer, + "RowID" timestamp NULL ); @@ -3848,7 +3867,11 @@ CREATE TABLE "public"."tblPayment" ( "DateLastSMS" timestamp with time zone, "LanguageName" character varying(10), "TypeOfPayment" character varying(50), - "TransferFee" numeric(18,2) + "TransferFee" numeric(18,2), + "SpReconcReqId" character varying(30) NULL, + "ReconciliationDate" timestamp NULL, + "PayerPhoneNumber" character varying(50) NULL, + "SmsRequired" bit NULL ); @@ -3950,7 +3973,9 @@ CREATE TABLE "public"."tblPolicy" ( "FamilyID" integer NOT NULL, "OfficerID" integer, "ProdID" integer NOT NULL, - "RowID" "bytea" + "RowID" "bytea", + "Source" character varying(50) NULL, + "SourceVersion" character varying(15) NULL ); @@ -4048,7 +4073,10 @@ CREATE TABLE "public"."tblPremium" ( "AuditUserID" integer NOT NULL, "PayerID" integer, "PolicyID" integer NOT NULL, - "RowID" "text" + "CreatedDate" date DEFAULT CURRENT_DATE NOT NULL, + "RowID" "text", + "Source" character varying(50) NULL, + "SourceVersion" character varying(15) NULL ); @@ -4377,7 +4405,8 @@ CREATE TABLE "public"."tblRelDistr" ( "ValidityTo" timestamp with time zone, "LegacyID" integer, "AuditUserID" integer NOT NULL, - "ProdID" integer NOT NULL + "ProdID" integer NOT NULL, + "RowID" timestamp NULL ); @@ -4488,8 +4517,9 @@ CREATE TABLE "public"."tblReporting" ( "RecordFound" integer NOT NULL, "OfficerID" integer, "ReportType" integer, - "CammissionRate" numeric(18,2), - "CommissionRate" numeric(18,2) + "ReportMode" integer, + "CommissionRate" numeric(18,2), + "Scope" integer ); @@ -4665,7 +4695,8 @@ CREATE TABLE "public"."tblUserRole" ( "UserRoleID" integer NOT NULL, "AudituserID" integer, "RoleID" integer NOT NULL, - "UserID" integer NOT NULL + "UserID" integer NOT NULL, + "Assign" integer NULL ); diff --git a/database scripts/01_modular_base.sql b/database scripts/01_modular_base.sql index 7730b70..ce5e7b9 100644 --- a/database scripts/01_modular_base.sql +++ b/database scripts/01_modular_base.sql @@ -187,24 +187,24 @@ CREATE TABLE "public"."core_User" ( -- -- TOC entry 214 (class 1259 OID 20299) --- Name: core_User_groups; Type: TABLE; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl; Type: TABLE; Schema: public; Owner: postgres -- -CREATE TABLE "public"."core_User_groups" ( +CREATE TABLE "public"."Core_User_groups_tbl" ( "id" integer NOT NULL, "user_id" "uuid" NOT NULL, "group_id" integer NOT NULL ); --- ALTER TABLE "public"."core_User_groups" OWNER TO "postgres"; +-- ALTER TABLE "public"."Core_User_groups_tbl" OWNER TO "postgres"; -- -- TOC entry 213 (class 1259 OID 20297) --- Name: core_User_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- -CREATE SEQUENCE "public"."core_User_groups_id_seq" +CREATE SEQUENCE "public"."Core_User_groups_tbl_id_seq" AS integer START WITH 1 INCREMENT BY 1 @@ -213,15 +213,15 @@ CREATE SEQUENCE "public"."core_User_groups_id_seq" CACHE 1; --- ALTER TABLE "public"."core_User_groups_id_seq" OWNER TO "postgres"; +-- ALTER TABLE "public"."Core_User_groups_tbl_id_seq" OWNER TO "postgres"; -- -- TOC entry 3994 (class 0 OID 0) -- Dependencies: 213 --- Name: core_User_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- -ALTER SEQUENCE "public"."core_User_groups_id_seq" OWNED BY "public"."core_User_groups"."id"; +ALTER SEQUENCE "public"."Core_User_groups_tbl_id_seq" OWNED BY "public"."Core_User_groups_tbl"."id"; -- @@ -397,20 +397,20 @@ ALTER TABLE ONLY "public"."core_TechnicalUser" -- -- TOC entry 3402 (class 2606 OID 20304) --- Name: core_User_groups core_User_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl Core_User_groups_tbl_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY "public"."core_User_groups" - ADD CONSTRAINT "core_User_groups_pkey" PRIMARY KEY ("id"); +ALTER TABLE ONLY "public"."Core_User_groups_tbl" + ADD CONSTRAINT "Core_User_groups_tbl_pkey" PRIMARY KEY ("id"); -- -- TOC entry 3405 (class 2606 OID 20410) --- Name: core_User_groups core_User_groups_user_id_group_id_8ec5911a_uniq; Type: CONSTRAINT; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl Core_User_groups_tbl_user_id_group_id_8ec5911a_uniq; Type: CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY "public"."core_User_groups" - ADD CONSTRAINT "core_User_groups_user_id_group_id_8ec5911a_uniq" UNIQUE ("user_id", "group_id"); +ALTER TABLE ONLY "public"."Core_User_groups_tbl" + ADD CONSTRAINT "Core_User_groups_tbl_user_id_group_id_8ec5911a_uniq" UNIQUE ("user_id", "group_id"); -- @@ -484,18 +484,18 @@ CREATE INDEX "core_TechnicalUser_username_6f41c923_like" ON "public"."core_Techn -- -- TOC entry 3400 (class 1259 OID 20412) --- Name: core_User_groups_group_id_197830ae; Type: INDEX; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl_group_id_197830ae; Type: INDEX; Schema: public; Owner: postgres -- -CREATE INDEX "core_User_groups_group_id_197830ae" ON "public"."core_User_groups" USING "btree" ("group_id"); +CREATE INDEX "Core_User_groups_tbl_group_id_197830ae" ON "public"."Core_User_groups_tbl" USING "btree" ("group_id"); -- -- TOC entry 3403 (class 1259 OID 20411) --- Name: core_User_groups_user_id_06a128ce; Type: INDEX; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl_user_id_06a128ce; Type: INDEX; Schema: public; Owner: postgres -- -CREATE INDEX "core_User_groups_user_id_06a128ce" ON "public"."core_User_groups" USING "btree" ("user_id"); +CREATE INDEX "Core_User_groups_tbl_user_id_06a128ce" ON "public"."Core_User_groups_tbl" USING "btree" ("user_id"); -- @@ -589,11 +589,11 @@ ALTER TABLE ONLY "public"."core_Mutation_Log" -- -- TOC entry 3727 (class 2606 OID 20399) --- Name: core_User_groups core_User_groups_user_id_06a128ce_fk_core_User_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl Core_User_groups_tbl_user_id_06a128ce_fk_core_User_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY "public"."core_User_groups" - ADD CONSTRAINT "core_User_groups_user_id_06a128ce_fk_core_User_id" FOREIGN KEY ("user_id") REFERENCES "public"."core_User"("id") DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY "public"."Core_User_groups_tbl" + ADD CONSTRAINT "Core_User_groups_tbl_user_id_06a128ce_fk_core_User_id" FOREIGN KEY ("user_id") REFERENCES "public"."core_User"("id") DEFERRABLE INITIALLY DEFERRED; -- @@ -699,10 +699,10 @@ ALTER TABLE ONLY "public"."insuree_InsureeMutation" -- -- TOC entry 3329 (class 2604 OID 20302) --- Name: core_User_groups id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: Core_User_groups_tbl id; Type: DEFAULT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY "public"."core_User_groups" ALTER COLUMN "id" SET DEFAULT "nextval"('"public"."core_User_groups_id_seq"'::"regclass"); +ALTER TABLE ONLY "public"."Core_User_groups_tbl" ALTER COLUMN "id" SET DEFAULT "nextval"('"public"."Core_User_groups_tbl_id_seq"'::"regclass"); -- diff --git a/migtool/tables.txt b/migtool/tables.txt index 108378a..9fcb4f0 100644 --- a/migtool/tables.txt +++ b/migtool/tables.txt @@ -16,7 +16,7 @@ django_session auth_group auth_permission auth_group_permissions -core_User_groups +core_User_groups_tbl core_ModuleConfiguration core_FieldControl tblLanguages