SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

ALTER TABLE `configurations`
ADD COLUMN `allow_download` INT(1) NOT NULL DEFAULT 0;

ALTER TABLE `configurations`
ADD COLUMN `disable_youtubeupload` INT(1) NOT NULL DEFAULT 0;

ALTER TABLE `categories` 
ADD `description` TEXT NULL AFTER `clean_name`;

ALTER TABLE `categories` 
ADD `nextVideoOrder` INT(2) NOT NULL DEFAULT '0' AFTER `description`;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

UPDATE configurations SET  version = '5.0', modified = now() WHERE id = 1;