feat(Codestyle/SQL): require both id and guid in spawn UPDATEs (#27657)

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
sudlud
2026-09-15 21:29:37 +02:00
committed by GitHub
co-authored by Claude Opus 5
parent 386f3a13fa
commit d56db46693
3 changed files with 84 additions and 24 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
1. `cd data/sql/updates/pending_db_world/` (or `pending_db_auth` / `pending_db_characters`).
2. `./create_sql.sh` generates an empty `rev_<timestamp>.sql` to write into.
3. Conventions (linted): every `INSERT` preceded by a matching `DELETE` (idempotency); spawn `DELETE` (`creature`, `gameobject`) filters on both `id` and `guid` with `=`/`IN`/`BETWEEN`, never `OR`; no double semicolons; no multiple blank lines; InnoDB engine.
3. Conventions (linted): every `INSERT` preceded by a matching `DELETE` (idempotency); spawn `DELETE` and `UPDATE` (`creature`, `gameobject`) target that table alone (no join, comma list or schema qualifier) and filter on both `id` and `guid` with `=`/`IN`/`BETWEEN`, never `OR`; no double semicolons; no multiple blank lines; InnoDB engine.
Run the linter before claiming a change is done: `python apps/codestyle/codestyle-sql.py` (compares to origin/master).