<commit_before>-- MySQL Script generated by MySQL Workbench
-- 10/18/16 10:58:43
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';

-- -----------------------------------------------------
-- Schema version-control
-- -----------------------------------------------------


-- -----------------------------------------------------
-- Table `ver_user`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ver_user` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `username` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `username_canonical` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `email` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `email_canonical` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `enabled` TINYINT(1) NOT NULL,
  `salt` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `password` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `last_login` DATETIME NULL DEFAULT NULL,
  `locked` TINYINT(1) NOT NULL DEFAULT 0,
  `expired` TINYINT(1) NOT NULL DEFAULT 0,
  `expires_at` DATETIME NULL DEFAULT NULL,
  `confirmation_token` VARCHAR(255) CHARACTER SET 'utf8' NULL,
  `password_requested_at` DATETIME NULL DEFAULT NULL,
  `roles` LONGTEXT CHARACTER SET 'utf8' NOT NULL COMMENT '(DC2Type:array)',
  `credentials_expired` TINYINT(1) NOT NULL DEFAULT NULL,
  `credentials_expire_at` DATETIME NULL DEFAULT NULL,
  `name` VARCHAR(255) NULL DEFAULT NULL,
  `github_id` VARCHAR(255) NULL,
  `github_access_token` VARCHAR(255) NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_86EDD9B992FC23A8` (`username_canonical` ASC),
  UNIQUE INDEX `UNIQ_86EDD9B9A0D96FBF` (`email_canonical` ASC))
ENGINE = InnoDB
AUTO_INCREMENT = 2;


-- -----------------------------------------------------
-- Table `acl_classes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_classes` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class_type` VARCHAR(200) CHARACTER SET 'utf8' NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_69DD750638A36066` (`class_type` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_security_identities`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_security_identities` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `identifier` VARCHAR(200) CHARACTER SET 'utf8' NOT NULL,
  `username` TINYINT(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_8835EE78772E836AF85E0677` (`identifier` ASC, `username` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_object_identities`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_object_identities` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent_object_identity_id` INT(10) UNSIGNED NULL DEFAULT NULL,
  `class_id` INT(10) UNSIGNED NOT NULL,
  `object_identifier` VARCHAR(100) CHARACTER SET 'utf8' NOT NULL,
  `entries_inheriting` TINYINT(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_9407E5494B12AD6EA000B10` (`object_identifier` ASC, `class_id` ASC),
  INDEX `IDX_9407E54977FA751A` (`parent_object_identity_id` ASC),
  CONSTRAINT `FK_9407E54977FA751A`
    FOREIGN KEY (`parent_object_identity_id`)
    REFERENCES `acl_object_identities` (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_entries`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_entries` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class_id` INT(10) UNSIGNED NOT NULL,
  `object_identity_id` INT(10) UNSIGNED NULL DEFAULT NULL,
  `security_identity_id` INT(10) UNSIGNED NOT NULL,
  `field_name` VARCHAR(50) CHARACTER SET 'utf8' NULL DEFAULT NULL,
  `ace_order` SMALLINT(5) UNSIGNED NOT NULL,
  `mask` INT(11) NOT NULL,
  `granting` TINYINT(1) NOT NULL,
  `granting_strategy` VARCHAR(30) CHARACTER SET 'utf8' NOT NULL,
  `audit_success` TINYINT(1) NOT NULL,
  `audit_failure` TINYINT(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4` (`class_id` ASC, `object_identity_id` ASC, `field_name` ASC, `ace_order` ASC),
  INDEX `IDX_46C8B806EA000B103D9AB4A6DF9183C9` (`class_id` ASC, `object_identity_id` ASC, `security_identity_id` ASC),
  INDEX `IDX_46C8B806EA000B10` (`class_id` ASC),
  INDEX `IDX_46C8B8063D9AB4A6` (`object_identity_id` ASC),
  INDEX `IDX_46C8B806DF9183C9` (`security_identity_id` ASC),
  CONSTRAINT `FK_46C8B806DF9183C9`
    FOREIGN KEY (`security_identity_id`)
    REFERENCES `acl_security_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_46C8B8063D9AB4A6`
    FOREIGN KEY (`object_identity_id`)
    REFERENCES `acl_object_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_46C8B806EA000B10`
    FOREIGN KEY (`class_id`)
    REFERENCES `acl_classes` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_object_identity_ancestors`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_object_identity_ancestors` (
  `object_identity_id` INT(10) UNSIGNED NOT NULL,
  `ancestor_id` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`object_identity_id`, `ancestor_id`),
  INDEX `IDX_825DE2993D9AB4A6` (`object_identity_id` ASC),
  INDEX `IDX_825DE299C671CEA1` (`ancestor_id` ASC),
  CONSTRAINT `FK_825DE299C671CEA1`
    FOREIGN KEY (`ancestor_id`)
    REFERENCES `acl_object_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_825DE2993D9AB4A6`
    FOREIGN KEY (`object_identity_id`)
    REFERENCES `acl_object_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `project`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(80) NOT NULL,
  `description` VARCHAR(225) NULL,
  `path` VARCHAR(225) NULL,
  `ssh` TINYINT(1) NULL,
  `host` VARCHAR(225) NULL,
  `username` VARCHAR(225) NULL,
  `password` LONGTEXT NULL,
  `key_file` VARCHAR(225) NULL,
  `creator_id` INT(11) NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_project_ver_user_idx` (`creator_id` ASC),
  CONSTRAINT `fk_project_ver_user`
    FOREIGN KEY (`creator_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `user_projects`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `user_projects` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `roles` VARCHAR(225) NULL,
  `project_id` INT NOT NULL,
  `ver_user_id` INT(11) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_table1_project1_idx` (`project_id` ASC),
  INDEX `fk_table1_ver_user1_idx` (`ver_user_id` ASC),
  CONSTRAINT `fk_table1_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_table1_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_milestone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_milestone` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL,
  `description` LONGTEXT NULL,
  `state` VARCHAR(45) NULL,
  `due_on` DATETIME NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL,
  `closed_at` DATETIME NULL,
  `ver_user_id` INT(11) NULL,
  `project_id` INT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_milestone_ver_user1_idx` (`ver_user_id` ASC),
  CONSTRAINT `fk_issue_milestone_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL,
  `description` LONGTEXT NULL,
  `status` VARCHAR(45) NULL,
  `closed_at` DATETIME NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL,
  `github_number` INT NULL,
  `ver_user_id` INT(11) NULL,
  `project_id` INT NOT NULL,
  `issue_milestone_id` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_ver_user1_idx` (`ver_user_id` ASC),
  INDEX `fk_issue_project1_idx` (`project_id` ASC),
  INDEX `fk_issue_issue_milestone1_idx` (`issue_milestone_id` ASC),
  CONSTRAINT `fk_issue_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_issue_milestone1`
    FOREIGN KEY (`issue_milestone_id`)
    REFERENCES `issue_milestone` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_label`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_label` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(80) NULL,
  `hex_color` VARCHAR(80) NULL,
  `all_projects` TINYINT(1) NULL DEFAULT 0,
  `project_id` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_label_project1_idx` (`project_id` ASC),
  CONSTRAINT `fk_issue_label_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_comment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_comment` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `comment` LONGTEXT NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL,
  `ver_user_id` INT(11) NULL,
  `issue_id` INT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_comment_ver_user1_idx` (`ver_user_id` ASC),
  INDEX `fk_issue_comment_issue1_idx` (`issue_id` ASC),
  CONSTRAINT `fk_issue_comment_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_comment_issue1`
    FOREIGN KEY (`issue_id`)
    REFERENCES `issue` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_has_issue_label`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_has_issue_label` (
  `issue_id` INT NOT NULL,
  `issue_label_id` INT NOT NULL,
  PRIMARY KEY (`issue_id`, `issue_label_id`),
  INDEX `fk_issue_has_issue_label_issue_label1_idx` (`issue_label_id` ASC),
  INDEX `fk_issue_has_issue_label_issue1_idx` (`issue_id` ASC),
  CONSTRAINT `fk_issue_has_issue_label_issue1`
    FOREIGN KEY (`issue_id`)
    REFERENCES `issue` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_has_issue_label_issue_label1`
    FOREIGN KEY (`issue_label_id`)
    REFERENCES `issue_label` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_event`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_event` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `commit_id` VARCHAR(255) NULL,
  `event` VARCHAR(80) NULL COMMENT 'closed\nreopened\nreferenced\nmentioned\nassigned\nunassigned\nlabeled\nunlabeled\nmilestoned\ndemilestoned\nrenamed',
  `created_at` DATETIME NULL,
  `issue_id` INT NOT NULL,
  `issue_milestone_id` INT NOT NULL,
  `issue_label_id` INT NOT NULL,
  `ver_user_id` INT(11) NOT NULL,
  `assignee` INT(11) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_event_issue1_idx` (`issue_id` ASC),
  INDEX `fk_issue_event_issue_milestone1_idx` (`issue_milestone_id` ASC),
  INDEX `fk_issue_event_issue_label1_idx` (`issue_label_id` ASC),
  INDEX `fk_issue_event_ver_user1_idx` (`ver_user_id` ASC),
  INDEX `fk_issue_event_ver_user2_idx` (`assignee` ASC),
  CONSTRAINT `fk_issue_event_issue1`
    FOREIGN KEY (`issue_id`)
    REFERENCES `issue` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_issue_milestone1`
    FOREIGN KEY (`issue_milestone_id`)
    REFERENCES `issue_milestone` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_issue_label1`
    FOREIGN KEY (`issue_label_id`)
    REFERENCES `issue_label` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_ver_user2`
    FOREIGN KEY (`assignee`)
    REFERENCES `ver_user` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_environment_file_perm`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_environment_file_perm` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `file_owner` VARCHAR(80) NULL,
  `file_group` VARCHAR(80) NULL,
  `permission_owner_read` TINYINT(1) NULL,
  `permission_owner_write` TINYINT(1) NULL,
  `permission_owner_execute` TINYINT(1) NULL,
  `permission_sticky_uid` TINYINT(1) NULL,
  `permission_group_read` TINYINT(1) NULL,
  `permission_group_write` TINYINT(1) NULL,
  `permission_group_execute` TINYINT(1) NULL,
  `permission_sticky_gid` TINYINT(1) NULL,
  `permission_other_read` TINYINT(1) NULL,
  `permission_other_write` TINYINT(1) NULL,
  `permission_other_execute` TINYINT(1) NULL,
  `permission_sticky_bit` TINYINT(1) NULL,
  `enable_file_permissions` TINYINT(1) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_environment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_environment` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(80) NULL,
  `description` VARCHAR(225) NULL,
  `path` VARCHAR(225) NULL,
  `ssh` TINYINT(1) NULL,
  `host` VARCHAR(225) NULL,
  `username` VARCHAR(225) NULL,
  `password` LONGTEXT NULL,
  `key_file` VARCHAR(225) NULL,
  `project_id` INT NOT NULL,
  `project_environment_file_perm_id` INT NULL,
  `private_key` LONGTEXT NULL,
  `private_key_password` LONGTEXT NULL,
  `position` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_project_environment_project1_idx` (`project_id` ASC),
  INDEX `fk_project_environment_project_environment_file_perm1_idx` (`project_environment_file_perm_id` ASC),
  CONSTRAINT `fk_project_environment_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_project_environment_project_environment_file_perm1`
    FOREIGN KEY (`project_environment_file_perm_id`)
    REFERENCES `project_environment_file_perm` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_issue_integrator`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_issue_integrator` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `project_id` INT NOT NULL,
  `repo_type` VARCHAR(80) NULL,
  `class_name` VARCHAR(255) NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_project_issue_integrator_project1_idx` (`project_id` ASC),
  CONSTRAINT `fk_project_issue_integrator_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_issue_integrator_gitlab`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_issue_integrator_gitlab` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `project_name` VARCHAR(255) NULL,
  `url` VARCHAR(255) NULL,
  `api_token` VARCHAR(255) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_issue_integrator_github`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_issue_integrator_github` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `repo_name` VARCHAR(255) NULL,
  `owner_name` VARCHAR(255) NULL,
  `api_token` VARCHAR(255) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
<commit_msg>Fixed #2: Database schema updated<commit_after>-- MySQL Script generated by MySQL Workbench
-- 10/18/16 10:58:43
-- 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='TRADITIONAL,ALLOW_INVALID_DATES';

-- -----------------------------------------------------
-- Schema version-control
-- -----------------------------------------------------


-- -----------------------------------------------------
-- Table `ver_user`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ver_user` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `username` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `username_canonical` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `email` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `email_canonical` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `enabled` TINYINT(1) NOT NULL,
  `salt` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `password` VARCHAR(255) CHARACTER SET 'utf8' NOT NULL,
  `last_login` DATETIME NULL DEFAULT NULL,
  `locked` TINYINT(1) NOT NULL DEFAULT 0,
  `expired` TINYINT(1) NOT NULL DEFAULT 0,
  `expires_at` DATETIME NULL DEFAULT NULL,
  `confirmation_token` VARCHAR(255) CHARACTER SET 'utf8' NULL,
  `password_requested_at` DATETIME NULL DEFAULT NULL,
  `roles` LONGTEXT CHARACTER SET 'utf8' NOT NULL,
  `credentials_expired` TINYINT(1) NOT NULL DEFAULT 0,
  `credentials_expire_at` DATETIME NOT NULL DEFAULT 0,
  `name` VARCHAR(255) NULL DEFAULT NULL,
  `github_id` VARCHAR(255) NULL,
  `github_access_token` VARCHAR(255) NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_86EDD9B992FC23A8` (`username_canonical` ASC),
  UNIQUE INDEX `UNIQ_86EDD9B9A0D96FBF` (`email_canonical` ASC))
ENGINE = InnoDB
AUTO_INCREMENT = 2;


-- -----------------------------------------------------
-- Table `acl_classes`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_classes` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class_type` VARCHAR(200) CHARACTER SET 'utf8' NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_69DD750638A36066` (`class_type` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_security_identities`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_security_identities` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `identifier` VARCHAR(200) CHARACTER SET 'utf8' NOT NULL,
  `username` TINYINT(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_8835EE78772E836AF85E0677` (`identifier` ASC, `username` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_object_identities`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_object_identities` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `parent_object_identity_id` INT(10) UNSIGNED NULL DEFAULT NULL,
  `class_id` INT(10) UNSIGNED NOT NULL,
  `object_identifier` VARCHAR(100) CHARACTER SET 'utf8' NOT NULL,
  `entries_inheriting` TINYINT(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_9407E5494B12AD6EA000B10` (`object_identifier` ASC, `class_id` ASC),
  INDEX `IDX_9407E54977FA751A` (`parent_object_identity_id` ASC),
  CONSTRAINT `FK_9407E54977FA751A`
    FOREIGN KEY (`parent_object_identity_id`)
    REFERENCES `acl_object_identities` (`id`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_entries`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_entries` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `class_id` INT(10) UNSIGNED NOT NULL,
  `object_identity_id` INT(10) UNSIGNED NULL DEFAULT NULL,
  `security_identity_id` INT(10) UNSIGNED NOT NULL,
  `field_name` VARCHAR(50) CHARACTER SET 'utf8' NULL DEFAULT NULL,
  `ace_order` SMALLINT(5) UNSIGNED NOT NULL,
  `mask` INT(11) NOT NULL,
  `granting` TINYINT(1) NOT NULL,
  `granting_strategy` VARCHAR(30) CHARACTER SET 'utf8' NOT NULL,
  `audit_success` TINYINT(1) NOT NULL,
  `audit_failure` TINYINT(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4` (`class_id` ASC, `object_identity_id` ASC, `field_name` ASC, `ace_order` ASC),
  INDEX `IDX_46C8B806EA000B103D9AB4A6DF9183C9` (`class_id` ASC, `object_identity_id` ASC, `security_identity_id` ASC),
  INDEX `IDX_46C8B806EA000B10` (`class_id` ASC),
  INDEX `IDX_46C8B8063D9AB4A6` (`object_identity_id` ASC),
  INDEX `IDX_46C8B806DF9183C9` (`security_identity_id` ASC),
  CONSTRAINT `FK_46C8B806DF9183C9`
    FOREIGN KEY (`security_identity_id`)
    REFERENCES `acl_security_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_46C8B8063D9AB4A6`
    FOREIGN KEY (`object_identity_id`)
    REFERENCES `acl_object_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_46C8B806EA000B10`
    FOREIGN KEY (`class_id`)
    REFERENCES `acl_classes` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `acl_object_identity_ancestors`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acl_object_identity_ancestors` (
  `object_identity_id` INT(10) UNSIGNED NOT NULL,
  `ancestor_id` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`object_identity_id`, `ancestor_id`),
  INDEX `IDX_825DE2993D9AB4A6` (`object_identity_id` ASC),
  INDEX `IDX_825DE299C671CEA1` (`ancestor_id` ASC),
  CONSTRAINT `FK_825DE299C671CEA1`
    FOREIGN KEY (`ancestor_id`)
    REFERENCES `acl_object_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_825DE2993D9AB4A6`
    FOREIGN KEY (`object_identity_id`)
    REFERENCES `acl_object_identities` (`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_unicode_ci;


-- -----------------------------------------------------
-- Table `project`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(80) NOT NULL,
  `description` VARCHAR(225) NULL,
  `path` VARCHAR(225) NULL,
  `ssh` TINYINT(1) NULL,
  `host` VARCHAR(225) NULL,
  `username` VARCHAR(225) NULL,
  `password` LONGTEXT NULL,
  `key_file` VARCHAR(225) NULL,
  `creator_id` INT(11) NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_project_ver_user_idx` (`creator_id` ASC),
  CONSTRAINT `fk_project_ver_user`
    FOREIGN KEY (`creator_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `user_projects`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `user_projects` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `roles` VARCHAR(225) NULL,
  `project_id` INT NOT NULL,
  `ver_user_id` INT(11) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_table1_project1_idx` (`project_id` ASC),
  INDEX `fk_table1_ver_user1_idx` (`ver_user_id` ASC),
  CONSTRAINT `fk_table1_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_table1_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_milestone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_milestone` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL,
  `description` LONGTEXT NULL,
  `state` VARCHAR(45) NULL,
  `due_on` DATETIME NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL,
  `closed_at` DATETIME NULL,
  `ver_user_id` INT(11) NULL,
  `project_id` INT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_milestone_ver_user1_idx` (`ver_user_id` ASC),
  CONSTRAINT `fk_issue_milestone_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(255) NULL,
  `description` LONGTEXT NULL,
  `status` VARCHAR(45) NULL,
  `closed_at` DATETIME NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL,
  `github_number` INT NULL,
  `ver_user_id` INT(11) NULL,
  `project_id` INT NOT NULL,
  `issue_milestone_id` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_ver_user1_idx` (`ver_user_id` ASC),
  INDEX `fk_issue_project1_idx` (`project_id` ASC),
  INDEX `fk_issue_issue_milestone1_idx` (`issue_milestone_id` ASC),
  CONSTRAINT `fk_issue_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_issue_milestone1`
    FOREIGN KEY (`issue_milestone_id`)
    REFERENCES `issue_milestone` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_label`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_label` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(80) NULL,
  `hex_color` VARCHAR(80) NULL,
  `all_projects` TINYINT(1) NULL DEFAULT 0,
  `project_id` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_label_project1_idx` (`project_id` ASC),
  CONSTRAINT `fk_issue_label_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_comment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_comment` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `comment` LONGTEXT NULL,
  `created_at` DATETIME NULL,
  `updated_at` DATETIME NULL,
  `ver_user_id` INT(11) NULL,
  `issue_id` INT NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_comment_ver_user1_idx` (`ver_user_id` ASC),
  INDEX `fk_issue_comment_issue1_idx` (`issue_id` ASC),
  CONSTRAINT `fk_issue_comment_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_comment_issue1`
    FOREIGN KEY (`issue_id`)
    REFERENCES `issue` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_has_issue_label`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_has_issue_label` (
  `issue_id` INT NOT NULL,
  `issue_label_id` INT NOT NULL,
  PRIMARY KEY (`issue_id`, `issue_label_id`),
  INDEX `fk_issue_has_issue_label_issue_label1_idx` (`issue_label_id` ASC),
  INDEX `fk_issue_has_issue_label_issue1_idx` (`issue_id` ASC),
  CONSTRAINT `fk_issue_has_issue_label_issue1`
    FOREIGN KEY (`issue_id`)
    REFERENCES `issue` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_has_issue_label_issue_label1`
    FOREIGN KEY (`issue_label_id`)
    REFERENCES `issue_label` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `issue_event`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `issue_event` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `commit_id` VARCHAR(255) NULL,
  `event` VARCHAR(80) NULL COMMENT 'closed\nreopened\nreferenced\nmentioned\nassigned\nunassigned\nlabeled\nunlabeled\nmilestoned\ndemilestoned\nrenamed',
  `created_at` DATETIME NULL,
  `issue_id` INT NOT NULL,
  `issue_milestone_id` INT NOT NULL,
  `issue_label_id` INT NOT NULL,
  `ver_user_id` INT(11) NOT NULL,
  `assignee` INT(11) NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_issue_event_issue1_idx` (`issue_id` ASC),
  INDEX `fk_issue_event_issue_milestone1_idx` (`issue_milestone_id` ASC),
  INDEX `fk_issue_event_issue_label1_idx` (`issue_label_id` ASC),
  INDEX `fk_issue_event_ver_user1_idx` (`ver_user_id` ASC),
  INDEX `fk_issue_event_ver_user2_idx` (`assignee` ASC),
  CONSTRAINT `fk_issue_event_issue1`
    FOREIGN KEY (`issue_id`)
    REFERENCES `issue` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_issue_milestone1`
    FOREIGN KEY (`issue_milestone_id`)
    REFERENCES `issue_milestone` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_issue_label1`
    FOREIGN KEY (`issue_label_id`)
    REFERENCES `issue_label` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_ver_user1`
    FOREIGN KEY (`ver_user_id`)
    REFERENCES `ver_user` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_issue_event_ver_user2`
    FOREIGN KEY (`assignee`)
    REFERENCES `ver_user` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_environment_file_perm`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_environment_file_perm` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `file_owner` VARCHAR(80) NULL,
  `file_group` VARCHAR(80) NULL,
  `permission_owner_read` TINYINT(1) NULL,
  `permission_owner_write` TINYINT(1) NULL,
  `permission_owner_execute` TINYINT(1) NULL,
  `permission_sticky_uid` TINYINT(1) NULL,
  `permission_group_read` TINYINT(1) NULL,
  `permission_group_write` TINYINT(1) NULL,
  `permission_group_execute` TINYINT(1) NULL,
  `permission_sticky_gid` TINYINT(1) NULL,
  `permission_other_read` TINYINT(1) NULL,
  `permission_other_write` TINYINT(1) NULL,
  `permission_other_execute` TINYINT(1) NULL,
  `permission_sticky_bit` TINYINT(1) NULL,
  `enable_file_permissions` TINYINT(1) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_environment`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_environment` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `title` VARCHAR(80) NULL,
  `description` VARCHAR(225) NULL,
  `path` VARCHAR(225) NULL,
  `ssh` TINYINT(1) NULL,
  `host` VARCHAR(225) NULL,
  `username` VARCHAR(225) NULL,
  `password` LONGTEXT NULL,
  `key_file` VARCHAR(225) NULL,
  `project_id` INT NOT NULL,
  `project_environment_file_perm_id` INT NULL,
  `private_key` LONGTEXT NULL,
  `private_key_password` LONGTEXT NULL,
  `position` INT NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_project_environment_project1_idx` (`project_id` ASC),
  INDEX `fk_project_environment_project_environment_file_perm1_idx` (`project_environment_file_perm_id` ASC),
  CONSTRAINT `fk_project_environment_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_project_environment_project_environment_file_perm1`
    FOREIGN KEY (`project_environment_file_perm_id`)
    REFERENCES `project_environment_file_perm` (`id`)
    ON DELETE SET NULL
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_issue_integrator`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_issue_integrator` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `project_id` INT NOT NULL,
  `repo_type` VARCHAR(80) NULL,
  `class_name` VARCHAR(255) NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_project_issue_integrator_project1_idx` (`project_id` ASC),
  CONSTRAINT `fk_project_issue_integrator_project1`
    FOREIGN KEY (`project_id`)
    REFERENCES `project` (`id`)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_issue_integrator_gitlab`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_issue_integrator_gitlab` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `project_name` VARCHAR(255) NULL,
  `url` VARCHAR(255) NULL,
  `api_token` VARCHAR(255) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `project_issue_integrator_github`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project_issue_integrator_github` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `repo_name` VARCHAR(255) NULL,
  `owner_name` VARCHAR(255) NULL,
  `api_token` VARCHAR(255) NULL,
  PRIMARY KEY (`id`))
ENGINE = InnoDB;


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

{'fraction_non_alphanumeric': 0.21841040462427747, 'fraction_numerical': 0.029653179190751444, 'mean_word_length': 2.6422105263157896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7589800', 'n_tokens_mistral': 13205, 'n_tokens_neox': 11778, 'n_words': 2885}