CREATE TABLE IF NOT EXISTS public."EmployeeShift"
(
    "EmployeeShiftId" bigserial NOT NULL,
    "EmployeeShiftName" character varying(250) NOT NULL,
    "StartTime" time without time zone NOT NULL,
    "EndTime" time without time zone NOT NULL,
    "Note" character varying(500),
    "Active" boolean NOT NULL DEFAULT true,
    "CreatedBy" bigint NOT NULL,
    "CreatedDate" timestamp without time zone NOT NULL,
    "ModifiedBy" bigint,
    "ModifiedDate" timestamp without time zone,
    "LocationId" integer NOT NULL,
    CONSTRAINT "PK_EmployeeShift_EmployeeShiftId" PRIMARY KEY ("EmployeeShiftId"),
    CONSTRAINT "FK_EmployeeShift_CreatedBy" FOREIGN KEY ("CreatedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
        NOT VALID,
    CONSTRAINT "FK_EmployeeShift_ModifiedBy" FOREIGN KEY ("ModifiedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
        NOT VALID,
    CONSTRAINT "FK_EmployeeShift_LocationId" FOREIGN KEY ("LocationId")
        REFERENCES public."Location" ("LocationId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
        NOT VALID
);