﻿CREATE TABLE `resource_category` (
  `category_id` TINYINT(3) UNSIGNED NOT NULL COMMENT '카테고리 ID (PK, 0-255)',
  `category_name` VARCHAR(40) NOT NULL COMMENT '카테고리 이름 (UNIQUE)',
  PRIMARY KEY (category_id)
)
ENGINE = INNODB,
AVG_ROW_LENGTH = 2048,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_general_ci,
COMMENT = '자산 카테고리',
ROW_FORMAT = DYNAMIC;

ALTER TABLE `resource_category` 
  ADD UNIQUE INDEX uix_category_name(category_name) COMMENT '카테고리 이름은 고유해야 함';