ALTER TABLE `custom_permissions` ADD COLUMN `is_training` TINYINT NOT NULL DEFAULT 0 AFTER `active`;
INSERT INTO `fields_pricetype` VALUES (NULL, 'Not price related');
UPDATE permissions SET name = 'Custom permission' WHERE id = 9;
UPDATE fields SET pricetype = 3 WHERE resource IN (SELECT id FROM resource WHERE field_billable = 0) ;



UPDATE resource SET billing_rules = JSON_OBJECT('type', 1, 'double_charging', 0, 'no_show_fee', JSON_OBJECT('type', 'relative', 'value', no_show_fee), 'no_booking_fee', JSON_OBJECT('type', 'relative', 'value', no_booking_fee));
ALTER TABLE `resource` DROP FOREIGN KEY `resource_ibfk_11`;
ALTER TABLE `resource` DROP COLUMN `no_booking_fee`,DROP COLUMN `no_show_fee`,DROP COLUMN `billing_type`,DROP INDEX `billing_type` ;

ALTER TABLE `fields_share` 
ADD COLUMN `shared` TINYINT NULL DEFAULT 1 AFTER `active`,
ADD COLUMN `last_time_update` DATETIME NULL AFTER `shared`;

INSERT INTO `calendar_comment_label` (`id`, `label`) VALUES ('9', 'Transfer booking accepted');
ALTER TABLE `calendar` CHANGE COLUMN `remote_server` `remote_server` TEXT NULL DEFAULT NULL ;
