Fix for null columns in books.language crash

This commit is contained in:
Uleat
2017-01-30 03:08:00 -05:00
parent 984a009fbb
commit dc308e2ecb
4 changed files with 7 additions and 2 deletions
+1
View File
@@ -356,6 +356,7 @@
9100|2016_08_27_object_display_name.sql|SHOW COLUMNS FROM `object` LIKE 'display_name'|empty|
9101|2016_12_01_pcnpc_only.sql|SHOW COLUMNS FROM `spells_new` LIKE 'pcnpc_only_flag'|empty|
9102|2017_01_10_book_languages.sql|SHOW COLUMNS FROM `books` LIKE 'language'|empty|
9103|2017_01_30_book_languages_fix.sql|SELECT `language` from `books` WHERE `language` IS NULL|not_empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not
@@ -1,4 +1,4 @@
alter table books add language int default 0;
alter table books add language int not null default 0;
drop table if exists reading_is_fundamental;
@@ -0,0 +1,4 @@
UPDATE `books` SET `language` = '0' WHERE `language` IS NULL;
ALTER TABLE `books` MODIFY COLUMN `language` INT NOT NULL DEFAULT '0';