# MEGA™ Municipal Risk Management — v1.5 Interface and Reset Upgrade

## Apply to an existing Afrihost installation

1. Back up the **database** and all application files before changing anything.
2. Extract `MEGA_v1_5_Design_and_Reset_Patch.zip` on your computer.
3. Inside your existing `MEGA_Municipal_Risk_Management/public/` folder on Afrihost, upload **and overwrite** these three files only:
   - `index.php`
   - `style.css`
   - `app.js` (new)
4. Do **not** replace `app/config.php`, rerun `install.php`, or import a new SQL database schema. No database migration is needed for this release.
5. Open MEGA in the browser and refresh using Ctrl+F5 to clear cached styles. The application should have a fixed **left sidebar**, no horizontal navigation bar, and a redesigned dashboard.
6. Sign in as an administrator. In the **Administration** group of the left sidebar, choose **Reset test data**.
7. Select *Assessment & workshop data*, *Planning setup only*, or *All test data*. Read the warnings, confirm this is a staging environment, confirm you made a backup, enter `DELETE TEST DATA`, and enter your current administrator password. Confirm deletion.

No cPanel marker file and no configuration-file edit is necessary. `ALLOW_TEST_RESET` is no longer checked by the application.

### What reset preserves

- All staff and administrator accounts
- Municipality record
- Application configuration and database credentials
- Universal Municipal Risk Taxonomy
- Assessment methodology
- Audit history

### Important safeguards

Reset permanently removes selected records and, when selected, the related evidence files. It is **only intended for test environments**. The confirmation that this is a test environment is an administrator attestation, not a technical proof that the site is isolated. Do not use it once real municipal information is recorded.

`Planning setup only` is blocked when workshop/risk records still exist. Use `All test data` when you want a completely empty test register. A successful database reset with a file-removal warning means any failed evidence-file deletion needs separate secure cleanup.

### Release scope

The visual redesign changes the application shell, responsive sidebar, navigation, cards, forms, tables, login, voting presentation and reset page. It **does not** modify the scoring methodology or existing approval business rules.

### Testing status

PHP 8.4 lint and JavaScript parsing passed; package integrity verified. No MySQL/PDO-MySQL environment is available here, so the database reset and all end-to-end Afrihost workflows still require testing on your staging installation.
