# Upgrade 0.78.4

## Procedure

1. Back up application files.
2. Create a full MySQL dump.
3. Upload and unpack the ZIP in the Baltique OS root directory.
4. Log in as administrator.
5. Open:

```text
/upgrade_0_78_4.php
```

6. Click **Uruchom upgrade 0.78.4**.
7. Open:

```text
/system_enterprise_shell.php
/system_runtime_preflight.php
/system_case_spine.php
```

## What the upgrade does

The upgrade is idempotent. It runs these steps:

1. Repairs/seeds Runtime Preflight 0.78.2 tables using the corrected seed logic.
2. Refreshes Enterprise Shell 0.78.3 without downgrading the system version.
3. Applies Version Guard 0.78.4.
4. Creates Enterprise Case Spine tables.
5. Registers Case Spine in Module Registry and Enterprise Shell.
6. Seeds the Case Spine acceptance scenario.
7. Synchronizes existing patient/operative/booking records into Case Spine.
8. Runs a post-upgrade Runtime Preflight.

## Fix for reported alerts

After the upgrade, these checks should no longer be false failures:

```text
Database core version
Bootstrap version
core_version_0783
```

If they still show as failed, open `/upgrade_0_78_4.php` and run the upgrade once more. The process is safe to repeat.
