CREATE TABLE IF NOT EXISTS NUE_INDEX_TAG_TREE
(
	NAME		VARCHAR(255)					NOT NULL				COMMENT '基準タグ名',
	SORT		TINYINT UNSIGNED				NOT NULL	DEFAULT 255	COMMENT 'ソート優先度',
	ENTITY_ID	CHAR(36) CHARACTER SET ascii	NOT NULL				COMMENT '実体ID',
	PRIMARY KEY (NAME),
	FOREIGN KEY (ENTITY_ID) REFERENCES NUE_ENTITIES(ID) ON UPDATE CASCADE ON DELETE CASCADE
)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='タグの親子ツリー構造索引';
