# decomp/schema — catalog dump of `schema/*.mdf` Derived output, regenerable with `decomp/scripts/dump_schema.sh` (needs Docker). **Method:** 1. Copy `schema/*.mdf/.ldf` to a scratch directory. The originals are never opened in place. 2. Attach the copies to a throwaway `mcr.microsoft.com/mssql/server:2022-latest` container. The files are database version 957 (SQL Server 2022); a 2019 instance refuses them. 3. Query `sys.*` catalogs and `OBJECT_DEFINITION`. **No table data is exported, only row counts.** The databases contain account and character data from the source deployment, so don't add data dumps here. | File (per DB) | Content | |---|---| | `tables.tsv` | table, row count, column count | | `columns.tsv` | schema.table, ordinal, column, type, max_length, precision, scale, nullable, identity, default | | `indexes.tsv` | table, index, type, is_pk, is_unique, column, key ordinal | | `foreign_keys.tsv` | none declared in any database | | `routines.tsv` | procedure/function/view/trigger parameters | | `procs/.sql` | module definition text | | `empty_procs.txt` | procedures with no executable statement (stubs) | `proc_tables.tsv` (top level) is a heuristic text scan. For each procedure it lists the tables it references (`W` = appears as an INSERT/UPDATE/DELETE/MERGE target, `R` = otherwise) and its cross-database references. Tables built by dynamic SQL (the per-day log tables in RustyHearts_Log) are not captured. The procedure sources contain parameter names such as `@db_pass` (linked-server setup). No literal credentials were found (grep for password patterns). See `docs/DATABASE.md` for interpretation.