-- --------------------------------------------------------
-- 호스트:                          127.0.0.1
-- 서버 버전:                        10.5.8-MariaDB - mariadb.org binary distribution
-- 서버 OS:                        Win64
-- HeidiSQL 버전:                  11.0.0.5919
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- 테이블 dev_db.api_token 구조 내보내기
CREATE TABLE IF NOT EXISTS `api_token` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(50) NOT NULL,
    `app_name` varchar(50) NOT NULL,
    `token` varchar(1024) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `userIdIndex` (`user_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.attached_file 구조 내보내기
CREATE TABLE IF NOT EXISTS `attached_file` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `issue_id` bigint(20) DEFAULT NULL,
    `workspace_id` bigint(20) DEFAULT NULL,
    `name` varchar(4000) DEFAULT '',
    `path` varchar(4000) DEFAULT NULL,
    `file_type` varchar(10) DEFAULT NULL,
    `size` bigint(20) DEFAULT NULL,
    `content_type` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    `aws_key` varchar(255) DEFAULT NULL,
    `attached_type` varchar(20) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.company_field 구조 내보내기
CREATE TABLE IF NOT EXISTS `company_field` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    `manager` varchar(50) DEFAULT NULL,
    `tel` varchar(50) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `memo` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `url` varchar(255) DEFAULT NULL,
    `isp_id` bigint(20) DEFAULT NULL,
    `hosting_id` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `urlIndex` (`url`),
    KEY `ispIdIndex` (`isp_id`),
    KEY `hostingIdIndex` (`hosting_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.custom_field 구조 내보내기
CREATE TABLE IF NOT EXISTS `custom_field` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `name` varchar(15) NOT NULL,
    `custom_field_type` varchar(50) NOT NULL,
    `default_value` varchar(100) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `use_flag` varchar(1) NOT NULL DEFAULT 'Y',
    `required_data` varchar(1) NOT NULL DEFAULT 'N',
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.custom_field_api_default 구조 내보내기
CREATE TABLE IF NOT EXISTS `custom_field_api_default` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(11) NOT NULL,
    `issue_type_id` bigint(11) NOT NULL,
    `custom_field_id` bigint(11) NOT NULL,
    `custom_field_value` varchar(300) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `userIdIndex` (`user_id`) USING BTREE,
    KEY `issueTypeIdIndex` (`issue_type_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.custom_field_api_overlap 구조 내보내기
CREATE TABLE IF NOT EXISTS `custom_field_api_overlap` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(11) NOT NULL,
    `issue_type_id` bigint(11) NOT NULL,
    `custom_field_id` bigint(11) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `project_id` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `userIdIndex` (`user_id`) USING BTREE,
    KEY `issueTypeIdIndex` (`issue_type_id`) USING BTREE,
    KEY `projectIdIndex` (`project_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.custom_field_value 구조 내보내기
CREATE TABLE IF NOT EXISTS `custom_field_value` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `custom_field_id` bigint(20) NOT NULL,
    `value` varchar(100) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `customFieldIdIndex` (`custom_field_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.department 구조 내보내기
CREATE TABLE IF NOT EXISTS `department` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `department_name` varchar(50) NOT NULL,
    `department_description` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.email_template 구조 내보내기
CREATE TABLE IF NOT EXISTS `email_template` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `title` varchar(255) NOT NULL,
    `template` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.event 구조 내보내기
CREATE TABLE IF NOT EXISTS `event` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `title` varchar(200) NOT NULL,
    `description` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    `start_date` varchar(10) DEFAULT NULL COMMENT 'start_date',
    `end_date` varchar(10) DEFAULT NULL COMMENT 'end_date',
    `status` int(11) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.faq 구조 내보내기
CREATE TABLE IF NOT EXISTS `faq` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `title` varchar(200) NOT NULL,
    `description` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    `status` int(11) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.guide 구조 내보내기
CREATE TABLE IF NOT EXISTS `guide` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `title` varchar(200) NOT NULL,
    `description` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    `status` int(11) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.hosting_field 구조 내보내기
CREATE TABLE IF NOT EXISTS `hosting_field` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `code` varchar(50) NOT NULL,
    `name` varchar(50) NOT NULL,
    `manager` varchar(50) DEFAULT NULL,
    `tel` varchar(50) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `memo` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `url` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.isp_field 구조 내보내기
CREATE TABLE IF NOT EXISTS `isp_field` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `code` varchar(50) NOT NULL,
    `name` varchar(50) NOT NULL,
    `manager` varchar(50) DEFAULT NULL,
    `tel` varchar(50) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `memo` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `url` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `issue_status_id` bigint(20) DEFAULT NULL,
    `issue_type_id` bigint(20) DEFAULT NULL,
    `project_id` bigint(20) DEFAULT NULL,
    `priority_id` bigint(20) DEFAULT NULL,
    `severity_id` bigint(20) DEFAULT NULL,
    `title` varchar(300) DEFAULT NULL,
    `description` mediumtext DEFAULT NULL COMMENT 'description',
    `reverse_index` bigint(20) DEFAULT NULL,
    `issue_number` bigint(20) DEFAULT NULL,
    `start_date` varchar(20) DEFAULT NULL,
    `complete_date` varchar(20) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    `workflow_status_id` bigint(20) DEFAULT NULL,
    `parent_issue_id` bigint(11) DEFAULT NULL,
    `is_api` varchar(1) NOT NULL DEFAULT 'N',
    PRIMARY KEY (`id`),
    KEY `projectIdIndex` (`project_id`),
    KEY `reverseIndex` (`reverse_index`),
    KEY `issueTypeIdIndex` (`issue_type_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_api_default 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_api_default` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(11) NOT NULL,
    `issue_type_id` bigint(11) NOT NULL,
    `issue_status_id` bigint(20) DEFAULT NULL,
    `project_id` bigint(20) DEFAULT NULL,
    `priority_id` bigint(20) DEFAULT NULL,
    `severity_id` bigint(20) DEFAULT NULL,
    `title` varchar(300) DEFAULT NULL,
    `description` mediumtext DEFAULT NULL COMMENT 'description',
    `reverse_index` bigint(20) DEFAULT NULL,
    `issue_number` bigint(20) DEFAULT NULL,
    `start_date` varchar(20) DEFAULT NULL,
    `complete_date` varchar(20) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `userIdIndex` (`user_id`) USING BTREE,
    KEY `issueTypeIdIndex` (`issue_type_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_comment 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_comment` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `issue_id` bigint(20) NOT NULL COMMENT 'issue_id',
    `workspace_id` bigint(20) NOT NULL,
    `description` varchar(300) DEFAULT NULL COMMENT 'description',
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='issue_comment';

-- 테이블 dev_db.issue_company 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_company` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `issue_id` bigint(20) NOT NULL,
    `company_id` bigint(20) DEFAULT NULL,
    `name` varchar(50) DEFAULT NULL,
    `manager` varchar(50) DEFAULT NULL,
    `tel` varchar(50) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `memo` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    `url` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `companyIdIndex` (`company_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_custom_field_value 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_custom_field_value` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `issue_id` bigint(20) NOT NULL,
    `issue_type_custom_field_id` bigint(20) NOT NULL,
    `custom_field_id` bigint(20) NOT NULL,
    `use_value` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `customFieldIdIndex` (`custom_field_id`),
    KEY `issueTypeCustomFieldIdIndex` (`issue_type_custom_field_id`),
    KEY `issueIdIndex` (`issue_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_department 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_department` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `department_id` bigint(20) NOT NULL,
    `issue_id` bigint(20) NOT NULL,
    `workspace_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY (`id`),
    KEY `departmentIdAndIssueIdIndex` (`department_id`,`issue_id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`),
    KEY `departmentIdIndex` (`department_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_history 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_history` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `issue_id` bigint(20) DEFAULT NULL,
    `project_id` bigint(20) DEFAULT NULL,
    `issue_history_type` varchar(10) NOT NULL,
    `description` mediumtext DEFAULT NULL,
    `register_id` bigint(20) DEFAULT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `projectIdIndex` (`project_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_hosting 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_hosting` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `issue_id` bigint(20) NOT NULL,
    `hosting_id` bigint(20) DEFAULT NULL,
    `name` varchar(50) DEFAULT NULL,
    `code` varchar(50) DEFAULT NULL,
    `manager` varchar(50) DEFAULT NULL,
    `tel` varchar(50) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `memo` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    `url` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `hostingIdIndex` (`hosting_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_isp 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_isp` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `issue_id` bigint(20) NOT NULL,
    `isp_id` bigint(20) DEFAULT NULL,
    `name` varchar(50) DEFAULT NULL,
    `code` varchar(50) DEFAULT NULL,
    `manager` varchar(50) DEFAULT NULL,
    `tel` varchar(50) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `memo` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    `url` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `ispIdIndex` (`isp_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_number_generator 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_number_generator` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_id` bigint(20) NOT NULL,
    `number` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `projectIdIndex` (`project_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_relation 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_relation` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `issue_id` bigint(20) NOT NULL,
    `relation_issue_id` bigint(20) NOT NULL DEFAULT -1,
    `relation_issue_type` int(20) NOT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `issueId` (`issue_id`) USING BTREE,
    KEY `relationIssueId` (`relation_issue_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_reservation 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_reservation` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `issue_id` bigint(20) DEFAULT NULL,
    `workspace_id` bigint(20) DEFAULT NULL,
    `reservation` varchar(10) DEFAULT NULL,
    `issue_reservation_type` varchar(10) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`),
    KEY `issueIdIndex` (`issue_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_risk 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_risk` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `issue_id` bigint(20) NOT NULL,
    `workspace_id` bigint(20) NOT NULL,
    `change_assignee_count` bigint(20) NOT NULL DEFAULT 0,
    `change_issue_status_count` bigint(20) NOT NULL DEFAULT 0,
    `issue_status_ids` text NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `change_department_count` bigint(20) NOT NULL DEFAULT 0,
    PRIMARY KEY (`id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_search 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_search` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `user_id` bigint(20) NOT NULL,
    `conditions` mediumtext DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdAndUserIdIndex` (`workspace_id`,`user_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_status 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_status` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) DEFAULT NULL,
    `issue_status_type` varchar(50) DEFAULT NULL,
    `name` varchar(20) NOT NULL DEFAULT '',
    `default_yn` varchar(1) NOT NULL DEFAULT 'N',
    `color` varchar(255) NOT NULL,
    `position` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_table_config 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_table_config` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `user_id` bigint(20) NOT NULL,
    `issue_table_configs` mediumtext CHARACTER SET utf8 NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `issue_type_id` bigint(20) NOT NULL,
    `issue_table_type` int(11) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdAndUserIdIndex` (`workspace_id`,`user_id`),
    KEY `workspaceIdIndex` (`workspace_id`),
    KEY `issueTableTypeIndex` (`issue_table_type`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_type 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_type` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `workflow_id` bigint(20) NOT NULL,
    `name` varchar(15) NOT NULL,
    `description` mediumtext NOT NULL,
    `color` varchar(255) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `project_id` bigint(11) DEFAULT NULL,
    `use_partner` bigint(11) NOT NULL DEFAULT 0,
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`),
    KEY `workflowIdIndex` (`workflow_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_type_api_end_status 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_type_api_end_status` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) DEFAULT NULL,
    `project_id` bigint(20) DEFAULT NULL,
    `issue_type_id` bigint(20) DEFAULT NULL,
    `issue_status_id` bigint(20) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`),
    KEY `userIdIndex` (`user_id`),
    KEY `projectIdIndex` (`project_id`),
    KEY `issueTypeIdIndex` (`issue_type_id`),
    KEY `issueStatusIdIndex` (`issue_status_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_type_custom_field 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_type_custom_field` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_id` bigint(20) NOT NULL,
    `issue_type_id` bigint(20) NOT NULL,
    `custom_field_id` bigint(20) NOT NULL,
    `field_option` varchar(10) NOT NULL,
    `position` bigint(20) NOT NULL DEFAULT 0,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `projectIdIndex` (`project_id`),
    KEY `issueTypeIdIndex` (`issue_type_id`),
    KEY `customFieldIdIndex` (`custom_field_id`),
    KEY `projectIdAndIssueTypeIdIndex` (`project_id`,`issue_type_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_user 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_user` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) DEFAULT NULL,
    `issue_id` bigint(20) NOT NULL,
    `workspace_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `userIdAndIssueIdIndex` (`user_id`,`issue_id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`),
    KEY `userIdIndex` (`user_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.issue_version 구조 내보내기
CREATE TABLE IF NOT EXISTS `issue_version` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) DEFAULT NULL,
    `project_id` bigint(20) DEFAULT NULL,
    `issue_id` bigint(20) DEFAULT NULL,
    `version` bigint(20) DEFAULT NULL,
    `content` mediumtext DEFAULT NULL,
    `register_id` bigint(20) DEFAULT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`),
    KEY `projectIdIndex` (`project_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.notice 구조 내보내기
CREATE TABLE IF NOT EXISTS `notice` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `title` varchar(200) NOT NULL,
    `description` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.payment 구조 내보내기
CREATE TABLE IF NOT EXISTS `payment` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) DEFAULT NULL,
    `type` varchar(10) DEFAULT NULL,
    `price` bigint(20) DEFAULT NULL,
    `buy_user` bigint(20) DEFAULT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.payment_history 구조 내보내기
CREATE TABLE IF NOT EXISTS `payment_history` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `type` varchar(10) DEFAULT NULL,
    `price` bigint(20) DEFAULT NULL,
    `buy_user` bigint(20) DEFAULT NULL,
    `customer_uid` varchar(255) NOT NULL,
    `merchant_uid` varchar(255) NOT NULL,
    `payment_result` varchar(10) NOT NULL,
    `payment_response` mediumtext NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.permission 구조 내보내기
CREATE TABLE IF NOT EXISTS `permission` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    `action` varchar(50) NOT NULL,
    `role_type` varchar(2) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 데이터 owl_en_1.5.permission:~12 rows (대략적) 내보내기
/*!40000 ALTER TABLE `permission` DISABLE KEYS */;
INSERT INTO `permission` (`id`, `name`, `action`, `role_type`, `register_id`, `register_date`, `modify_id`, `modify_date`) VALUES
(1, '프로젝트 조회 권한', 'PROJECT_READ', '01', 1, '2017-12-29 21:38:48', 1, '2017-12-29 21:38:51'),
(2, '프로젝트 참여자 권한', 'PROJECT_JOIN', '03', 1, '2018-01-03 10:11:42', 1, '2018-01-03 10:11:43'),
(3, '프로젝트 관리자 권한', 'PROJECT_MANAGER', '04', 1, '2018-01-03 10:11:42', 1, '2018-01-03 10:11:43'),
(4, '이슈 통합 권한', 'ISSUE_TOTAL', '01', 1, '2018-02-23 12:24:06', 1, '2018-02-23 12:24:07'),
(5, '워크스페이스 관리자 권한', 'WORKSPACE_MANAGER', '02', 1, '2018-02-23 12:24:06', 1, '2018-02-23 12:25:42'),
(6, '대시보드 통합 권한', 'DASHBOARD_TOTAL', '01', 1, '2018-05-03 15:04:44', 1, '2018-05-03 15:04:47'),
(7, '사용자 조회 권한', 'USER_READ', '01', 1, '2018-05-03 15:04:44', 1, '2018-05-03 15:04:47'),
(8, '사용자 통합 권한', 'USER_TOTAL', '02', 1, '2018-05-03 15:04:44', 1, '2018-05-03 15:04:47'),
(9, '이슈 상태 통합 권한', 'ISSUE_STATUS_TOTAL', '01', 1, '2018-05-03 15:06:31', 1, '2018-05-03 15:06:32'),
(10, '워크플로우 통합 권한', 'WORKFLOW_TOTAL', '01', 1, '2018-05-03 15:07:09', 1, '2018-05-03 15:07:10'),
(11, '이슈 유형 통합 권한', 'ISSUE_TYPE_TOTAL', '01', 1, '2018-05-03 15:07:35', 1, '2018-05-03 15:07:36'),
(12, '사용자 정의 필드 통합 권한', 'CUSTOM_FIELD_TOTAL', '01', 1, '2018-05-03 15:07:55', 1, '2018-05-03 15:07:56'),
(13, '공지사항 조회 권한', 'NOTICE_READ', '01', 1, '2018-05-03 15:07:55', 1, '2018-05-03 15:07:56');
/*!40000 ALTER TABLE `permission` ENABLE KEYS */;

-- 테이블 owl_en_1.5.priority 구조 내보내기
CREATE TABLE IF NOT EXISTS `priority` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `name` varchar(1000) NOT NULL DEFAULT '',
    `position` int(11) DEFAULT NULL,
    `color` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.project 구조 내보내기
CREATE TABLE IF NOT EXISTS `project` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
    `workspace_id` bigint(20) NOT NULL DEFAULT 0,
    `name` varchar(50) NOT NULL COMMENT 'name',
    `project_key` varchar(10) NOT NULL,
    `project_type` varchar(50) NOT NULL,
    `description` mediumtext DEFAULT NULL COMMENT 'description',
    `status` varchar(2) NOT NULL DEFAULT '01' COMMENT '01:활성, 02:비활성',
    `start_date` varchar(10) DEFAULT NULL COMMENT 'start_date',
    `end_date` varchar(10) DEFAULT NULL COMMENT 'end_date',
    `default_yn` varchar(2) NOT NULL DEFAULT 'N',
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='project';

-- 테이블 dev_db.project_closure 구조 내보내기
CREATE TABLE IF NOT EXISTS `project_closure` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_id` bigint(20) NOT NULL,
    `parent_project_id` bigint(20) NOT NULL DEFAULT -1,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`) USING BTREE,
    KEY `projectIdIndex` (`project_id`) USING BTREE,
    KEY `parentProjectIdIndex` (`parent_project_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.project_role 구조 내보내기
CREATE TABLE IF NOT EXISTS `project_role` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_id` bigint(20) NOT NULL,
    `name` varchar(50) NOT NULL,
    `role_type` varchar(2) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `projectIdIndex` (`project_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.project_role_department 구조 내보내기
CREATE TABLE IF NOT EXISTS `project_role_department` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_role_id` bigint(20) NOT NULL,
    `department_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY (`id`),
    KEY `projectRoleIdAndDepartmentIdIndex` (`project_role_id`,`department_id`),
    KEY `departmentIdIndex` (`department_id`),
    KEY `projectRoleIdIndex` (`project_role_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.project_role_permission 구조 내보내기
CREATE TABLE IF NOT EXISTS `project_role_permission` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_role_id` bigint(20) NOT NULL,
    `permission_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `projectRoleIdIndex` (`project_role_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.project_role_user 구조 내보내기
CREATE TABLE IF NOT EXISTS `project_role_user` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `project_role_id` bigint(20) NOT NULL,
    `user_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `projectRoleIdAndUserIdIndex` (`project_role_id`,`user_id`),
    KEY `userIdIndex` (`user_id`),
    KEY `projectRoleIdIndex` (`project_role_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.qna 구조 내보내기
CREATE TABLE IF NOT EXISTS `qna` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `title` varchar(200) NOT NULL,
    `description` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.qna_answer 구조 내보내기
CREATE TABLE IF NOT EXISTS `qna_answer` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `ask_id` bigint(20) NOT NULL,
    `title` varchar(200) NOT NULL,
    `description` mediumtext NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
    `modify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.reservation_disable_user 구조 내보내기
CREATE TABLE IF NOT EXISTS `reservation_disable_user` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `payment_id` bigint(20) DEFAULT NULL,
    `user_ids` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) DEFAULT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `paymentIdIndex` (`payment_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.schema_version 구조 내보내기
CREATE TABLE IF NOT EXISTS `schema_version` (
    `installed_rank` int(11) NOT NULL,
    `version` varchar(50) DEFAULT NULL,
    `description` varchar(200) NOT NULL,
    `type` varchar(20) NOT NULL,
    `script` varchar(1000) NOT NULL,
    `checksum` int(11) DEFAULT NULL,
    `installed_by` varchar(100) NOT NULL,
    `installed_on` timestamp NOT NULL DEFAULT current_timestamp(),
    `execution_time` int(11) NOT NULL,
    `success` tinyint(1) NOT NULL,
    PRIMARY KEY (`installed_rank`),
    KEY `schema_version_s_idx` (`success`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- 테이블 dev_db.severity 구조 내보내기
CREATE TABLE IF NOT EXISTS `severity` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `name` varchar(50) NOT NULL,
    `position` bigint(20) NOT NULL,
    `color` varchar(255) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.system_email 구조 내보내기
CREATE TABLE IF NOT EXISTS `system_email` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `send_address` varchar(50) NOT NULL,
    `email_type` varchar(255) DEFAULT NULL,
    `parameter` mediumtext NOT NULL,
    `send_yn` varchar(2) NOT NULL DEFAULT 'N',
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.system_role 구조 내보내기
CREATE TABLE IF NOT EXISTS `system_role` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    `role_type` varchar(2) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 데이터 owl_en_1.5.system_role:~2 rows (대략적) 내보내기
/*!40000 ALTER TABLE `system_role` DISABLE KEYS */;
INSERT INTO `system_role` (`id`, `name`, `role_type`, `register_id`, `register_date`, `modify_id`, `modify_date`) VALUES
(1, '일반 사용자 역할', '01', 1, '2017-12-29 21:37:15', 1, '2017-12-29 21:37:16'),
(2, '워크스페이스 관리자 역할', '02', 1, '2017-12-29 21:37:27', 1, '2017-12-29 21:37:28'),
(3, '프로젝트 사용자 역할', '03', 1, '2017-12-29 21:37:15', 1, '2017-12-29 21:37:15'),
(4, '프로젝트 관리자 역할', '04', 1, '2017-12-29 21:37:15', 1, '2017-12-29 21:37:15');
/*!40000 ALTER TABLE `system_role` ENABLE KEYS */;

-- 테이블 owl_en_1.5.system_role_permission 구조 내보내기
CREATE TABLE IF NOT EXISTS `system_role_permission` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `system_role_id` bigint(20) NOT NULL,
    `permission_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 데이터 owl_en_1.5.system_role_permission:~18 rows (대략적) 내보내기
/*!40000 ALTER TABLE `system_role_permission` DISABLE KEYS */;
INSERT INTO `system_role_permission` (`id`, `system_role_id`, `permission_id`, `register_id`, `register_date`, `modify_id`, `modify_date`) VALUES
(1, 1, 1, 1, '2018-05-08 15:46:30', 1, '2018-05-08 15:46:31'),
(2, 1, 4, 1, '2018-05-08 15:46:37', 1, '2018-05-08 15:46:38'),
(3, 1, 6, 1, '2018-05-08 15:46:47', 1, '2018-05-08 15:46:48'),
(4, 1, 7, 1, '2018-05-08 15:46:59', 1, '2018-05-08 15:47:00'),
(5, 1, 9, 1, '2018-05-08 15:47:06', 1, '2018-05-08 15:47:07'),
(6, 1, 10, 1, '2018-05-08 15:47:14', 1, '2018-05-08 15:47:15'),
(7, 1, 11, 1, '2018-05-08 15:47:21', 1, '2018-05-08 15:47:22'),
(8, 1, 12, 1, '2018-05-08 15:47:29', 1, '2018-05-08 15:47:30'),
(9, 2, 1, 1, '2018-05-08 15:51:30', 1, '2018-05-08 15:51:31'),
(10, 2, 4, 1, '2018-05-08 15:51:37', 1, '2018-05-08 15:51:37'),
(11, 2, 5, 1, '2018-05-08 15:51:43', 1, '2018-05-08 15:51:43'),
(12, 2, 6, 1, '2018-05-08 15:51:49', 1, '2018-05-08 15:51:50'),
(13, 2, 7, 1, '2018-05-08 15:51:57', 1, '2018-05-08 15:51:57'),
(14, 2, 8, 1, '2018-05-08 15:52:04', 1, '2018-05-08 15:52:04'),
(15, 2, 9, 1, '2018-05-08 15:52:13', 1, '2018-05-08 15:52:14'),
(16, 2, 10, 1, '2018-05-08 15:52:20', 1, '2018-05-08 15:52:21'),
(17, 2, 11, 1, '2018-05-08 15:52:28', 1, '2018-05-08 15:52:28'),
(18, 2, 12, 1, '2018-05-08 15:52:35', 1, '2018-05-08 15:52:36'),
(19, 1, 13, 1, '2019-06-12 12:06:35', 1, '2019-06-12 12:06:37'),
(20, 2, 13, 1, '2019-06-12 12:06:47', 1, '2019-06-12 12:06:49');
/*!40000 ALTER TABLE `system_role_permission` ENABLE KEYS */;

-- 테이블 owl_en_1.5.system_role_user 구조 내보내기
CREATE TABLE IF NOT EXISTS `system_role_user` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `system_role_id` bigint(20) NOT NULL,
    `user_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `userIdIndex` (`user_id`),
    KEY `systemRoleidIndex` (`system_role_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user 구조 내보내기
CREATE TABLE IF NOT EXISTS `user` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(50) NOT NULL,
    `account` varchar(50) DEFAULT NULL,
    `password` varchar(200) DEFAULT NULL,
    `profile` varchar(200) DEFAULT NULL,
    `status` varchar(2) NOT NULL DEFAULT '02',
    `phone` varchar(20) DEFAULT NULL,
    `social_type` varchar(10) DEFAULT NULL,
    `last_workspace_id` bigint(20) DEFAULT NULL,
    `reservation_notify_time` varchar(20) DEFAULT NULL,
    `language` varchar(10) NOT NULL,
    `aws_key` varchar(255) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `licensekey` varchar(255) DEFAULT NULL,
    `last_project_id` bigint(20) DEFAULT 0,
    `last_issue_type_id` bigint(20) DEFAULT 0,
    `last_login_date` timestamp NULL DEFAULT NULL,
    `level_id` bigint(11) DEFAULT NULL,
    `insert_type` varchar(1) NOT NULL DEFAULT 'N',
    PRIMARY KEY (`id`),
    KEY `levelIdIndex` (`level_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_department 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_department` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `department_id` bigint(11) DEFAULT NULL,
    `user_id` bigint(11) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_invite 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_invite` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `email` varchar(255) NOT NULL,
    `status` varchar(10) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_invite_project 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_invite_project` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_invite_id` bigint(20) NOT NULL,
    `project_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `userInviteIdIndex` (`user_invite_id`),
    KEY `projectIdIndex` (`project_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_level 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_level` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `level_name` varchar(50) NOT NULL,
    `permission` int(11) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    `default_yn` varchar(1) NOT NULL DEFAULT 'N',
    `basic_user` varchar(1) NOT NULL DEFAULT 'N',
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_like_issue 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_like_issue` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) NOT NULL,
    `issue_id` bigint(20) NOT NULL,
    `workspace_id` bigint(20) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `userIdIndex` (`user_id`),
    KEY `issueIdIndex` (`issue_id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_with_draw 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_with_draw` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `account` varchar(200) NOT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `accountIndex` (`account`(191))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.user_workspace 구조 내보내기
CREATE TABLE IF NOT EXISTS `user_workspace` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `user_id` bigint(20) DEFAULT NULL,
    `workspace_id` bigint(20) DEFAULT NULL,
    `manager_yn` varchar(2) NOT NULL DEFAULT 'N',
    `use_yn` varchar(2) NOT NULL DEFAULT 'N',
    `disable_position` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `userIdIndex` (`user_id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.workflow 구조 내보내기
CREATE TABLE IF NOT EXISTS `workflow` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workspace_id` bigint(20) NOT NULL,
    `name` varchar(50) NOT NULL,
    `description` mediumtext DEFAULT NULL,
    `project_type` varchar(50) DEFAULT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `workspaceIdIndex` (`workspace_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.workflow_department 구조 내보내기
CREATE TABLE IF NOT EXISTS `workflow_department` (
    `id` bigint(11) NOT NULL AUTO_INCREMENT,
    `workflow_id` bigint(11) DEFAULT NULL,
    `issue_status_id` bigint(11) DEFAULT NULL,
    `department_id` bigint(11) DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    KEY `workflowIdIndex` (`workflow_id`) USING BTREE,
    KEY `issueStatusIdIndex` (`issue_status_id`) USING BTREE,
    KEY `departmentIdIndex` (`department_id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.workflow_status 구조 내보내기
CREATE TABLE IF NOT EXISTS `workflow_status` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `project_id` bigint(20) DEFAULT NULL,
    `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `first_yn` varchar(1) CHARACTER SET utf8 NOT NULL DEFAULT 'N',
    `last_yn` varchar(1) CHARACTER SET utf8 NOT NULL DEFAULT 'N',
    `progress` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '진행률',
    `color` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '0',
    `position` bigint(20) NOT NULL DEFAULT 0,
    `register_id` bigint(20) NOT NULL COMMENT 'register_id',
    `register_date` timestamp NULL DEFAULT NULL COMMENT 'register_date',
    `modify_id` bigint(20) NOT NULL COMMENT 'modify_id',
    `modify_date` timestamp NULL DEFAULT NULL COMMENT 'modify_date',
    PRIMARY KEY (`id`) USING BTREE
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.workflow_transition 구조 내보내기
CREATE TABLE IF NOT EXISTS `workflow_transition` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `workflow_id` bigint(20) NOT NULL,
    `source_issue_status_id` bigint(20) NOT NULL,
    `target_issue_status_id` bigint(20) NOT NULL,
    `source_x` bigint(20) DEFAULT NULL,
    `source_y` bigint(20) DEFAULT NULL,
    `target_x` bigint(20) DEFAULT NULL,
    `target_y` bigint(20) DEFAULT NULL,
    `correct_x` bigint(20) DEFAULT NULL,
    `correct_y` bigint(20) DEFAULT NULL,
    `direct` varchar(2) NOT NULL DEFAULT 'N',
    `register_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `workflowIdIndex` (`workflow_id`),
    KEY `sourceIssueStatusIdIndex` (`source_issue_status_id`),
    KEY `targetIssueStatusIdIndex` (`target_issue_status_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 테이블 dev_db.workspace 구조 내보내기
CREATE TABLE IF NOT EXISTS `workspace` (
    `id` bigint(20) NOT NULL AUTO_INCREMENT,
    `name` varchar(255) NOT NULL,
    `max_user` bigint(20) NOT NULL,
    `start_date` timestamp NULL DEFAULT NULL,
    `expire_date` timestamp NULL DEFAULT NULL,
    `storage_size` bigint(20) NOT NULL,
    `use_traffic` bigint(20) DEFAULT NULL,
    `service_type` varchar(10) DEFAULT NULL,
    `register_date` timestamp NULL DEFAULT NULL,
    `register_id` bigint(20) NOT NULL,
    `modify_date` timestamp NULL DEFAULT NULL,
    `modify_id` bigint(20) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;