MariaDB [marvin_production]> show create table ecommerce_support_events\G; *************************** 1. row *************************** Table: ecommerce_support_events Create Table: CREATE TABLE `ecommerce_support_events` ( `id` int(11) NOT NULL AUTO_INCREMENT, `state` tinyint(4) NOT NULL DEFAULT 0, `event_type` smallint(6) NOT NULL, `additional_info` varchar(255) DEFAULT NULL, `times_in_inbox` int(11) NOT NULL DEFAULT 1, `eventable_id` int(11) NOT NULL, `eventable_type` varchar(255) NOT NULL, `snoozed_at` datetime DEFAULT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `assignee_id` int(11) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `shop_id` bigint(20) DEFAULT NULL, `ecommerce_order_id` bigint(20) DEFAULT NULL, `ecommerce_suborder_id` bigint(20) DEFAULT NULL, `ecommerce_shipment_id` bigint(20) DEFAULT NULL, `noteable_type` varchar(255) DEFAULT NULL, `noteable_id` bigint(20) DEFAULT NULL, `snoozed_until` date DEFAULT NULL, `zendesk_ticket_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `index_ecommerce_events_on_eventable_type_and_eventable_id` (`eventable_type`,`eventable_id`), KEY `index_ecommerce_support_events_on_snoozed_at` (`snoozed_at`), KEY `index_ecommerce_support_events_on_assignee_id` (`assignee_id`), KEY `index_ecommerce_support_events_on_ecommerce_order_id` (`ecommerce_order_id`), KEY `index_ecommerce_support_events_on_ecommerce_suborder_id` (`ecommerce_suborder_id`), KEY `index_ecommerce_support_events_on_ecommerce_shipment_id` (`ecommerce_shipment_id`), KEY `idx_state_assignee_snoozed` (`state`,`assignee_id`,`snoozed_at`), KEY `index_ecommerce_support_events_on_shop_id` (`shop_id`), KEY `index_ecommerce_support_events_on_state_and_updated_at` (`state`,`updated_at`), KEY `idx_support_events_on_event_type_state_snoozed_at` (`event_type`,`state`,`snoozed_at`), KEY `index_ecommerce_support_events_on_zendesk_id` (`zendesk_ticket_id`), KEY `index_ecommerce_support_events_on_event_type_and_created_at` (`event_type`,`created_at`) ) ENGINE=InnoDB AUTO_INCREMENT=32421107 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci 1 row in set (0.002 sec)