# Database and Asset Verification Fixes

## Complete Database Migration (Feb 17, 2026)

Run the following SQL to synchronize your database with today's updates. This includes removing the redundant `sub_county` field and adding the new registration fields for the "Join Us" feature.

### 1. Update Submissions Table
Standardize location data and ensure all necessary columns exist.

```sql
-- Ensure county exists and remove sub_county
ALTER TABLE submissions 
ADD COLUMN IF NOT EXISTS county VARCHAR(255) AFTER description;

-- WARNING: This permenantly removes sub_county data
ALTER TABLE submissions 
DROP COLUMN IF EXISTS sub_county;
```

### 2. Update Users Table
Add refined registration fields and organization profiles.

```sql
-- Add new registration and profile fields
ALTER TABLE users 
ADD COLUMN IF NOT EXISTS user_type ENUM('individual', 'organization') DEFAULT 'organization',
ADD COLUMN IF NOT EXISTS salutation VARCHAR(20) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS personal_email VARCHAR(255) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS personal_phone VARCHAR(50) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS company_email VARCHAR(255) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS company_phone VARCHAR(50) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS designation VARCHAR(255) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS website VARCHAR(255) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS service_chains TEXT DEFAULT NULL,
ADD COLUMN IF NOT EXISTS enabling_pillars TEXT DEFAULT NULL,
ADD COLUMN IF NOT EXISTS challenges_sector TEXT DEFAULT NULL,
ADD COLUMN IF NOT EXISTS counties TEXT DEFAULT NULL;

-- Remove redundant sub_county from users
ALTER TABLE users 
DROP COLUMN IF EXISTS sub_county;
```

## Image Path Standardization
Several image paths were broken or inconsistent. These have been standardized to use the `images/` directory:

| Page | Old Path | New Path |
|------|----------|----------|
| `index.php` | `assets/imgs/new/nexus_intro.jpg` | `images/nexus_intro.jpg` |
| `index.php` | `images/Safe Reuse.jpg` | `images/Reuse.jpg` |
| `sanitation-reality.php` | `assets/imgs/new/sanitatiion.jpg` | `images/sanispace.jpg` |
| `service-chain.php` | (Various) | (Standardized to `images/`) |

## Verification
1.  **Navigation:** All menu items ("Service Chain", "Enabling Pillars", "Submitted Work") now point to the correct locations and follow the new hierarchy.
2.  **Images:** Core images on the homepage and "Sanitation Reality" page should now load correctly.
3.  **Admin:** Once the SQL above is run, the County and Sub-County fields in the submission form will work as expected.
