Added: check active and expired table entries
ensure active and expired tables don't contain '' in expires fieldmaster
parent
a0e38ced3e
commit
6d5813745c
5
init.lua
5
init.lua
|
@ -1454,6 +1454,11 @@ local function data_integrity_check()
|
||||||
minetest.log("action", ([[[sban] id: %i %s %s %s %s is orphaned!]]
|
minetest.log("action", ([[[sban] id: %i %s %s %s %s is orphaned!]]
|
||||||
):format(row.id, row.name, row.source, hrdf(row.created), row.reason))
|
):format(row.id, row.name, row.source, hrdf(row.created), row.reason))
|
||||||
end
|
end
|
||||||
|
q = [[BEGIN TRANSACTION;
|
||||||
|
UPDATE active SET expires = 0 WHERE expires = '';
|
||||||
|
UPDATE expired SET expires = 0 WHERE expires = '';
|
||||||
|
COMMIT;]]
|
||||||
|
db_exec(q)
|
||||||
end
|
end
|
||||||
data_integrity_check() -- check for orphaned ban records!
|
data_integrity_check() -- check for orphaned ban records!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue