Fixes: null expires entries in migration process
catch null expires entries correctly when the data is migrated from the ban table to fix issue #34master
parent
30c882337b
commit
4189cf4caf
|
@ -166,6 +166,9 @@ WHERE typeof(bans.id) = 'text';
|
|||
DELETE FROM bans WHERE typeof(bans.id) = 'text';
|
||||
INSERT INTO bans SELECT * FROM fix_tmp;
|
||||
|
||||
-- fix null expires entries
|
||||
UPDATE bans SET expires = 0 WHERE expires = '';
|
||||
|
||||
-- transfer existing data to new tables
|
||||
----------------------------------------------
|
||||
|
||||
|
@ -194,9 +197,6 @@ INSERT INTO active_tmp SELECT
|
|||
last_pos
|
||||
FROM bans WHERE active = 'true';
|
||||
|
||||
-- initialise expires
|
||||
UPDATE active SET expires = 0 WHERE expires = '';
|
||||
|
||||
-- initialise versions
|
||||
INSERT INTO config VALUES('db_version', '0.2.1');
|
||||
INSERT INTO config VALUES('mod_version', '0.2.0');
|
||||
|
|
Loading…
Reference in New Issue