DB

데이터 NOT NULL DEFAULT 오류.. 왜 이런 걸까요?

it

itsruin1
답변 대기중
30 XP
CREATE TABLE IF NOT EXISTS `database_name` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT 0,
  `title` mediumtext NOT NULL DEFAULT '',
  `item_name` text NOT NULL DEFAULT '',
  `item_code` text DEFAULT '',
  `price` bigint(20) NOT NULL DEFAULT 0,
  `amount` bigint(20) NOT NULL DEFAULT 0,
  `givemoney` bigint(20) NOT NULL DEFAULT 0,
  `setting` longtext NOT NULL DEFAULT '{}' COLLATE 'utf8mb4_bin',
  `chat` longtext NOT NULL DEFAULT '[]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;```

DataGrip 사용 중인데 [42000][1101] BLOB, TEXT, GEOMETRY or JSON column 'setting' can't have a default value 이러한 에러가 뜹니다.. 어떻게 해결해야 할까요?

불러오는 중...