insert into "ProductRaiseStatus" ("Status") values ('Accepted');
------------------------------------------

alter table "ProductGroupForTender" add column "ApprovedBy" int references "Account"("AccountId") ,
add column"ApprovedDate" timestamp without time zone;

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

alter table "PharmacyWareHouse" add column "CentralWarehouseLocationId" int references "Location"("LocationId");

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



alter table "RequestIndentHeader" add column "PharmacyWareHouseId" int references "PharmacyWareHouse"("PharmacyWareHouseId");

-- important
-- oncomplition
--drop table "RequestIndentStatus"

alter table "RequestIndentHeader" drop column "RequestIndentStatusId",drop column "RequestIndentTypeId";

alter table "RequestIndentHeader" add column "ProductRaiseStatusId" int references "ProductRaiseStatus"("ProductRaiseStatusId");

insert into "ProductRaiseStatus" ("Status") values ('Pending');
insert into "ProductRaiseStatus" ("Status") values ('IndentRaised');
insert into "ProductRaiseStatus" ("Status") values ('IndentApproved');
------------

drop table if exists "RequestIndentDetail";

create table "RequestIndentDetail"(
			"RequestIndentDetailId" bigserial primary key,
			"RequestIndentHeaderId" int references "RequestIndentHeader"("RequestIndentHeaderId"),			
			"Quantity" int,
			"ProductGroupForTenderId" int references "ProductGroupForTender"("ProductGroupForTenderId")
);
---------