Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Latest commit

 

History

History
59 lines (44 loc) · 3.3 KB

wiki_pages.md

File metadata and controls

59 lines (44 loc) · 3.3 KB

wiki_pages

概要

Wikiページ

テーブル定義
CREATE TABLE `wiki_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `wiki_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `created_on` datetime NOT NULL,
  `protected` tinyint(1) NOT NULL DEFAULT 0,
  `parent_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `wiki_pages_wiki_id_title` (`wiki_id`,`title`),
  KEY `index_wiki_pages_on_wiki_id` (`wiki_id`),
  KEY `index_wiki_pages_on_parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci

カラム一覧

名前 タイプ デフォルト値 NULL許可 Extra Definition 子テーブル 親テーブル コメント
id int(11) false auto_increment wiki_pages wiki_contents wiki_content_versions
wiki_id int(11) false wikis
title varchar(255) false
created_on datetime false
protected tinyint(1) 0 false
parent_id int(11) NULL true wiki_pages

制約一覧

名前 タイプ 定義
PRIMARY PRIMARY KEY PRIMARY KEY (id)

INDEX一覧

名前 定義
index_wiki_pages_on_parent_id KEY index_wiki_pages_on_parent_id (parent_id) USING BTREE
index_wiki_pages_on_wiki_id KEY index_wiki_pages_on_wiki_id (wiki_id) USING BTREE
wiki_pages_wiki_id_title KEY wiki_pages_wiki_id_title (wiki_id, title) USING BTREE
PRIMARY PRIMARY KEY (id) USING BTREE

ER図

er


Generated by tbls