-- MySQL Script generated by MySQL Workbench -- 01/21/15 05:48:52 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering 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='STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- ----------------------------------------------------- -- ----------------------------------------------------- -- Table `moderationQueueT` -- ----------------------------------------------------- DROP TABLE IF EXISTS `moderationQueueT` ; CREATE TABLE IF NOT EXISTS `moderationQueueT` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `nodeId` INT UNSIGNED NOT NULL, `comment1` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'initial comment', `comment2` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'comment when resolving', `resolved` ENUM('n','y') NOT NULL DEFAULT 'n', `added` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', `addedUserId` INT NULL, `addedUserName` VARCHAR(255) NULL, `addedIp` VARCHAR(40) NULL, `changed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `changedUserId` INT NULL, `changedUserName` VARCHAR(255) NULL, `changedIp` VARCHAR(40) NULL, PRIMARY KEY (`id`), INDEX `fk_moderationQueueT_nodeT1_idx` (`nodeId` ASC), INDEX `resolved_idx` (`resolved` ASC), CONSTRAINT `fk_moderationQueueT_nodeT1` FOREIGN KEY (`nodeId`) REFERENCES `nodeT` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;