add sync unit

This commit is contained in:
vanilia
2025-11-14 14:11:55 +07:00
parent c453aa0aa7
commit fbd8d30ec6
6 changed files with 84 additions and 3 deletions
@@ -0,0 +1,36 @@
-- Create "UnitLink" table
CREATE TABLE "public"."UnitLink" (
"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_UnitLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_UnitLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "UnitSimgosLog" table
CREATE TABLE "public"."UnitSimgosLog" (
"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 "UnitSimxLog" table
CREATE TABLE "public"."UnitSimxLog" (
"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")
);