| | |
| | | ]; |
| | | } |
| | | |
| | | protected function errorLogTables():array |
| | | { |
| | | |
| | | return [ |
| | | 'error_log'=> "( |
| | | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
| | | `error_type` varchar(50) NOT NULL, |
| | | `component` varchar(50) NOT NULL, |
| | | `message` text NOT NULL, |
| | | `context` JSON, |
| | | `severity` varchar(20) NOT NULL, |
| | | `user_id` {$this->userIDType} NOT NULL, |
| | | `created_at` timestamp DEFAULT CURRENT_TIMESTAMP, |
| | | PRIMARY KEY (`id`), |
| | | KEY `error_lookup` (`error_type`, `severity`, `created_at`), |
| | | KEY `component_errors` (`component`, `created_at`) |
| | | )" |
| | | ]; |
| | | } |
| | | protected function errorLogTables():array |
| | | { |
| | | return [ |
| | | 'error_log'=> "( |
| | | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, |
| | | `error_type` varchar(50) NOT NULL, |
| | | `component` varchar(100) NOT NULL, |
| | | `method` varchar(100) DEFAULT NULL, |
| | | `page_url` varchar(255) DEFAULT NULL, |
| | | `message` text NOT NULL, |
| | | `context` JSON, |
| | | `severity` varchar(20) NOT NULL, |
| | | `user_id` {$this->userIDType} DEFAULT NULL, |
| | | `user_was_logged_in` tinyint(1) NOT NULL, |
| | | `source` enum('frontend','backend') NOT NULL, |
| | | `created_at` timestamp DEFAULT CURRENT_TIMESTAMP, |
| | | PRIMARY KEY (`id`), |
| | | KEY `created_at` (`created_at`), |
| | | KEY `component_severity_date` (`component`, `severity`, `created_at`), |
| | | KEY `error_type_date` (`error_type`, `created_at`), |
| | | KEY `severity_date` (`severity`, `created_at`) |
| | | )" |
| | | ]; |
| | | } |
| | | |
| | | protected function userIntegrationsTable():array |
| | | { |