Files
ForeverCore/doc
Advocaite f2b20d1863 DB updater: accept Windows and Linux hashes, never re-run the baselines (#54)
#52 hashed SQL files with CRLF turned into LF, which fixed Windows-made
databases on Linux but broke databases built on Linux the same way: they
stored the raw hash, so the world baselines looked changed and baseline_01
was re-run. Its first 135 statements reset creature, gameobject, the loot
tables, npc_vendor, creature_trainer, pools and more to the baseline rows,
then player_classlevelstats failed (8 values, the table has 9 columns now)
and the server stopped on every start.

- Either hash (CRLF->LF or raw bytes) means "already applied": the file is
  only re-hashed to the CRLF->LF hash, never run. Renames are matched on
  both hashes. Works for Windows-made, Linux-made and moved databases.
- The world baselines are never applied again: they are a dump of the
  world at their place in the update order and are not safe to re-run on
  a finished database. A changed baseline is logged as an error and
  re-hashed; the "earlier custom file was applied again" cascade skips
  them too.

Tested on Linux with worldserver -u: raw (Linux) hashes stored -> re-hash
only; changed baseline -> error + re-hash, not run; changed custom file ->
re-applied; table checksums unchanged throughout.

A Linux world database already damaged by #52 is best rebuilt (it holds
no player data): DROP DATABASE world and let worldserver set it up again.
2026-10-14 10:01:10 +08:00
..
2020-01-02 06:44:10 +01:00