Files
simrsx-be/cmd/simgos-sync-migration/migrations/20251126115527.sql
2025-11-26 18:56:30 +07:00

37 lines
1.1 KiB
SQL

-- Create "InternalReferenceLink" table
CREATE TABLE "public"."InternalReferenceLink" (
"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_InternalReferenceLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_InternalReferenceLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "InternalReferenceSimgosLog" table
CREATE TABLE "public"."InternalReferenceSimgosLog" (
"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 "InternalReferenceSimxLog" table
CREATE TABLE "public"."InternalReferenceSimxLog" (
"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")
);