
update "PharmacyStock" set "PharmacyWareHouseId" = (Select "PharmacyWareHouseId" 
													from "PharmacyWareHouse" where lower("WareHouseName") = lower('WareHouse 1'));

-----------


Alter table "RetailPharmacy" drop column "AllowedUser";

Alter table "RetailPharmacy"  Add column "PharmacyWareHouseId" int 
references "PharmacyWareHouse"("PharmacyWareHouseId");

update "RetailPharmacy" set "PharmacyWareHouseId" = (Select "PharmacyWareHouseId" 
													from "PharmacyWareHouse" where lower("WareHouseName") = lower('WareHouse 1'));

----------

Alter table "PharmacyPurchaseHeader"  Add column "PharmacyWareHouseId" int 
references "PharmacyWareHouse"("PharmacyWareHouseId");

update "PharmacyPurchaseHeader" set "PharmacyWareHouseId" = (Select "PharmacyWareHouseId" 
													from "PharmacyWareHouse" where lower("WareHouseName") = lower('WareHouse 1'));

