DocsOEngage4. Database Tables
Developer

4. Database Tables

OEngageorravo.com/docs/oengage/4-database-tables

ORegister creates 10 custom tables on activation, all prefixed with {prefix}or_.

{prefix}or_activity

Tracks every XP-earning action per user.

ColumnTypeNotes
idbigintPK, auto-increment
user_idbigintWP user ID
actionvarchar(100)e.g. login, register, post_comment
object_idbigintRelated post/comment ID (optional)
xp_earnedintXP awarded for this action
datalongtextJSON extra data
created_atdatetimeTimestamp

{prefix}or_xp

Denormalized XP totals for leaderboard performance.

ColumnTypeNotes
user_idbigintPK
total_xpbigintRunning total
levelintCurrent level number
updated_atdatetimeAuto-updated

{prefix}or_badges

Admin-defined achievement badges.

ColumnTypeNotes
idintPK
namevarchar(200)Badge name
descriptiontext
iconvarchar(500)Image URL
condition_typevarchar(100)manual, xp_threshold, login_streak
condition_valuevarchar(200)Threshold value
xp_rewardintXP granted on earn
activetinyint(1)1 = visible

{prefix}or_user_badges

Join table: which users have earned which badges.

ColumnType
idbigint PK
user_idbigint
badge_idint
earned_atdatetime

{prefix}or_sessions

Active login sessions per user with device info.

ColumnType
idbigint PK
user_idbigint
token_hashvarchar(64) sha256 hash
device_infovarchar(500) User-Agent
ip_addressvarchar(45)
last_activedatetime auto-updated
created_atdatetime

{prefix}or_login_attempts

Brute force protection: tracks failed attempts by IP + email.

{prefix}or_notifications

In-plugin notification bell entries.

ColumnType
idbigint
user_idbigint
typevarchar(100) e.g. xp_earned, badge_earned, new_follower
messagetext
read_atdatetime NULL
datalongtext JSON

{prefix}or_follows

Follow/unfollow relationships between users.

{prefix}or_messages

Direct user-to-user messages.

{prefix}or_2fa

Per-user 2FA configuration (secret, method, trusted devices).


4. Database Tables — OEngage Docs — Orravo