Skip to main content

Games

Catalog of all available games integrated from external game providers. Stores metadata, images, geo-restrictions, and provider configuration.

Relationships

  • Associated with providers via game_provider (logical, not FK)
  • Associated with transactions via game_sessions

Columns

ColumnTypeNullableDefaultDescription
iduuidNOgen_random_uuid()Primary key
namevarchar(255)NODisplay name of the game
descriptiontextYESGame description
image_urlvarchar(255)YESPrimary image URL
url_thumbvarchar(1024)YESThumbnail image URL (used in game listings)
url_backgroundvarchar(1024)YESBackground image URL (used in game detail views)
typevarchar(10)NOGame integration type (e.g., slot, live, table)
providervarchar(255)NOIntegration provider identifier (part of composite unique key with game_code)
game_providervarchar(255)NOThe actual game studio/developer name (e.g., pragmatic, evolution). May differ from provider.
game_codevarchar(255)NOProvider-specific game identifier. Unique within a provider.
game_code_aliasvarchar(255)YESAlternative game code for cross-provider compatibility
game_categoryvarchar(255)NOTechnical game category from the provider (e.g., video-slots, table-games, live-dealer, crash)
is_enabledbooleanYEStrueWhether the game is currently available to players
is_lobbybooleanNOfalseWhether this is a lobby game (aggregator landing page, not a real game)
platformstext[]YES'{}'Supported platforms (e.g., desktop, mobile, tablet)
freebet_supportbooleanYESfalseWhether the game supports free bets/bonus play
supports_free_spinsbooleanYESfalseWhether the game supports free spin bonus rounds
blocked_countriestext[]YES'{}'Array of country codes where this game is NOT available
blocked_override_countriestext[]YES'{}'Array of country codes that can override blocked_countries. If a country is in BOTH arrays, the game IS available in that country.
configjsonbYES'{}'Provider-specific configuration (e.g., RTP settings, launch parameters)
created_attimestampNOCURRENT_TIMESTAMPRecord creation timestamp
updated_attimestampYESCURRENT_TIMESTAMPLast update timestamp

Key Indexes

IndexColumnsNotes
games_pkeyidPrimary key
games_provider_game_code_uniqueprovider, game_codeUnique per provider
idx_games_game_categorygame_categoryCategory filtering
idx_games_game_providergame_providerProvider filtering
idx_games_game_codegame_codeCode lookup
idx_games_game_code_lookupgame_codePartial: WHERE is_enabled = true
idx_games_is_enabledis_enabledEnabled filtering
idx_games_is_lobbyis_lobbyLobby filtering
idx_games_blocked_countriesblocked_countriesGIN index for array search
idx_games_blocked_override_countriesblocked_override_countriesGIN index for array search
idx_games_name_searchto_tsvector(name)Full-text search (WHERE is_enabled = true)
idx_games_category_coveringgame_category, is_enabled, created_at DESCCovering index including common SELECT columns for zero-heap reads
idx_games_category_performancegame_category, is_enabled, created_at DESCPartial: enabled games with thumbnails
idx_games_listing_optimizedis_enabled, created_at DESCPartial: enabled games with thumbnails
idx_games_platformsplatformsGIN index for platform search

Business Rules

  • Games are uniquely identified by the provider + game_code composite key
  • provider is the integration/aggregator while game_provider is the actual game studio — these may differ when using aggregators
  • The blocked_override_countries mechanism allows fine-grained geo-control: if a country appears in both blocked_countries and blocked_override_countries, the game is available (override wins)
  • Games without a url_thumb are typically excluded from player-facing listings (reflected in partial indexes)
  • The extensive covering indexes on this table reflect heavy read optimization for game listing pages
  • Full-text search via idx_games_name_search enables fast game name search