ALTER TABLE `clinical_clinics` 
CHANGE `agegroup` `allowed_age` VARCHAR(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, 
CHANGE `sex` `allowed_sex` VARCHAR(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
ADD `default_item_id` INT NOT NULL AFTER `store_id`,
ADD `allowed_laboratory` VARCHAR(250) NOT NULL AFTER `default_item_id`, 
ADD `default_laboratory_id` INT NOT NULL AFTER `allowed_laboratory`, 
ADD `allowed_radiology` VARCHAR(250) NOT NULL AFTER `default_laboratory_id`, 
ADD `default_radiology_id` INT NOT NULL AFTER `allowed_radiology`, 
ADD `allowed_procedure` VARCHAR(250) NOT NULL AFTER `default_radiology_id`, 
ADD `default_procedure_id` INT NOT NULL AFTER `allowed_procedure`, 
ADD `allowed_pharmacy` VARCHAR(250) NOT NULL AFTER `default_procedure_id`, 
ADD `default_pharmacy_id` INT NOT NULL AFTER `allowed_pharmacy`,
ADD `allowed_templates` VARCHAR(250) NOT NULL AFTER `default_pharmacy_id`,
ADD `default_template_id` INT NOT NULL AFTER `allowed_templates`;

ALTER TABLE `clinical_wards` 
CHANGE `agegroup` `allowed_age` VARCHAR(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, 
CHANGE `sex` `allowed_sex` VARCHAR(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
ADD `default_item_id` INT NOT NULL AFTER `store_id`,
ADD `allowed_laboratory` VARCHAR(250) NOT NULL AFTER `default_item_id`, 
ADD `default_laboratory_id` INT NOT NULL AFTER `allowed_laboratory`, 
ADD `allowed_radiology` VARCHAR(250) NOT NULL AFTER `default_laboratory_id`, 
ADD `default_radiology_id` INT NOT NULL AFTER `allowed_radiology`, 
ADD `allowed_procedure` VARCHAR(250) NOT NULL AFTER `default_radiology_id`, 
ADD `default_procedure_id` INT NOT NULL AFTER `allowed_procedure`, 
ADD `allowed_pharmacy` VARCHAR(250) NOT NULL AFTER `default_procedure_id`, 
ADD `default_pharmacy_id` INT NOT NULL AFTER `allowed_pharmacy`,
ADD `allowed_templates` VARCHAR(250) NOT NULL AFTER `default_pharmacy_id`,
ADD `default_template_id` INT NOT NULL AFTER `allowed_templates`;

ALTER TABLE `inventory_items` 
ADD `template_id` INT NOT NULL AFTER `background_id`,
ADD `template` TEXT NOT NULL AFTER `template_id`, 
ADD `extra` VARCHAR(250) NOT NULL AFTER `template`;