
alter table "WebNotification" add column "ModulesMasterId" int references "ModulesMaster"("ModulesMasterId"); 

update "WebNotification" set "ModulesMasterId" = (select "ModulesMasterId"  from "ModulesMaster" mm where "ModuleName" = 'Pharmacy') where "WebNotificationTypeId" = 1;

update "WebNotification" set "ModulesMasterId" = (select "ModulesMasterId"  from "ModulesMaster" mm where "ModuleName" = 'Lab') where "WebNotificationTypeId" = 2;

alter table "WebNotification" drop column "WebNotificationTypeId";

drop table "WebNotificationType" cascade;

ALTER SEQUENCE "ModulesMaster_ModulesMasterId_seq" RESTART WITH 10;


