Files
breadcrumb-the-shire/modules/helpdesk/migrations/001_create_oauth_token_cache.sql

12 lines
568 B
MySQL
Raw Normal View History

-- Helpdesk module: OAuth2 token cache (used only when OAuth2 auth mode is active)
CREATE TABLE IF NOT EXISTS `helpdesk_oauth_token_cache` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`tenant_id` INT UNSIGNED NOT NULL,
`access_token_encrypted` TEXT NOT NULL,
`expires_at` DATETIME NOT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
INDEX `idx_helpdesk_oauth_tenant` (`tenant_id`),
INDEX `idx_helpdesk_oauth_expires` (`expires_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;