CREATE SEQUENCE IF NOT EXISTS public."GatePassType_Seq"
    INCREMENT 1
    START 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    CACHE 1;
-------------------------
CREATE TABLE IF NOT EXISTS public."GatePassType"
(
    "GatePassTypeId" integer NOT NULL DEFAULT nextval('"GatePassType_Seq"'::regclass),
    "Name" character varying(50) COLLATE pg_catalog."default" NOT NULL,
    "Active" boolean NOT NULL DEFAULT true,
    CONSTRAINT "GatePassType_pkey" PRIMARY KEY ("GatePassTypeId")
)
TABLESPACE pg_default;
----------------------------------
insert into "GatePassType"("Name","Active") values('Provisional',true);
insert into "GatePassType"("Name","Active") values('Final',true);
---------------------------------
ALTER TABLE "GatePass"
ADD COLUMN "TypeId" integer not null DEFAULT 2;
ALTER TABLE "GatePass"
ADD CONSTRAINT "FK_GatePass_TypeId" FOREIGN KEY ("TypeId")
        REFERENCES public."GatePassType" ("GatePassTypeId") ;
--------------------------------------------
		

