[Err] 1101 - BLOB/TEXT column 'user_data' can't have a default value

[Err] 1101 — BLOB/TEXT column 'user_data' can't have a default value

неправильно:
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent text(0) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text DEFAULT '' NOT NULL,
PRIMARY KEY (session_id)
);


так правильнее:
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent text(0) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text  NULL,
PRIMARY KEY (session_id)
);

Data too long for column 'useragent' at row 1

Data too long for column 'useragent' at row 1

надо поменять поле в базе данных useragent с varchar(50) на text


таблица создавалась по этому руководству whitepiano.ru/76/ci-sessions.html
и видимо код
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent varchar(50) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text DEFAULT '' NOT NULL,
PRIMARY KEY (session_id)
);


должен быть
CREATE TABLE IF NOT EXISTS  `ci_sessions` (
session_id varchar(40) DEFAULT '0' NOT NULL,
ip_address varchar(16) DEFAULT '0' NOT NULL,
user_agent text(0) NOT NULL,
last_activity int(10) unsigned DEFAULT 0 NOT NULL,
user_data text  NULL,
PRIMARY KEY (session_id)
);


тут еще изменена строка
user_data text DEFAULT '' NOT NULL,
иначе возникает [Err] 1101 — BLOB/TEXT column 'user_data' can't have a default value