-- Run this ONCE after the earlier database files, to support showing the
-- consulting doctor on the payment receipt (GST-bill style receipt update).
SET @db := DATABASE();
SET @q := IF((SELECT COUNT(*) FROM information_schema.columns WHERE table_schema=@db AND table_name='patient_receipts' AND column_name='doctor_id')=0, 'ALTER TABLE patient_receipts ADD COLUMN doctor_id int(11) DEFAULT NULL AFTER service_name', 'SELECT 1'); PREPARE s FROM @q; EXECUTE s; DEALLOCATE PREPARE s;
