I'm using Ubuntu 18.04 with Mysql and I'm trying to drop this SQL file:
CREATE TABLE IF NOT EXISTS `ammunition`
(
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`owner` text DEFAULT NULL,
`original_owner` text NOT NULL,
`hash` text NOT NULL,
`weapon_id` char(60) NOT NULL,
`count` int(11) NOT NULL DEFAULT 0,
`attach` text NOT NULL DEFAULT '[]',
PRIMARY KEY (`id`),
UNIQUE KEY `weapon_id` (`weapon_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4;
I keep getting this error:
SQL ERROR (1101): BLOB, TEXT, GEOMETRY or JSON column
attach
can't have a default value
I've tried solving it, but the only suggestion I could find was to disable strict mode.
I disabled it permanently:
[mysqld]
sql_mode=""
And restarted the mysql service afterwards.
The temporary way without restart:
set global sql_mode='';
I'm still getting the error message, however. What am I doing wrong?