HR & PAYROLL — CONTROLLED MIGRATION FREEZE Project: HRPAY-BMD-20260911-01 Version: v0.39.4-dev Why this exists --------------- Final delivery must contain version-controlled Django migration files. The old trial setup generated migrations during installation, which is not acceptable as a final release process. Current ChatGPT build environment cannot execute Django/psycopg, so migration files are NOT being fabricated manually. They must be generated by a real Django runtime from this exact reviewed source tree. Controlled procedure (Windows) ------------------------------ 1. Keep this exact Update1 source tree unchanged. 2. Run: 00-FREEZE-MIGRATIONS-WINDOWS.bat 3. The script creates/repairs backend\.venv when needed and verifies Django can import before continuing. 4. If dependencies are missing, it installs requirements from the supplied wheelhouse when available, otherwise from the configured Python package source/internet. 5. The script forces SQLite only for schema generation; it does not touch the UAT/production PostgreSQL database. 6. It runs Django system check, makemigrations, then makemigrations --check --dry-run. 7. It creates MIGRATION-FREEZE-RESULT.txt with Python/Django versions and SHA-256 hashes of all generated migration files. 8. The generated backend\apps\*\migrations\*.py files become part of the controlled release source. Controlled procedure (Linux) ---------------------------- 1. Keep this exact Update1 source tree unchanged. 2. Run: ./00-freeze-migrations-linux.sh 3. The script creates/repairs backend/.venv when needed, verifies Django imports, runs Django system check, generates migrations, and performs the migration drift check. 4. Dependency installation uses ./wheelhouse when populated; otherwise the configured Python package source/internet is required. 5. Linux console output should be retained together with the generated migration files for review. Important --------- For v0.39.4-dev Consolidated, use a FRESH UAT database after the migration snapshot is frozen. Do not point this source directly at an older v0.37.x database whose migration history was generated ad hoc. After freeze, normal Local UAT setup must only run migrations; it must NOT generate new migration files. A clean `makemigrations --check --dry-run` result is a release gate.