This commit is contained in:
dpurbosakti
2025-08-15 10:18:41 +07:00
parent aa871a95bb
commit 848f7d5a03
5 changed files with 21 additions and 20 deletions
+21
View File
@@ -0,0 +1,21 @@
data "external_schema" "gorm" {
program = [
"go",
"run",
"-mod=mod",
".",
]
}
env "gorm" {
src = data.external_schema.gorm.url
dev = "postgres://moko:password@localhost:5432/simrs_vx1?sslmode=disable"
migration {
dir = "file://migrations"
}
format {
migrate {
diff = "{{ sql . \" \" }}"
}
}
}
@@ -1,12 +0,0 @@
-- Create "User" table
CREATE TABLE "User" (
"Id" bigserial NOT NULL,
"CreatedAt" text NULL,
"UpdatedAt" text NULL,
"DeteledAt" timestamptz NULL,
"Name" character varying(25) NOT NULL,
"Password" character varying(255) NOT NULL,
"Status_Code" character varying(10) NOT NULL,
"FailedLoginCount" smallint NULL,
PRIMARY KEY ("Id")
);
@@ -1,2 +0,0 @@
-- Modify "User" table
ALTER TABLE "User" ALTER COLUMN "Status_Code" TYPE character varying(11);
@@ -1,2 +0,0 @@
-- Modify "User" table
ALTER TABLE "User" ALTER COLUMN "CreatedAt" TYPE timestamptz;
-4
View File
@@ -1,4 +0,0 @@
h1:6uh16WKu8m2VzaFju4mLFjCrEA9FJmxEYP/bKU9bLV4=
20250814082958_auto_migration.sql h1:r1gxPLhQuUmRZhfBomI2gGVA1hR7B4eXF3bYJGA9uVE=
20250814083106_auto_migration.sql h1:CeUsjDrrfxEl+VGDX+azPCXSu88HKZr+VTzAba4p/Vk=
20250814085334_auto_migration.sql h1:RokGeINUPr9iFKuQRyx9HHVVm5HS6fxyTN91gcG1Hgc=