Files
azerothcore-wotlk/data/sql/base/database-squash.md
Francesco Borzì c5ae1ae88f chore(DB): move 2023 update files (#20470)
* chore(DB): move 2023 update files

* chore: flag files as archied
2024-11-15 11:27:45 +01:00

1.6 KiB

New routines around handling database squashes since https://github.com/azerothcore/azerothcore-wotlk/pull/18197

Caution

These steps are only for project maintainers who intend to update base files.

During the DB squash procedure, we do NOT move files. The archive dir is NO longer used as part of the DB squash procedure, but simply as a place where to move update files when they get too many.

Moving files to the archive folder is NOT part of the squash procedure anymore.

as the updates table in base files always will contain the entries from the updates dir they will never be run again on a clean setup.

How to do the squash.

Important

A squash needs to be done on a clean database. Drop all tables in Auth, Characters and World.

  1. Update the acore.json file. Increment version by one
  2. Create a new file in the updates/db_world/ dir, the file should be incremented containing

Note

It should NOT be placed as a pending update and should only be done on world db. This is because we want the updated DB version to follow into the base files

UPDATE `version` SET `db_version`='ACDB 335.11-dev', `cache_id`=11 LIMIT 1;

Note

Remember to increment the db_version and cache_id the same as acore.json

  1. Drop all your databases, and run Worldserver to populate a clean database.
  2. Export the databases using i.e HeidiSQL

Important

Set the following values Tables -> DROP + CREATE Data -> Delete + insert (truncate existing data) Max INSERT size -> 1024 This is so that no unexpected issues occur.

  1. Move the exported table files into the base directory to update the existing files.
  2. Make a PR