37 lines
1.0 KiB
SQL
37 lines
1.0 KiB
SQL
-- Create "PatientLink" table
|
|
CREATE TABLE "public"."PatientLink" (
|
|
"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_PatientLink_Simgos_Id" UNIQUE ("Simgos_Id"),
|
|
CONSTRAINT "uni_PatientLink_Simx_Id" UNIQUE ("Simx_Id")
|
|
);
|
|
-- Create "PatientSimgosLog" table
|
|
CREATE TABLE "public"."PatientSimgosLog" (
|
|
"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 "PatientSimxLog" table
|
|
CREATE TABLE "public"."PatientSimxLog" (
|
|
"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")
|
|
);
|