Database
Database schema and migration notes for gcm-reports.
Current shipped schema file
database.sql currently creates:
gcm_reportsgcm_report_messagesgcm_report_typesgcm_teleport_pointsgcm_configgcm_reports_groupsgcm_reports_staff
Runtime tables used by server code
server/database/Database.lua queries:
gcm_reports_ticketsgcm_reports_messagesgcm_reports_typesgcm_reports_teleportsgcm_reports_configgcm_reports_groupsgcm_reports_staff
Critical mismatch
There is a real table naming mismatch between shipped SQL and runtime query code.
If you import database.sql unchanged, ticket/config/type/teleport queries can fail at runtime.
Recommended fix strategy
Pick one naming convention and align both sides:
- Rename SQL tables to match
Database.lua(gcm_reports_*pattern), or - Update
Database.luaqueries to match your existing SQL table names.
Persisted domains
- Tickets, statuses, assignee tracking.
- Ticket chat messages.
- Report type and teleport point catalogs.
- Dynamic config keys.
- Staff groups, permissions, allowed items.
- Staff accumulated stats and leaderboard data.