need to convert NULL values before saying not null

This commit is contained in:
Isaac Connor 2016-09-20 17:53:35 -04:00
parent 19a60b01da
commit f0a9820096
1 changed files with 2 additions and 0 deletions

View File

@ -4,5 +4,7 @@
-- Changing StorageId to be NOT NULL and default 0 -- Changing StorageId to be NOT NULL and default 0
-- --
UPDATE Monitors SET StorageId = 0 WHERE StorageId IS NULL;
ALTER TABLE Monitors MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0; ALTER TABLE Monitors MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0;
UPDATE Events SET StorageId = 0 WHERE StorageId IS NULL;
ALTER TABLE Events MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0; ALTER TABLE Events MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0;