
START TRANSACTION;

INSERT INTO `roles` (`id`, `role`, `status`) VALUES
(4, 'super_admin', 'T');

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "error_bodies_ARRAY_AO25");
UPDATE `multi_lang` SET `content` = 'Email notifications will be sent to people who make a booking after the booking form is completed or/and payment is made. If you leave subject field blank no email will be sent. You can use tokens in the email messages to personalize them.<br /><br /><table width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="50%" valign="top"><p>{Name} - customer name;<br />{Phone} - customer phone number; <br />{Email} - customer e-mail address; <br />{Notes} - additional notes; <br />{Address1} - address 1; <br />{Address2} - address 2; <br />{City} - city; <br />{State} - state; <br />{Zip} - zip code; <br />{Country} - country; <br />{Username} - Username; <br />{Password} - Password; <br />{Link} - Link; <br />{InvoiceURL} - Invoice URL; <br />{Tutor} - Tutor name; <br /></p></td><td width="50%" valign="top">{BookingID} - Booking ID; <br />{Services} - Selected services<br />{CCType} - CC type; <br />{CCNum} - CC number; <br />{CCExpMonth} - CC exp.month; <br />{CCExpYear} - CC exp.year; <br />{CCSec} - CC sec. code; <br />{PaymentMethod} - selected payment method; <br />{Price} - price for selected services; <br />{Deposit} - Deposit amount; <br />{Tax} - Tax amount; <br />{Total} - Total amount; <br />{CancelURL} - Link for booking cancellation;<br/>{Extras} - Extras; </td></tr></tbody></table>' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

ALTER TABLE `plugin_invoice` CHANGE `status` `status` enum('not_paid','paid','cancelled','refunded') DEFAULT NULL;

ALTER TABLE `bookings` ADD COLUMN `extra_price` decimal(9,2) unsigned DEFAULT NULL AFTER `booking_price`;

ALTER TABLE `clients` ADD COLUMN `tutor_id` int(10) unsigned DEFAULT NULL AFTER `id`;

COMMIT;