UPDATE resource_status SET description = 'Bookings are confirmed by resource admin' WHERE id = '5'; 
UPDATE resource_status SET description = 'Bookings are confirmed automatically via real-time usage tracking' WHERE id = '4';
INSERT INTO `helpdesk_category`(`id`, `label`) VALUES (NULL,'Maintenance log');

CREATE TABLE `onboarding_users` ( `id` INT NOT NULL AUTO_INCREMENT , `onboarding` INT NOT NULL , `user` INT NOT NULL , `dismiss` INT NOT NULL , `last_update` DATETIME NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
ALTER TABLE `onboarding_users` ADD CONSTRAINT `onboarding_ibfk2` FOREIGN KEY (`user`) REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
CREATE TABLE `onboarding_dismissall` ( `id` INT NOT NULL AUTO_INCREMENT , `user` INT NOT NULL , `dismiss` INT NOT NULL , `date` DATETIME NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;


-- AGENDO CONFIG
CREATE TABLE `onboarding_config` ( `id` TINYINT NOT NULL AUTO_INCREMENT , `name` TEXT NOT NULL , `steps` TEXT NOT NULL , `active` TINYINT(2) NOT NULL , `date` DATETIME NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
ALTER TABLE `onboarding_config` ADD `page` TEXT NOT NULL AFTER `steps`, ADD `user_level` TEXT NOT NULL AFTER `page`;

INSERT INTO `onboarding_config`(`id`, `name`, `steps`, `page`, `user_level`, `active`, `date`) 
VALUES (NULL,
"First step",'[{\"element\":\"#nav-state-toggle\",\"popover\":{\"className\":\"first-step-popover-class\",\"title\":\"Menu\",\"description\":\"Here you can see requests, calendars, configurations and more...\",\"position\":\"right\"}},
               {\"element\":\"#mailing_list_icon\",\"popover\":{\"title\":\"Mail\",\"description\":\"You can send mails to all users in agendo.\",\"position\":\"bottom\"}},
               {\"element\":\"#notifications-dropdown-toggle\",\"popover\":{\"title\":\"Notifications\",\"description\":\"Check new messages, your next events, your issues and more.\",\"position\":\"bottom\"}},
               {\"element\":\"#new-permission-icon\",\"popover\":{\"title\":\"Permissions\",\"description\":\"You can ask for new permissions.\",\"position\":\"bottom\"}}]',"/","",1,"2019-04-10");

INSERT INTO `onboarding_users`(`id`, `onboarding`, `user`, `dismiss`, `last_update`) SELECT NULL, 1, id, 1, '2019-04-18' FROM users WHERE level > 0;