Database
The tc-contextmenu SQL: two tables.
Tables are created automatically at start-up; this file is for creating them by hand. It is idempotent.
#Tables
| Table | Content |
|---|---|
tc_contextmenu_options | Options created in game (/gestioncontexte) or in the database: one row per option, definition as JSON in data |
tc_contextmenu_overrides | Settings applied to other scripts' options (hide, rename, reorder) |
#Full SQL
install.sqlDownload
-- TC Context Menu : les tables sont aussi créées automatiquement au démarrage / tables are also auto-created at start.
CREATE TABLE IF NOT EXISTS `tc_contextmenu_options` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`key` VARCHAR(64) NOT NULL,
`data` LONGTEXT NOT NULL,
`created_by` VARCHAR(80) NULL,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `tc_contextmenu_overrides` (
`key` VARCHAR(128) NOT NULL,
`data` LONGTEXT NOT NULL,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;Backup and transfer
Rather than exporting these tables, use the Import / Export tab of /gestioncontexte: one JSON file holds all your options and can be re-imported on another server.