TEXT fields cannot have default values

This commit is contained in:
Isaac Connor 2019-12-19 09:25:22 -05:00
parent 3c59be9616
commit a84031f819
2 changed files with 2 additions and 2 deletions

View File

@ -434,7 +434,7 @@ DROP TABLE IF EXISTS `Monitors`;
CREATE TABLE `Monitors` ( CREATE TABLE `Monitors` (
`Id` int(10) unsigned NOT NULL auto_increment, `Id` int(10) unsigned NOT NULL auto_increment,
`Name` varchar(64) NOT NULL default '', `Name` varchar(64) NOT NULL default '',
`Notes` TEXT NOT NULL default '', `Notes` TEXT,
`ServerId` int(10) unsigned, `ServerId` int(10) unsigned,
`StorageId` smallint(5) unsigned default 0, `StorageId` smallint(5) unsigned default 0,
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL default 'Local', `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL default 'Local',

View File

@ -5,7 +5,7 @@ SET @s = (SELECT IF(
AND column_name = 'Notes' AND column_name = 'Notes'
) > 0, ) > 0,
"SELECT 'Column Notes already exists in Monitors'", "SELECT 'Column Notes already exists in Monitors'",
"ALTER TABLE `Monitors` ADD `Notes` TEXT NOT NULL default '' AFTER `Name`" "ALTER TABLE `Monitors` ADD `Notes` TEXT AFTER `Name`"
)); ));
PREPARE stmt FROM @s; PREPARE stmt FROM @s;