================================================================================
  FIX: Database Table Issue (tenants → academy_references)
================================================================================

PROBLEM: 
Error: Table 'tenants' doesn't exist

CAUSE:
The super_admin/storage/overview.php was querying the wrong table name.
Your system uses 'academy_references', not 'tenants'.

SOLUTION:
Upload the fixed file

================================================================================
OPTION 1: UPLOAD SINGLE FIXED FILE (FASTEST - 1 MINUTE)
================================================================================

Upload only the fixed file to replace the broken one:

1. LOGIN TO cPANEL FILE MANAGER

2. NAVIGATE TO:
   public_html/test.melanegroup.com/Multi-Tanent/super_admin/storage/

3. DELETE OLD FILE:
   - Find: overview.php
   - Right-click > Delete
   - Confirm

4. UPLOAD NEW FILE:
   - Click "Upload"
   - Select from your computer:
     C:\xampp\htdocs\Multi-Tanent\super_admin\storage\overview.php
   - Wait for upload to complete

5. TEST:
   https://test.melanegroup.com/Multi-Tanent/super_admin/storage/overview.php
   
   Should work now! ✓

================================================================================
OPTION 2: RE-EXTRACT FULL ZIP (IF YOU PREFER)
================================================================================

The ZIP has been updated with the fix. Re-upload and extract:

1. Delete old storage_dashboards_upload.zip from server (if still there)
2. Upload new: C:\xampp\htdocs\Multi-Tanent\storage_dashboards_upload.zip
3. Extract
4. Delete ZIP
5. Test

================================================================================
WHAT WAS FIXED:
================================================================================

BEFORE (BROKEN):
----------------
SELECT academy_reference, name, contact_email 
FROM tenants 
ORDER BY name

AFTER (FIXED):
--------------
SELECT reference_code, academy_name, contact_email 
FROM academy_references 
WHERE is_active = 1
ORDER BY academy_name

AND:

BEFORE (BROKEN):
----------------
LEFT JOIN tenants t ON tf.tenant_id = t.academy_reference

AFTER (FIXED):
--------------
LEFT JOIN academy_references ar ON tf.tenant_id = ar.reference_code

================================================================================
VERIFICATION:
================================================================================

After uploading the fixed file, test:

✓ Super Admin Storage Dashboard loads (no error)
✓ Shows list of all schools
✓ Charts display correctly
✓ Storage calculations work

================================================================================

RECOMMENDED: Use Option 1 (upload single file) - it's faster!

File to upload: C:\xampp\htdocs\Multi-Tanent\super_admin\storage\overview.php
Upload to: super_admin/storage/overview.php (replace existing)

================================================================================

