diff --git a/cmd/migration/migrations/20250825102900.sql b/cmd/migration/migrations/20250825102900.sql new file mode 100644 index 00000000..766aca3d --- /dev/null +++ b/cmd/migration/migrations/20250825102900.sql @@ -0,0 +1,12 @@ +-- Create "PharmacyCompany" table +CREATE TABLE "public"."PharmacyCompany" ( + "Id" bigserial NOT NULL, + "CreatedAt" timestamptz NULL, + "UpdatedAt" timestamptz NULL, + "DeletedAt" timestamptz NULL, + "Code" character varying(20) NULL, + "Name" character varying(100) NULL, + "Regency_Code" character varying(4) NULL, + PRIMARY KEY ("Id"), + CONSTRAINT "uni_PharmacyCompany_Code" UNIQUE ("Code") +); diff --git a/cmd/migration/migrations/20250825103029.sql b/cmd/migration/migrations/20250825103029.sql new file mode 100644 index 00000000..9c3613c7 --- /dev/null +++ b/cmd/migration/migrations/20250825103029.sql @@ -0,0 +1,24 @@ +-- Create "DiagnoseSrc" table +CREATE TABLE "public"."DiagnoseSrc" ( + "Id" bigserial NOT NULL, + "CreatedAt" timestamptz NULL, + "UpdatedAt" timestamptz NULL, + "DeletedAt" timestamptz NULL, + "Code" character varying(10) NULL, + "Name" character varying(2048) NULL, + "IndName" character varying(2048) NULL, + PRIMARY KEY ("Id"), + CONSTRAINT "uni_DiagnoseSrc_Code" UNIQUE ("Code") +); +-- Create "ProcedureSrc" table +CREATE TABLE "public"."ProcedureSrc" ( + "Id" bigserial NOT NULL, + "CreatedAt" timestamptz NULL, + "UpdatedAt" timestamptz NULL, + "DeletedAt" timestamptz NULL, + "Code" character varying(10) NULL, + "Name" character varying(2048) NULL, + "IndName" character varying(2048) NULL, + PRIMARY KEY ("Id"), + CONSTRAINT "uni_ProcedureSrc_Code" UNIQUE ("Code") +); diff --git a/cmd/migration/migrations/atlas.sum b/cmd/migration/migrations/atlas.sum index 7cb26096..e9c29361 100644 --- a/cmd/migration/migrations/atlas.sum +++ b/cmd/migration/migrations/atlas.sum @@ -1,3 +1,5 @@ -h1:0EV4fJWckR7Ma3cBvARIaNvZvwO/9rXVWEknYQ5KuS8= +h1:kmaYH5ZWV4XqRaVulfE4cDvHlo2ANjTsI8kr9EIqJ7I= 20250825054027.sql h1:zRUeuuP4bDLf96Cb38D/l9ivBAQC745XRao0rxbzdVI= 20250825060522.sql h1:NiE1fVzydcg8Y8ytSHgt0DkkauQFveNXv42BoG5m+bI= +20250825102900.sql h1:Xaz9cAKDx6ZjDByRBSNrX/d2/s8Xid2zhirWk62xKjQ= +20250825103029.sql h1:YkM0KTRRawcObTUOG3epXzBOW4wFyHIOlnh99FaVgPk= diff --git a/internal/interface/migration/migration.go b/internal/interface/migration/migration.go index 9a56490a..beeb666e 100644 --- a/internal/interface/migration/migration.go +++ b/internal/interface/migration/migration.go @@ -5,6 +5,7 @@ import ( "io" "os" "os/exec" + diagnosesrc "simrs-vx/internal/domain/main-entities/diagnose-src" district "simrs-vx/internal/domain/main-entities/district" division "simrs-vx/internal/domain/main-entities/division" divisionposition "simrs-vx/internal/domain/main-entities/division-position" @@ -13,6 +14,7 @@ import ( personaddress "simrs-vx/internal/domain/main-entities/person-address" personcontact "simrs-vx/internal/domain/main-entities/person-contact" pharmacycompany "simrs-vx/internal/domain/main-entities/pharmacy-company" + proceduresrc "simrs-vx/internal/domain/main-entities/procedure-src" province "simrs-vx/internal/domain/main-entities/province" regency "simrs-vx/internal/domain/main-entities/regency" unit "simrs-vx/internal/domain/main-entities/unit" @@ -65,6 +67,8 @@ func GetEntities() []any { &personaddress.PersonAddress{}, &personcontact.PersonContact{}, &pharmacycompany.PharmacyCompany{}, + &diagnosesrc.DiagnoseSrc{}, + &proceduresrc.ProcedureSrc{}, } }