ALTER TABLE wor_device_request ADD based_on_table varchar(255) NULL;
COMMENT ON COLUMN wor_device_request.based_on_table IS '请求基于什么';

ALTER TABLE wor_device_request ADD based_on_id int8 NULL;
COMMENT ON COLUMN wor_device_request.based_on_id IS '请求基于什么的ID';

ALTER TABLE wor_device_dispense ADD procedure_id int8 NULL;
COMMENT ON COLUMN wor_device_dispense.procedure_id IS '执行id';

ALTER TABLE med_medication_request ADD based_on_table varchar(255) NULL;
COMMENT ON COLUMN med_medication_request.based_on_table IS '请求基于什么';

ALTER TABLE med_medication_request ADD based_on_id int8 NULL;
COMMENT ON COLUMN med_medication_request.based_on_id IS '请求基于什么的ID';

ALTER TABLE med_medication_dispense ADD procedure_id int8 NULL;
COMMENT ON COLUMN med_medication_dispense.procedure_id IS '执行id';


   -- 插入为tmp_activity_device表添加列的迁移记录
INSERT INTO __MigrationsHistory (MigrationId, ProductVersion)
VALUES ('202510151011 alter_table_request', '1.0.0');