# Production Fix Instructions

## Issue
The login page is showing an error: `Unknown column 'users.registration_fee_receipt_number' in 'field list'`

## Solution
Run the production field fix script on your cPanel server.

## Steps

### 1. Upload the fix script
Upload `production_field_fix.py` to your cPanel file manager in the same directory as your Django project.

### 2. Run the fix script
In cPanel's "Execute Python Script" feature, run:

```python
python production_field_fix.py
```

OR via SSH (if available):

```bash
cd /path/to/your/django/project
python production_field_fix.py
```

### 3. Restart your application
After the script completes successfully:

1. In cPanel, go to "Python App" 
2. Click "Restart" for your HAVEN GRAZURI INVESTMENT LIMITEDapplication
3. Wait for the restart to complete

### 4. Test the login
Try logging in again at: https://branchbusinessadvance.co.ke/login/

**Admin credentials:**
- Email: admin@branchbusinessadvance.com
- Password: admin123

## What the script does

1. ✅ Checks all registration fee fields in the database
2. ✅ Adds any missing fields with correct data types
3. ✅ Clears Django's model cache
4. ✅ Tests field access to ensure everything works
5. ✅ Provides detailed success/error reporting

## Expected output

You should see:
```
🎉 PRODUCTION FIX COMPLETED SUCCESSFULLY!
✅ All registration fee fields are now available
✅ Django model cache has been refreshed
✅ User queries are working properly
```

## If the script fails

1. Check the error messages in the output
2. Ensure you're running it in the correct directory
3. Verify database connection settings
4. Contact support with the error details

## Alternative: Run updated setup.py

If you prefer, you can also run the updated `setup.py` which now includes this fix:

```python
python setup.py
```

This will run the complete setup process including the field fixes.