START TRANSACTION;

  INSERT INTO `fields` VALUES (NULL, 'lblDayAvailability', 'backend', 'Label / Day availability', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'Day availability', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortMonday', 'backend', 'Label / Short monday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'mon', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortTuesday', 'backend', 'Label / Short tuesday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'tue', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortWednesday', 'backend', 'Label / Short wednesday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'wed', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortThursday', 'backend', 'Label / Short thursday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'thu', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortFriday', 'backend', 'Label / Short friday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'fri', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortSaturday', 'backend', 'Label / Short saturday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'sat', 'script');

  INSERT INTO `fields` VALUES (NULL, 'lblShortSunday', 'backend', 'Label / Short sunday', 'script', NULL);
  SET @id := (SELECT LAST_INSERT_ID());
  INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '::LOCALE::', 'title', 'sun', 'script');

  ALTER TABLE `dates`
    DROP `start_lunch`,
    DROP `end_lunch`,
    DROP `is_dayoff`;

  ALTER TABLE `dates`
    ADD `monday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `end_time`,
    ADD `tuesday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `monday_dayoff`,
    ADD `wednesday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `tuesday_dayoff`,
    ADD `thursday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `wednesday_dayoff`,
    ADD `friday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `thursday_dayoff`,
    ADD `saturday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `friday_dayoff`,
    ADD `sunday_dayoff` ENUM('T','F') NOT NULL DEFAULT 'T' AFTER `saturday_dayoff`;

  INSERT INTO `roles` (`id`, `role`, `status`) VALUES (NULL, 'tutor', 'T');
  UPDATE `roles` SET `id` = '3' WHERE `id` = 2;

  ALTER TABLE `dates` DROP INDEX foreign_id;

COMMIT;