class SchemaCreates and upgrades forum tables.
class final
- Full name
Kernowdev\ClanbiteForums\Database\Schema
Constants
| Name | Value | Description |
|---|---|---|
OPTION_DB_VERSION | 'clanbite_forums_db_version' | |
DB_VERSION | '1.2.0' | |
TABLE_CATEGORIES | 'clanbite_forum_categories' | Table suffixes (without prefix). |
TABLE_FORUMS | 'clanbite_forums' | |
TABLE_TOPICS | 'clanbite_forum_topics' | |
TABLE_REPLIES | 'clanbite_forum_replies' | |
TABLE_FOLLOWS | 'clanbite_forum_follows' | |
TABLE_MODERATORS | 'clanbite_forum_moderators' | |
TABLE_ONLINE_SESSIONS | 'clanbite_forum_online_sessions' | |
TABLE_TOPIC_REACTIONS | 'clanbite_forum_topic_reactions' | |
TABLE_REPLY_REACTIONS | 'clanbite_forum_reply_reactions' | |
TABLE_REPORTS | 'clanbite_forum_reports' |
Methods
create_tables()Create or upgrade all tables.drop_tables()Drop all forum tables (uninstall).ensure_default_category_id()First published category ID (lowest id), or 0.maybe_migrate_legacy_install()One-time migration: legacy pre-rebrand table suffixes -> Clanbite suffixes (data preserved).maybe_seed_default_forum()Insert a default “General” forum if none exist.maybe_upgrade()Run dbDelta when the stored marker differs from this release (fresh install, upgrade, or baseline reset).
Defined in inc/Database/Schema.php