
START TRANSACTION;

ALTER TABLE `listings` MODIFY `listing_loa` smallint(5) unsigned DEFAULT NULL;

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "front_horsepower");
UPDATE `multi_lang` SET `content` = 'Horsepower' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "lblHorsePower");
UPDATE `multi_lang` SET `content` = 'Horsepower' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "front_search_yatchs");
UPDATE `multi_lang` SET `content` = 'Search Yachts' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "publish_statuses_ARRAY_T");
UPDATE `multi_lang` SET `content` = 'Published' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "publish_statuses_ARRAY_F");
UPDATE `multi_lang` SET `content` = 'Hidden' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "publish_statuses_ARRAY_E");
UPDATE `multi_lang` SET `content` = 'Published until specific date' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "lblStatusTip");
UPDATE `multi_lang` SET `content` = 'You can add a yacht but choose not to show it on the website listing by choosing "Hidden". You can publish the yacht by choosing "Published" or you can make it live only till a certain date by choosing "Published until specific date"' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

INSERT INTO `fields` VALUES (NULL, 'infoUsersTitle', 'arrays', 'Infobox / List of users', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());

INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '1', 'title', 'List of users', 'script');
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '2', 'title', 'List of users', 'script');
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '3', 'title', 'List of users', 'script');

INSERT INTO `fields` VALUES (NULL, 'infoUsersDesc', 'arrays', 'Infobox / List of users', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());

INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '1', 'title', 'You can create different users - administrators (access to everything), editors (access to all yachts), owners (access to own yachts only).', 'script');
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '2', 'title', 'You can create different users - administrators (access to everything), editors (access to all yachts), owners (access to own yachts only).', 'script');
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '3', 'title', 'You can create different users - administrators (access to everything), editors (access to all yachts), owners (access to own yachts only).', 'script');

SET @id := (SELECT `id` FROM `fields` WHERE `key` = "lblExpireTip");
UPDATE `multi_lang` SET `content` = 'Set a date until the yacht will be published. Make sure Publish status is set published until specific date.' WHERE `foreign_id` = @id AND `model` = "pjField" AND `field` = "title";

COMMIT;