
alter table "ProviderAvailability" add column "LeaveStartDate" character varying;

alter table "ProviderAvailability" add column "LeaveEndDate" character varying;

alter table "ProviderAvailability" add column "IsLeave" boolean;


----------------------------------------------------------------------------------------------------



-- Table: public.ProviderLeave

-- DROP TABLE IF EXISTS public."ProviderLeave";

CREATE TABLE IF NOT EXISTS public."ProviderLeave"
(
    "ProviderLeaveId" bigint NOT NULL DEFAULT nextval('"ProviderLeave_ProviderLeaveId_seq"'::regclass),
    "LeaveDate" date NOT NULL,
    "ProviderId" integer NOT NULL,
    "ProviderLocationId" integer,
    "Reason" text COLLATE pg_catalog."default",
    "CreatedBy" integer,
    "CreatedDate" timestamp(6) without time zone NOT NULL,
    "Active" boolean,
    "ProviderAvailabilityId" integer,
    "LocationId" integer,
    "ModifiedBy" integer,
    "ModifiedDate" timestamp without time zone,
    CONSTRAINT "ProviderLeave_pkey" PRIMARY KEY ("ProviderLeaveId"),
    CONSTRAINT "ProviderLeave_ProviderId_fkey" FOREIGN KEY ("ProviderId")
        REFERENCES public."Provider" ("ProviderId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public."ProviderLeave"
    OWNER to postgres;