CREATE TABLE `tbl` (
`id` bigint(21) unsigned NOT NULL AUTO_INCREMENT,
`t_p_r_key` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
`t_p_type` int(11) NOT NULL,
`r_key` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
`t_p_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`active` bit(1) NOT NULL DEFAULT b'1',
`version` int(11) NOT NULL DEFAULT '1',
`created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`updated_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`dipped_at` datetime(6) DEFAULT NULL,
`session_key` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `third_party_reference_key_version` (`t_p_r_key`,`version`),
KEY `third_party_reference_key` (`t_p_r_key`,`dipped_at`),
KEY `reference_key` (`r_key`,`dipped_at`),
KEY `third_party_key` (`t_p_key`,`dipped_at`)
) ENGINE=InnoDB AUTO_INCREMENT=623787 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;