title: My WordPress plugin can't create all the database tables I want on activation
body: <p>I am trying to create a plugin in WP and I need to create some tables with it. The problem is that when I use collation utf8_general_ci, the tables creation stops and does not create the 5th and the 6th table. The other tables execute normally. I can't find what's wrong.</p>
  
  <pre><code>&lt;?php
  /*
  Plugin Name: UniTimetable
  Plugin URI: 
  Description: A plugin to create timetable for lessons and classrooms
  Version: 1.0
  Author: Fotis Kokkoras, Antonis Roussos
  Author URI: https://www.linkedin.com/pub/antonis-roussos/47/25b/9a5
  License: GPLv2
  */
  
  register_activation_hook( __FILE__, 'utt_install' );
  
  
  function utt_install(){
          $sql = "
  CREATE TABLE IF NOT EXISTS `wp_utt_periods` (
    `periodID` INT UNSIGNED NOT NULL AUTO_INCREMENT,
    `year` YEAR NOT NULL COMMENT 'το έτος - έτσι θα μπορεί να κρατηθεί και ιστορικό σε βάθος χρόνου',
    `semester` ENUM('Ε','Χ') NOT NULL COMMENT 'Εαρινό, Χειμερινό',
    PRIMARY KEY (`periodID`))
  ENGINE = InnoDB
  DEFAULT CHARACTER SET = utf8
  COLLATE = utf8_general_ci;
  
  CREATE TABLE IF NOT EXISTS `wp_utt_subjects` (
    `subjectID` INT UNSIGNED NOT NULL AUTO_INCREMENT,
    `title` VARCHAR(64) NOT NULL COMMENT 'το επίσημο όνομα του μαθήματος',
    `type` ENUM('Θ','Ε','ΑΠ') NOT NULL COMMENT 'Θεωρία, Εργαστήριο, Άσκηση-Πράξη',
    `semester` TINYINT UNSIGNED NOT NULL COMMENT 'το εξάμηνο σπουδών στο οποίο απευθύνεται το μάθημα',
    `is_enabled` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'εαν το μάθημα είναι ενεργό - η εφαρμογή θα προβάλει μόνο τα ενεργά μαθήματα',
    PRIMARY KEY (`subjectID`))
  ENGINE = InnoDB
  DEFAULT CHARACTER SET = utf8
  COLLATE = utf8_general_ci;
  
  CREATE TABLE IF NOT EXISTS `wp_utt_groups` (
    `groupID` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'μοναδικό μέσω ευρετηρίου UQ - για χρήση ως FKey στον Lessons',
    `periodID` INT UNSIGNED NOT NULL COMMENT 'FKey από Periods',
    `subjectID` INT UNSIGNED NOT NULL COMMENT 'FKey από Subjects',
    `groupNo` TINYINT UNSIGNED NOT NULL COMMENT 'ο αριθμός της ομάδας (εργαστηριακής, κτλ)',
    PRIMARY KEY (`periodID`, `subjectID`, `groupNo`),
    INDEX `fk_Groups_Periods_idx` (`periodID` ASC),
    INDEX `fk_Groups_Subject1_idx` (`subjectID` ASC),
    UNIQUE INDEX `groupID_UNIQUE` (`groupID` ASC),
    CONSTRAINT `fk_Groups_Periods`
      FOREIGN KEY (`periodID`)
      REFERENCES `wp_utt_periods` (`periodID`)
      ON DELETE RESTRICT
      ON UPDATE CASCADE,
    CONSTRAINT `fk_Groups_Subjects`
      FOREIGN KEY (`subjectID`)
      REFERENCES `wp_utt_subjects` (`subjectID`)
      ON DELETE RESTRICT
      ON UPDATE CASCADE)
  ENGINE = InnoDB
  DEFAULT CHARACTER SET = utf8
  COLLATE = utf8_general_ci;
  
  CREATE TABLE IF NOT EXISTS `wp_utt_teachers` (
    `teacherID` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `surname` VARCHAR(35) NOT NULL,
    `name` VARCHAR(35) NULL,
    PRIMARY KEY (`teacherID`))
  ENGINE = InnoDB
  DEFAULT CHARACTER SET = utf8
  COLLATE = utf8_general_ci;
  
  CREATE TABLE IF NOT EXISTS `wp_utt_classrooms` (
    `classroomID` SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
    `name` VARCHAR(35) NOT NULL,
    `type` ENUM('Δ','Ε') NOT NULL COMMENT 'Διαλέξεων, Εργαστηρίου',
    `is_available` TINYINT(1) NOT NULL DEFAULT 1,
    PRIMARY KEY (`classroomID`))
  ENGINE = InnoDB
  DEFAULT CHARACTER SET = utf8
  COLLATE = utf8_general_ci;
  
  CREATE TABLE IF NOT EXISTS `wp_utt_lessons` (
    `groupID` INT UNSIGNED NOT NULL COMMENT 'FKey από Groups',
    `classroomID` SMALLINT UNSIGNED NOT NULL COMMENT 'FKey από Classrooms',
    `teacherID` SMALLINT UNSIGNED NOT NULL COMMENT 'FKey από Teachers',
    `datetime` DATETIME NOT NULL COMMENT 'το date part καθορίζει την ημερομηνία και το time part την ώρα',
    PRIMARY KEY (`groupID`, `classroomID`, `teacherID`, `datetime`),
    INDEX `fk_Lesson_Classrooms1_idx` (`classroomID` ASC),
    INDEX `fk_Lesson_Teachers1_idx` (`teacherID` ASC),
    UNIQUE INDEX `datetime_classroom_UNIQUE` (`datetime` ASC, `classroomID` ASC),
    UNIQUE INDEX `datetime_teacher_UNIQUE` (`datetime` ASC, `teacherID` ASC),
    UNIQUE INDEX `datetime_group_UNIQUE` (`datetime` ASC, `groupID` ASC),
    CONSTRAINT `fk_Lessons_Classrooms`
      FOREIGN KEY (`classroomID`)
      REFERENCES `wp_utt_classrooms` (`classroomID`)
      ON DELETE RESTRICT
      ON UPDATE CASCADE,
    CONSTRAINT `fk_Lessons_Teachers`
      FOREIGN KEY (`teacherID`)
      REFERENCES `wp_utt_teachers` (`teacherID`)
      ON DELETE RESTRICT
      ON UPDATE CASCADE,
    CONSTRAINT `fk_Lessons_Groups1`
      FOREIGN KEY (`groupID`)
      REFERENCES `wp_utt_groups` (`groupID`)
      ON DELETE RESTRICT
      ON UPDATE CASCADE)
  ENGINE = InnoDB
  DEFAULT CHARACTER SET = utf8
  COLLATE = utf8_general_ci;
  ";
  
          require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
          dbDelta($sql);
  }
  ?&gt;
  </code></pre>