{"slug":"ettrick-escape-room-booking","name":"Ettrick Escape Room Booking","description":"A complete booking and payment system built specifically for escape room venues. Take bookings, collect Stripe payments and manage your games from you …","author":"John Craig","active_installs":0,"version":"1.3.1","wp_org_url":"https://wordpress.org/plugins/ettrick-escape-room-booking/","is_closed":false,"cleanup":{"has_uninstall_hook":true,"drops_tables_on_uninstall":true,"deletes_options_on_uninstall":false},"tables":[{"table_name":"eerb_","full_table_name":"wp_eerb_","description":"Stores eerb  data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null},{"table_name":"eerb_blocked_slots","full_table_name":"wp_eerb_blocked_slots","description":"Stores eerb blocked slots data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"game_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"slot_start","type":"DATETIME","nullable":false,"primary_key":false},{"name":"slot_end","type":"DATETIME","nullable":false,"primary_key":false},{"name":"reason","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"created_by","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_blocked_slots ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, game_id INT UNSIGNED NOT NULL, slot_start DATETIME NOT NULL, slot_end DATETIME NOT NULL, reason VARCHAR(255), created_by BIGINT UNSIGNED, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY game_id (game_id), KEY slot_start (slot_start) ) $charset;\" );"},{"table_name":"eerb_booking_history","full_table_name":"wp_eerb_booking_history","description":"Stores eerb booking history data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"booking_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"action","type":"ENUM('created','changed','cancelled','refunded')","nullable":false,"primary_key":false},{"name":"changed_by","type":"ENUM('customer','admin')","nullable":false,"primary_key":false},{"name":"old_slot_start","type":"DATETIME","nullable":true,"primary_key":false},{"name":"new_slot_start","type":"DATETIME","nullable":true,"primary_key":false},{"name":"old_players","type":"TINYINT UNSIGNED","nullable":true,"primary_key":false},{"name":"new_players","type":"TINYINT UNSIGNED","nullable":true,"primary_key":false},{"name":"note","type":"TEXT","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_booking_history ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, booking_id INT UNSIGNED NOT NULL, action ENUM('created','changed','cancelled','refunded') NOT NULL, changed_by ENUM('customer','admin') NOT NULL DEFAULT 'customer', old_slot_start DATETIME, new_slot_start DATETIME, old_players TINYINT UNSIGNED, new_players TINYINT UNSIGNED, note TEXT, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY booking_id (booking_id) ) $charset;\" );"},{"table_name":"eerb_bookings","full_table_name":"wp_eerb_bookings","description":"Stores eerb bookings data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"booking_ref","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"game_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"customer_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"slot_start","type":"DATETIME","nullable":false,"primary_key":false},{"name":"slot_end","type":"DATETIME","nullable":false,"primary_key":false},{"name":"player_count","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"price_pence","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"discount_pence","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"total_pence","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"promo_code_id","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"status","type":"ENUM('pending','confirmed','changed','cancelled')","nullable":false,"primary_key":false},{"name":"stripe_payment_id","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"manage_token","type":"VARCHAR(64)","nullable":false,"primary_key":false},{"name":"notes","type":"TEXT","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_bookings ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, booking_ref VARCHAR(20) NOT NULL COMMENT 'Human-readable reference e.g. ERB-2024-00042', game_id INT UNSIGNED NOT NULL, customer_id INT UNSIGNED NOT NULL, slot_start DATETIME NOT NULL, slot_end DATETIME NOT NULL, player_count TINYINT UNSIGNED NOT NULL, price_pence INT UNSIGNED NOT NULL, discount_pence INT UNSIGNED NOT NULL DEFAULT 0, total_pence INT UNSIGNED NOT NULL, promo_code_id INT UNSIGNED, status ENUM('pending','confirmed','changed','cancelled') NOT NULL DEFAULT 'pending', stripe_payment_id VARCHAR(255), manage_token VARCHAR(64) NOT NULL COMMENT 'Unique token for the manage-booking link in email', notes TEXT, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY booking_ref (booking_ref), UNIQUE KEY manage_token (manage_token), KEY game_id (game_id), KEY customer_id (customer_id), KEY slot_start (slot_start), KEY status (status) ) $charset;\" );"},{"table_name":"eerb_customers","full_table_name":"wp_eerb_customers","description":"Stores eerb customers data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"first_name","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"last_name","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"email","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"mobile","type":"VARCHAR(30)","nullable":true,"primary_key":false},{"name":"password_hash","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"is_guest","type":"TINYINT(1)","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"last_login","type":"DATETIME","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_customers ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100) NOT NULL, email VARCHAR(255) NOT NULL, mobile VARCHAR(30), password_hash VARCHAR(255), is_guest TINYINT(1) NOT NULL DEFAULT 0, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, last_login DATETIME, PRIMARY KEY (id), UNIQUE KEY email (email) ) $charset;\" );"},{"table_name":"eerb_game_hours","full_table_name":"wp_eerb_game_hours","description":"Stores eerb game hours data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"game_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"day_of_week","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"open_time","type":"TIME","nullable":true,"primary_key":false},{"name":"close_time","type":"TIME","nullable":true,"primary_key":false},{"name":"is_closed","type":"TINYINT(1)","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_game_hours ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, game_id INT UNSIGNED NOT NULL, day_of_week TINYINT UNSIGNED NOT NULL COMMENT '0=Sun,1=Mon,...,6=Sat', open_time TIME, close_time TIME, is_closed TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (id), UNIQUE KEY game_day (game_id, day_of_week), KEY game_id (game_id) ) $charset;\" );"},{"table_name":"eerb_gamekeepers","full_table_name":"wp_eerb_gamekeepers","description":"Stores eerb gamekeepers data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"name","type":"VARCHAR(150)","nullable":false,"primary_key":false},{"name":"email","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"is_active","type":"TINYINT(1)","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_gamekeepers ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(150) NOT NULL, email VARCHAR(255) NOT NULL, is_active TINYINT(1) NOT NULL DEFAULT 1, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY email (email) ) $charset;\" );"},{"table_name":"eerb_games","full_table_name":"wp_eerb_games","description":"Stores eerb games data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"room_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"name","type":"VARCHAR(150)","nullable":false,"primary_key":false},{"name":"slug","type":"VARCHAR(150)","nullable":false,"primary_key":false},{"name":"description","type":"TEXT","nullable":true,"primary_key":false},{"name":"image_url","type":"VARCHAR(500)","nullable":true,"primary_key":false},{"name":"duration_minutes","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"setup_minutes","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"min_players","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"max_players","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"min_notice_hours","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"booking_horizon_date","type":"DATE","nullable":true,"primary_key":false},{"name":"status","type":"ENUM('active','inactive')","nullable":false,"primary_key":false},{"name":"sort_order","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_games ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, room_id INT UNSIGNED NOT NULL, name VARCHAR(150) NOT NULL, slug VARCHAR(150) NOT NULL, description TEXT, image_url VARCHAR(500), duration_minutes SMALLINT UNSIGNED NOT NULL DEFAULT 60, setup_minutes SMALLINT UNSIGNED NOT NULL DEFAULT 30, min_players TINYINT UNSIGNED NOT NULL DEFAULT 2, max_players TINYINT UNSIGNED NOT NULL DEFAULT 8, min_notice_hours SMALLINT UNSIGNED NOT NULL DEFAULT 2, booking_horizon_date DATE, status ENUM('active','inactive') NOT NULL DEFAULT 'active', sort_order SMALLINT UNSIGNED NOT NULL DEFAULT 0, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY slug (slug), KEY room_id (room_id) ) $charset;\" );"},{"table_name":"eerb_prices","full_table_name":"wp_eerb_prices","description":"Stores eerb prices data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"game_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"player_count","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"price_pence","type":"INT UNSIGNED","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_prices ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, game_id INT UNSIGNED NOT NULL, player_count TINYINT UNSIGNED NOT NULL, price_pence INT UNSIGNED NOT NULL COMMENT 'Price in pence (GBP) to avoid float issues', PRIMARY KEY (id), UNIQUE KEY game_players (game_id, player_count), KEY game_id (game_id) ) $charset;\" );"},{"table_name":"eerb_promo_codes","full_table_name":"wp_eerb_promo_codes","description":"Stores eerb promo codes data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"code","type":"VARCHAR(50)","nullable":false,"primary_key":false},{"name":"description","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"discount_percent","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"valid_from","type":"DATE","nullable":true,"primary_key":false},{"name":"valid_to","type":"DATE","nullable":true,"primary_key":false},{"name":"max_uses","type":"SMALLINT UNSIGNED","nullable":true,"primary_key":false},{"name":"use_count","type":"SMALLINT UNSIGNED","nullable":false,"primary_key":false},{"name":"is_active","type":"TINYINT(1)","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_promo_codes ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, code VARCHAR(50) NOT NULL, description VARCHAR(255), discount_percent TINYINT UNSIGNED NOT NULL DEFAULT 10 COMMENT 'e.g. 10 = 10% off', valid_from DATE, valid_to DATE, max_uses SMALLINT UNSIGNED COMMENT 'NULL = unlimited', use_count SMALLINT UNSIGNED NOT NULL DEFAULT 0, is_active TINYINT(1) NOT NULL DEFAULT 1, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY code (code) ) $charset;\" );"},{"table_name":"eerb_rooms","full_table_name":"wp_eerb_rooms","description":"Stores eerb rooms data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"name","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"description","type":"TEXT","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_rooms ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, description TEXT, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ) $charset;\" );"},{"table_name":"eerb_slot_holds","full_table_name":"wp_eerb_slot_holds","description":"Stores eerb slot holds data created by this plugin.","detection_method":"static","confidence":"medium","columns":[{"name":"id","type":"INT UNSIGNED","nullable":false,"primary_key":true},{"name":"game_id","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"slot_start","type":"DATETIME","nullable":false,"primary_key":false},{"name":"session_key","type":"VARCHAR(64)","nullable":false,"primary_key":false},{"name":"expires_at","type":"DATETIME","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_eerb_slot_holds ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, game_id INT UNSIGNED NOT NULL, slot_start DATETIME NOT NULL, session_key VARCHAR(64) NOT NULL COMMENT 'Random key stored in visitor session', expires_at DATETIME NOT NULL, PRIMARY KEY (id), UNIQUE KEY game_slot (game_id, slot_start), KEY expires_at (expires_at) ) $charset;\" );"},{"table_name":"erb_","full_table_name":"wp_erb_","description":"Stores erb  data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null}],"table_count":13}