diff options
author | Kitzunu <24550914+Kitzunu@users.noreply.github.com> | 2024-12-16 16:13:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-16 16:13:05 +0100 |
commit | 3a204338274109df0f56d2168bde3c85b2eb226c (patch) | |
tree | bd64148ab524a1b42ac04f1169e935643b21cdad /data/sql/base/database-squash.md | |
parent | 35f316b1a6cd63cde9c0ee65aaaf89b5543d1f63 (diff) |
feat(DB): New DB exporter and versioning tools for DB squashes (#20920)
Diffstat (limited to 'data/sql/base/database-squash.md')
-rw-r--r-- | data/sql/base/database-squash.md | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/data/sql/base/database-squash.md b/data/sql/base/database-squash.md index a09a9a8f8a..d309e74b8e 100644 --- a/data/sql/base/database-squash.md +++ b/data/sql/base/database-squash.md @@ -1,42 +1,31 @@ -New routines around handling database squashes since https://github.com/azerothcore/azerothcore-wotlk/pull/18197 +New process 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 +1. Update the acore.json and DB version by running VersionUpdater.ps1 (Located in ..\apps\VersionUpdater\) > [!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 +> Read the versionupdater.md file to use it properly. + +2. Drop all your databases, and run Worldserver to populate a clean database. +3. Export the databases using the DatabaseExporter.ps1 (Located in ..\apps\DatabaseExporter\) -```sql -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 +> Read the databaseexporter.md file to use it properly. -4. Drop all your databases, and run Worldserver to populate a clean database. -5. Export the databases using i.e HeidiSQL +6. Make a PR > [!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. - -6. Move the exported table files into the base directory to update the existing files. -7. Make a PR +> No DB PRs should be merged during this process! + +> [!NOTE] +> 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 +> 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. |