-- MySQL dump 10.13 Distrib 8.0.34, for macos13 (x86_64) -- -- Host: localhost Database: teamlinker_dev -- ------------------------------------------------------ -- Server version 8.0.11 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!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' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `board` -- DROP TABLE IF EXISTS `board`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `project_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_id` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `board_column` -- DROP TABLE IF EXISTS `board_column`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board_column` ( `id` bigint(20) NOT NULL, `board_id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `weight` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `board_id` (`board_id`), KEY `weight` (`weight`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `board_column_workflow_node` -- DROP TABLE IF EXISTS `board_column_workflow_node`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board_column_workflow_node` ( `id` bigint(20) NOT NULL, `board_column_id` bigint(20) NOT NULL, `workflow_node_id` bigint(20) NOT NULL, `issue_type_id` bigint(20) NOT NULL, `board_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `board_column_id` (`board_column_id`), KEY `workflow_node_id` (`workflow_node_id`), KEY `issue_type_id` (`issue_type_id`), KEY `board_id` (`board_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `board_issue_type` -- DROP TABLE IF EXISTS `board_issue_type`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board_issue_type` ( `id` bigint(20) NOT NULL, `board_id` bigint(20) NOT NULL, `issue_type_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `board_id` (`board_id`), KEY `issue_type_id` (`issue_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `board_sprint` -- DROP TABLE IF EXISTS `board_sprint`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board_sprint` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `start_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `end_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `board_id` bigint(20) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `board_id` (`board_id`), KEY `status` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `board_sprint_issue` -- DROP TABLE IF EXISTS `board_sprint_issue`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board_sprint_issue` ( `id` bigint(20) NOT NULL, `board_sprint_swimlane_id` bigint(20) DEFAULT NULL, `project_issue_id` bigint(20) NOT NULL, `board_sprint_id` bigint(20) NOT NULL, `board_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `board_sprint_swimlane_id` (`board_sprint_swimlane_id`), KEY `project_issue_id` (`project_issue_id`), KEY `board_sprint_id` (`board_sprint_id`), KEY `board_id` (`board_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `board_sprint_swimlane` -- DROP TABLE IF EXISTS `board_sprint_swimlane`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `board_sprint_swimlane` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `board_sprint_id` bigint(20) NOT NULL, `board_id` bigint(20) NOT NULL, `priority` tinyint(4) NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `board_sprint_id` (`board_sprint_id`), KEY `board_id` (`board_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `calendar` -- DROP TABLE IF EXISTS `calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `calendar` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `reserved` tinyint(4) NOT NULL DEFAULT '0', `organization_user_id` bigint(20) NOT NULL, `type` tinyint(4) NOT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `organization_user_id` (`organization_user_id`), KEY `reserved` (`reserved`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `calendar_event` -- DROP TABLE IF EXISTS `calendar_event`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `calendar_event` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `start_time` timestamp NOT NULL, `end_time` timestamp NULL DEFAULT NULL, `all_day` tinyint(4) NOT NULL DEFAULT '0', `recurring` tinyint(4) NOT NULL DEFAULT '0', `recurring_day` tinyint(4) DEFAULT NULL, `reminder_minutes` tinyint(4) DEFAULT NULL, `calendar_id` bigint(20) NOT NULL, `location` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `unique_id` bigint(20) NOT NULL, `is_reminder` tinyint(4) NOT NULL DEFAULT '0', `created_by` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `calendar_id` (`calendar_id`), KEY `unique_id` (`unique_id`), KEY `created_by` (`created_by`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `calendar_event_guest` -- DROP TABLE IF EXISTS `calendar_event_guest`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `calendar_event_guest` ( `id` bigint(20) NOT NULL, `calendar_event_id` bigint(20) NOT NULL, `organization_user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `calendar_event_id` (`calendar_event_id`), KEY `organization_user_id` (`organization_user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `calendar_setting` -- DROP TABLE IF EXISTS `calendar_setting`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `calendar_setting` ( `id` bigint(20) NOT NULL, `timezone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `start_week_day` tinyint(4) NOT NULL, `organization_user_id` bigint(20) NOT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `organization_user_id` (`organization_user_id`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `content` -- DROP TABLE IF EXISTS `content`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `content` ( `id` bigint(20) NOT NULL, `type` tinyint(4) DEFAULT NULL, `ref_id` bigint(20) DEFAULT NULL, `created_by` bigint(20) DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `organization_id` bigint(20) DEFAULT NULL, `modified_by` bigint(20) DEFAULT NULL, `created_by_pure` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `user_id` (`created_by`), KEY `created_time` (`created_time`), KEY `organization_id` (`organization_id`), KEY `ref_id` (`ref_id`), KEY `created_by_pure` (`created_by_pure`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `file` -- DROP TABLE IF EXISTS `file`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `file` ( `id` bigint(20) unsigned NOT NULL, `created_by_pure` bigint(20) NOT NULL, `size` int(11) DEFAULT NULL, `type` tinyint(4) DEFAULT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `ref` int(11) NOT NULL DEFAULT '0', `md5` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `fk_file_user1_idx` (`created_by_pure`), KEY `created_time` (`created_time`), KEY `ref` (`ref`), KEY `md5` (`md5`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `finder_item` -- DROP TABLE IF EXISTS `finder_item`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `finder_item` ( `id` bigint(20) NOT NULL, `name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `type` tinyint(4) NOT NULL, `parent_folder_id` bigint(20) DEFAULT NULL, `created_by_pure` bigint(20) NOT NULL, `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ref_id` bigint(20) DEFAULT NULL, `organization_id` bigint(20) DEFAULT NULL, `file_id` bigint(20) DEFAULT NULL, `shortcut_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `parent_folder_id` (`parent_folder_id`), KEY `created_by_pure` (`created_by_pure`), KEY `ref_id` (`ref_id`), KEY `file_id` (`file_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `im_favorite_message` -- DROP TABLE IF EXISTS `im_favorite_message`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `im_favorite_message` ( `id` bigint(20) NOT NULL, `organization_user_id` bigint(20) NOT NULL, `created_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `from_name` varchar(65) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `content_type` tinyint(4) NOT NULL, `organization_id` bigint(20) NOT NULL, `ref_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `organization_user_id` (`organization_user_id`), KEY `organization_id` (`organization_id`), KEY `ref_id` (`ref_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `im_team_message` -- DROP TABLE IF EXISTS `im_team_message`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `im_team_message` ( `id` bigint(20) NOT NULL, `team_id` bigint(20) NOT NULL, `from_organization_user_id` bigint(20) NOT NULL, `created_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, `content_type` tinyint(4) NOT NULL, `file_id` bigint(20) DEFAULT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `team_id` (`team_id`), KEY `from_user_id` (`from_organization_user_id`), KEY `send_time` (`created_time`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `im_unread_message` -- DROP TABLE IF EXISTS `im_unread_message`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `im_unread_message` ( `id` bigint(20) NOT NULL, `organization_user_id` bigint(20) NOT NULL, `modified_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), `entity_id` bigint(20) NOT NULL, `entity_type` tinyint(4) NOT NULL, `count` int(11) NOT NULL DEFAULT '1', `unique_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `at` tinyint(4) DEFAULT '0', `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `unique_id_UNIQUE` (`unique_id`), KEY `organization_user_id` (`organization_user_id`), KEY `last_message_time` (`modified_time`), KEY `entity_id` (`entity_id`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `im_user_message` -- DROP TABLE IF EXISTS `im_user_message`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `im_user_message` ( `id` bigint(20) NOT NULL, `from_organization_user_id` bigint(20) NOT NULL, `to_organization_user_id` bigint(20) NOT NULL, `created_time` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, `content_type` tinyint(4) NOT NULL, `file_id` bigint(20) DEFAULT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `from_user_id` (`from_organization_user_id`), KEY `to_user_id` (`to_organization_user_id`), KEY `send_time` (`created_time`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `issue_type` -- DROP TABLE IF EXISTS `issue_type`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `issue_type` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `icon` bigint(20) DEFAULT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `issue_type_solution_id` bigint(20) NOT NULL, `reserved` tinyint(4) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `issue_type_solution_id` (`issue_type_solution_id`), KEY `reserved` (`reserved`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `issue_type_solution` -- DROP TABLE IF EXISTS `issue_type_solution`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `issue_type_solution` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `reserved` tinyint(4) NOT NULL DEFAULT '0', `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `system` (`reserved`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `meeting_miss_call` -- DROP TABLE IF EXISTS `meeting_miss_call`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `meeting_miss_call` ( `id` bigint(20) NOT NULL, `from_organization_user_id` bigint(20) NOT NULL, `to_organization_user_id` bigint(20) NOT NULL, `created_time` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3), `is_read` tinyint(4) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `from_organization_user_id` (`from_organization_user_id`), KEY `to_organization_user_id` (`to_organization_user_id`), KEY `is_read` (`is_read`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `meeting_room` -- DROP TABLE IF EXISTS `meeting_room`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `meeting_room` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `created_by` bigint(20) NOT NULL, `type` tinyint(4) NOT NULL, `related_id` bigint(20) NOT NULL, `start_time` timestamp NULL DEFAULT NULL, `end_time` timestamp NULL DEFAULT NULL, `password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `created_by` (`created_by`), KEY `type` (`type`), KEY `start_time` (`start_time`), KEY `end_time` (`end_time`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `member_tag` -- DROP TABLE IF EXISTS `member_tag`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `member_tag` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `member_tag_member` -- DROP TABLE IF EXISTS `member_tag_member`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `member_tag_member` ( `id` bigint(20) NOT NULL, `member_tag_id` bigint(20) NOT NULL, `organization_user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `member_tag_id` (`member_tag_id`), KEY `member_id` (`organization_user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `notification` -- DROP TABLE IF EXISTS `notification`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `notification` ( `id` bigint(20) NOT NULL, `type` tinyint(4) NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `status` tinyint(4) NOT NULL DEFAULT '0', `ref_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) NOT NULL, `operation_organization_user_id` bigint(20) DEFAULT NULL, `is_read` tinyint(4) NOT NULL DEFAULT '0', `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `organization_id` bigint(20) NOT NULL, `extra` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `is_read` (`is_read`), KEY `modified_time` (`modified_time`), KEY `organization_id` (`organization_id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `organization` -- DROP TABLE IF EXISTS `organization`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `organization` ( `id` bigint(20) NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `photo` bigint(20) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `created_by_pure` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `created_by` (`created_by_pure`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `organization_user` -- DROP TABLE IF EXISTS `organization_user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `organization_user` ( `id` bigint(20) NOT NULL, `organization_id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `nickname` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `department` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `job` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `email` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', `location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `photo` -- DROP TABLE IF EXISTS `photo`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `photo` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `file_id` bigint(20) DEFAULT NULL, `x` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `y` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `width` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `height` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `plan` -- DROP TABLE IF EXISTS `plan`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `plan` ( `id` bigint(20) NOT NULL, `name` varchar(65) COLLATE utf8mb4_general_ci NOT NULL, `start_time` timestamp NOT NULL, `organization_user_id` bigint(20) NOT NULL, `project_id` bigint(20) NOT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `organization_user_id` (`organization_user_id`), KEY `project_id` (`project_id`), KEY `organization_id` (`organization_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `plan_table` -- DROP TABLE IF EXISTS `plan_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `plan_table` ( `id` bigint(20) NOT NULL, `sort` tinyint(3) unsigned NOT NULL, `type` tinyint(4) NOT NULL, `name` varchar(65) COLLATE utf8mb4_general_ci DEFAULT NULL, `ref_id` bigint(20) DEFAULT NULL, `progress` tinyint(4) DEFAULT NULL, `depend_id` bigint(20) DEFAULT NULL, `delay` int(11) DEFAULT NULL, `parent_id` bigint(20) DEFAULT NULL, `plan_id` bigint(20) NOT NULL, `project_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `sort` (`sort`), KEY `ref_id` (`ref_id`), KEY `depend_id` (`depend_id`), KEY `parent_id` (`parent_id`), KEY `plan_id` (`plan_id`), KEY `project_id` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project` -- DROP TABLE IF EXISTS `project`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project` ( `id` bigint(20) NOT NULL, `keyword` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `name` varchar(65) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `photo` bigint(20) DEFAULT NULL, `created_by` bigint(20) NOT NULL, `description` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `organization_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `created_by` (`created_by`), KEY `organization_id` (`organization_id`), KEY `keyword` (`keyword`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue` -- DROP TABLE IF EXISTS `project_issue`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue` ( `id` bigint(20) unsigned NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `created_by` bigint(20) DEFAULT NULL, `project_id` bigint(20) NOT NULL, `issue_type_id` bigint(20) NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `priority` tinyint(4) DEFAULT NULL, `assigner_id` bigint(20) DEFAULT NULL, `reporter_id` bigint(20) DEFAULT NULL, `workflow_node_id` bigint(20) NOT NULL, `unique_id` int(10) unsigned DEFAULT NULL, `man_day` int(11) DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project` (`project_id`), KEY `issue_type` (`issue_type_id`), KEY `assigner` (`assigner_id`), KEY `reporter` (`reporter_id`), KEY `workflow_node` (`workflow_node_id`), KEY `unique_id` (`unique_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_approval` -- DROP TABLE IF EXISTS `project_issue_approval`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_approval` ( `id` bigint(20) NOT NULL, `project_issue_id` bigint(20) NOT NULL, `workflow_node_id` bigint(20) NOT NULL, `type` tinyint(4) NOT NULL, `approval_organization_user_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `project_issue_id_UNIQUE` (`project_issue_id`), KEY `workflow_node_id` (`workflow_node_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_field_value` -- DROP TABLE IF EXISTS `project_issue_field_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_field_value` ( `id` bigint(20) unsigned NOT NULL, `project_issue_id` bigint(20) NOT NULL, `workflow_node_field_type_id` bigint(20) NOT NULL, `number_value` int(11) DEFAULT NULL, `field_config_ids` json DEFAULT NULL, `string_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, `ref_values` json DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_issue` (`project_issue_id`), KEY `workflow_node_field_type_id` (`workflow_node_field_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_history` -- DROP TABLE IF EXISTS `project_issue_history`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_history` ( `id` bigint(20) NOT NULL, `type` tinyint(4) NOT NULL, `project_issue_id` bigint(20) NOT NULL, `organization_user_id` bigint(20) NOT NULL, `project_id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `value` varchar(65) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_issue_id` (`project_issue_id`), KEY `organization_user_id` (`organization_user_id`), KEY `project_id` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_parent` -- DROP TABLE IF EXISTS `project_issue_parent`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_parent` ( `id` bigint(20) unsigned NOT NULL, `parent_id` bigint(20) NOT NULL, `child_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `parent` (`parent_id`), KEY `child` (`child_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_process` -- DROP TABLE IF EXISTS `project_issue_process`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_process` ( `id` bigint(20) NOT NULL, `project_issue_id` bigint(20) NOT NULL, `workflow_node_process` json NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `project_issue_id_UNIQUE` (`project_issue_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_related` -- DROP TABLE IF EXISTS `project_issue_related`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_related` ( `id` bigint(20) unsigned NOT NULL, `project_issue_1_id` bigint(20) NOT NULL, `project_issue_2_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_issue_1` (`project_issue_1_id`), KEY `project_issue_2` (`project_issue_2_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_issue_type_solution` -- DROP TABLE IF EXISTS `project_issue_type_solution`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_issue_type_solution` ( `id` bigint(20) unsigned NOT NULL, `project_id` bigint(20) NOT NULL, `issue_type_solution_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `project_id_UNIQUE` (`project_id`), KEY `project` (`project_id`), KEY `issue_solution` (`issue_type_solution_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_label` -- DROP TABLE IF EXISTS `project_label`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_label` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `project_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `name` (`name`), KEY `project_id` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_label_issue` -- DROP TABLE IF EXISTS `project_label_issue`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_label_issue` ( `id` bigint(20) unsigned NOT NULL, `project_label_id` bigint(20) DEFAULT NULL, `project_issue_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_label_id` (`project_label_id`), KEY `project_issue_id` (`project_issue_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_module` -- DROP TABLE IF EXISTS `project_module`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_module` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `project_id` bigint(20) NOT NULL, `parent_module_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `name` (`name`), KEY `project_id` (`project_id`), KEY `parent_module_id` (`parent_module_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_module_issue` -- DROP TABLE IF EXISTS `project_module_issue`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_module_issue` ( `id` bigint(20) unsigned NOT NULL, `project_module_id` bigint(20) NOT NULL, `project_issue_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `project_issue_id_UNIQUE` (`project_issue_id`), KEY `project_module_id` (`project_module_id`), KEY `project_issue_id` (`project_issue_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_release` -- DROP TABLE IF EXISTS `project_release`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_release` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `start_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `release_time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `created_by` bigint(20) NOT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', `project_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project` (`project_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `project_release_issue` -- DROP TABLE IF EXISTS `project_release_issue`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `project_release_issue` ( `id` bigint(20) unsigned NOT NULL, `project_release_id` bigint(20) NOT NULL, `project_issue_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_release` (`project_release_id`), KEY `project_issue` (`project_issue_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `role` -- DROP TABLE IF EXISTS `role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `role` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `item_id` bigint(20) DEFAULT NULL, `organization_id` bigint(20) DEFAULT NULL, `type` tinyint(4) NOT NULL, `value` int(16) unsigned NOT NULL DEFAULT '0', `reserved` tinyint(4) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `project_id` (`item_id`), KEY `organization_id` (`organization_id`), KEY `item_id` (`item_id`), KEY `reserved` (`reserved`), KEY `value` (`value`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `role_member` -- DROP TABLE IF EXISTS `role_member`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `role_member` ( `id` bigint(20) NOT NULL, `member_id` bigint(20) DEFAULT NULL, `member_type` tinyint(4) NOT NULL, `role_id` bigint(20) NOT NULL, `item_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `member_id` (`member_id`), KEY `role_id` (`role_id`), KEY `item_id` (`item_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `sticky_note` -- DROP TABLE IF EXISTS `sticky_note`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `sticky_note` ( `id` bigint(20) NOT NULL, `content_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `x` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `y` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `width` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `height` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `content` (`content_id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `team` -- DROP TABLE IF EXISTS `team`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `team` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `created_by` bigint(20) DEFAULT NULL, `photo` bigint(20) DEFAULT NULL, `organization_id` bigint(20) NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`), KEY `name` (`name`), KEY `organization_id` (`organization_id`), KEY `created_by` (`created_by`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `team_user` -- DROP TABLE IF EXISTS `team_user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `team_user` ( `id` bigint(20) unsigned NOT NULL, `organization_user_id` bigint(20) NOT NULL, `team_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `fk_user_has_group_user1_idx` (`organization_user_id`), KEY `team_id` (`team_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `user` -- DROP TABLE IF EXISTS `user`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `user` ( `id` bigint(20) NOT NULL, `username` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `password` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `sign` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `active` tinyint(3) unsigned NOT NULL DEFAULT '1', `photo` bigint(20) DEFAULT NULL, `role` tinyint(4) NOT NULL DEFAULT '0', `count` int(11) DEFAULT '0', `from_type` tinyint(4) DEFAULT '0', `from_id` varchar(65) COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `username_UNIQUE` (`username`), UNIQUE KEY `from_id_UNIQUE` (`from_id`), KEY `from_id` (`from_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `user_setting` -- DROP TABLE IF EXISTS `user_setting`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `user_setting` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `wallpaper` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `user_id_UNIQUE` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `version` -- DROP TABLE IF EXISTS `version`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `version` ( `version` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, PRIMARY KEY (`version`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `wiki` -- DROP TABLE IF EXISTS `wiki`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `wiki` ( `id` bigint(20) NOT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `photo` bigint(20) DEFAULT NULL, `description` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `organization_id` bigint(20) NOT NULL, `created_by` bigint(20) NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `modified_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `name` (`name`), KEY `organization_id` (`organization_id`), KEY `created_by` (`created_by`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `wiki_item` -- DROP TABLE IF EXISTS `wiki_item`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `wiki_item` ( `id` bigint(20) NOT NULL, `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `wiki_id` bigint(20) NOT NULL, `parent_id` bigint(20) DEFAULT NULL, `created_by` bigint(20) NOT NULL, `created_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `weight` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `wiki_id` (`wiki_id`), KEY `parent_id` (`parent_id`), KEY `created_by` (`created_by`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `workflow_action` -- DROP TABLE IF EXISTS `workflow_action`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `workflow_action` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `source_node_id` bigint(20) NOT NULL, `dest_node_id` bigint(20) NOT NULL, `issue_type_id` bigint(20) NOT NULL, `source_anchor_point` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `end_anchor_point` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `source_node` (`source_node_id`), KEY `dest_node` (`dest_node_id`), KEY `issue_type_id` (`issue_type_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `workflow_approval` -- DROP TABLE IF EXISTS `workflow_approval`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `workflow_approval` ( `id` bigint(20) NOT NULL, `workflow_node_id` bigint(20) NOT NULL, `type` tinyint(4) NOT NULL, `value` json DEFAULT NULL, `extra` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), UNIQUE KEY `workflow_node_id_UNIQUE` (`workflow_node_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `workflow_node` -- DROP TABLE IF EXISTS `workflow_node`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `workflow_node` ( `id` bigint(20) unsigned NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `status` tinyint(4) NOT NULL DEFAULT '0', `issue_type_id` bigint(20) NOT NULL, `x` int(11) NOT NULL DEFAULT '0', `y` int(11) NOT NULL DEFAULT '0', `is_approval` tinyint(4) NOT NULL DEFAULT '0', `is_all_coming` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `status` (`status`), KEY `issue_type_id` (`issue_type_id`), KEY `is_all_coming` (`is_all_coming`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `workflow_node_field_type` -- DROP TABLE IF EXISTS `workflow_node_field_type`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `workflow_node_field_type` ( `id` bigint(20) unsigned NOT NULL, `workflow_node_id` bigint(20) NOT NULL, `field_type_id` tinyint(4) NOT NULL, `optional` tinyint(4) NOT NULL DEFAULT '0', `default_string_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `label_type` tinyint(4) DEFAULT NULL, `weight` tinyint(4) NOT NULL DEFAULT '50', `default_number_value` tinyint(4) DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `workflow_node` (`workflow_node_id`), KEY `weight` (`weight`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Table structure for table `workflow_node_field_type_config` -- DROP TABLE IF EXISTS `workflow_node_field_type_config`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `workflow_node_field_type_config` ( `id` bigint(20) unsigned NOT NULL, `workflow_node_field_type_id` bigint(20) NOT NULL, `value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `selected` tinyint(4) DEFAULT '0', `weight` tinyint(4) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id`), KEY `field` (`workflow_node_field_type_id`), KEY `weight` (`weight`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2023-11-06 16:35:44