ROCKVIEW SLPS — ELECTORAL LOGIN / DASHBOARD DATABASE FIX
=======================================================

What was wrong
--------------
The Electoral Commission landing page was querying table names and columns
from a second, incompatible schema:
- ec_election_candidates (the live table is ec_candidates)
- ec_registered_voters (the live table is ec_voters)
- ec_elections.election_type, academic_year, campus, created_by
  (the live schema uses owner_id, election_key, title, description,
   status, voter_registration_open, voting_open, results_published,
   starts_at, ends_at, created_at).

The login itself was authenticating the account and redirecting to
/electoral/index.php. The dashboard then failed while running its initial
summary query, and the shared exception handler displayed the generic
"authentication service temporarily unavailable" response.

Files corrected
---------------
1. electoral/index.php
   Uses ec_election_positions, ec_candidates and ec_voters; no longer
   requests nonexistent election columns.

2. electoral/api/elections.php
   Creates elections using the actual ec_elections schema:
   owner_id, title, election_key, description and status flags.

3. electoral/election.php
   Displays fields available in the live schema.

4. database/migrations/20261103_rockview_election_panel.sql
   Rewritten as a compatibility migration. It no longer creates parallel
   ec_elections, ec_election_candidates or ec_registered_voters tables.

Deployment
----------
1. Back up the existing public_html/slps folder and database first.
2. Upload the contents of this ZIP into public_html/slps, preserving folders
   and allowing the four named files to be overwritten.
3. Do NOT re-run the old incompatible migration from an earlier package.
   The replacement migration is supplied for reference/fresh setup; do not
   run it blindly on a live database if the profile/positions tables already
   exist.
4. Sign in using the Election Commission account. The dashboard should now
   load its election summary from the existing database tables.

Validation
----------
The three modified PHP files passed PHP syntax checks.
This package has not been connected to the live Bluehost database, so a live
login and election-creation test must still be performed after deployment.

Important
---------
This fix addresses the observed login-then-dashboard database exception.
It does not claim that every election workspace tab is fully implemented.
