add entity sync for division, specialist and subspecialist

This commit is contained in:
vanilia
2025-11-17 11:17:43 +07:00
parent eec5bf79b8
commit 49c82c957e
7 changed files with 212 additions and 4 deletions
@@ -0,0 +1,108 @@
-- Create "DivisionLink" table
CREATE TABLE "public"."DivisionLink" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Simx_Id" bigint NULL,
"Simgos_Id" bigint NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_DivisionLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_DivisionLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "DivisionSimgosLog" table
CREATE TABLE "public"."DivisionSimgosLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "DivisionSimxLog" table
CREATE TABLE "public"."DivisionSimxLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "SpecialistLink" table
CREATE TABLE "public"."SpecialistLink" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Simx_Id" bigint NULL,
"Simgos_Id" bigint NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_SpecialistLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_SpecialistLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "SpecialistSimgosLog" table
CREATE TABLE "public"."SpecialistSimgosLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "SpecialistSimxLog" table
CREATE TABLE "public"."SpecialistSimxLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "SubspecialistLink" table
CREATE TABLE "public"."SubspecialistLink" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Simx_Id" bigint NULL,
"Simgos_Id" bigint NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_SubspecialistLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_SubspecialistLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "SubspecialistSimgosLog" table
CREATE TABLE "public"."SubspecialistSimgosLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "SubspecialistSimxLog" table
CREATE TABLE "public"."SubspecialistSimxLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
@@ -1,3 +1,4 @@
h1:xxkaO6rL13nwrZd1vrsoGJrrwCtXPgGRmwGEjWJ1V/c=
h1:SN+f41iFH0m63kHeZHYricAjil5GJ9EC0LBOSdFDnmY=
20251113035508.sql h1:rjDlu6yDdy5xv6nrCOr7NialrLSLT23pzduYNq29Hf0=
20251114071129.sql h1:O4nfv4l9vcXpE2Kyu7vjnubD8kDZ7JltRaF2auOdMpc=
20251114071129.sql h1:Z0GQ5bJo3C+tplaWzxT8n3J9HLkEaVsRVp5nn7bmYow=
20251117041601.sql h1:mIxZ2luKQREXUBY36PwLNDFI/Wf1T6Z2DDoGOueXFwI=