Files
simrsx-be/cmd/migration/migrations/20250820052409.sql
T
2025-08-20 13:07:56 +07:00

27 lines
793 B
SQL

-- Create "Division" table
CREATE TABLE "public"."Division" (
"Id" serial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Code" character varying(10) NULL,
"Name" character varying(50) NULL,
"Parent_Id" smallint NULL,
PRIMARY KEY ("Id")
);
-- Create "User" table
CREATE TABLE "public"."User" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Name" character varying(25) NOT NULL,
"Password" character varying(255) NOT NULL,
"Status_Code" character varying(10) NOT NULL,
"FailedLoginCount" smallint NULL,
"LoginAttemptCount" bigint NULL,
"LastSuccessLogin" timestamptz NULL,
"LastAllowdLogin" timestamptz NULL,
PRIMARY KEY ("Id")
);