forked from codesquad-members-2023/todo-max
-
Notifications
You must be signed in to change notification settings - Fork 1
DDL
Ju, Seonghwan (Ape) edited this page Jul 21, 2023
·
1 revision
-- MySQL dump 10.13 Distrib 8.0.33, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: todo
-- ------------------------------------------------------
-- Server version 8.0.33
/*!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 */;
/*!50503 SET NAMES utf8 */;
/*!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 `history`
--
DROP TABLE IF EXISTS `history`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `history` (
`id` bigint NOT NULL AUTO_INCREMENT,
`member_id` bigint NOT NULL,
`action` varchar(45) NOT NULL,
`tdl_card_title` varchar(30) NOT NULL,
`action_datetime` datetime NOT NULL,
`deleted` tinyint NOT NULL DEFAULT '0',
`tdl_column_previous_title` varchar(50) DEFAULT NULL,
`tdl_column_current_title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fk_history_member1_idx` (`member_id`),
CONSTRAINT `fk_history_member1` FOREIGN KEY (`member_id`) REFERENCES `member` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `member`
--
DROP TABLE IF EXISTS `member`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member` (
`id` bigint NOT NULL AUTO_INCREMENT,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`create_datetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `email_UNIQUE` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `refresh_token`
--
DROP TABLE IF EXISTS `refresh_token`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `refresh_token` (
`id` bigint NOT NULL AUTO_INCREMENT,
`refresh_token` varchar(2000) NOT NULL,
`member_id` bigint NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `member_id_UNIQUE` (`member_id`),
KEY `fk_refresh_token_member1_idx` (`member_id`),
CONSTRAINT `fk_refresh_token_member1` FOREIGN KEY (`member_id`) REFERENCES `member` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tdl_card`
--
DROP TABLE IF EXISTS `tdl_card`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tdl_card` (
`id` bigint NOT NULL AUTO_INCREMENT,
`tdl_column_id` bigint NOT NULL,
`title` varchar(30) NOT NULL,
`content` varchar(500) NOT NULL,
`author` varchar(200) NOT NULL DEFAULT 'web',
`deleted` tinyint NOT NULL DEFAULT '0',
`weight_value` bigint NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `fk_tdl_card_tdl_column1_idx` (`tdl_column_id`),
CONSTRAINT `fk_tdl_card_tdl_column1` FOREIGN KEY (`tdl_column_id`) REFERENCES `tdl_column` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tdl_column`
--
DROP TABLE IF EXISTS `tdl_column`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tdl_column` (
`id` bigint NOT NULL AUTO_INCREMENT,
`member_id` bigint NOT NULL,
`title` varchar(50) NOT NULL,
`deleted` tinyint NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `fk_tdl_column_member_idx` (`member_id`),
CONSTRAINT `fk_tdl_column_member` FOREIGN KEY (`member_id`) REFERENCES `member` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_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-07-21 11:12:16