-- ----------------------------------------------------------------------- --
-- APM-2832 UM non-compliant users dashboard is empty when report has data
-- Redesign of table as old version was pretty dumb
-- ----------------------------------------------------------------------- --
DROP TABLE IF EXISTS `um_dash_license_alloc`;
CREATE TABLE IF NOT EXISTS `um_dash_license_alloc` (
  `user_id` int NOT NULL,
  `system` char(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `client` char(3) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
  `cat_s` int DEFAULT NULL COMMENT 'License Category according to SU01',
  `cat_r` int DEFAULT NULL COMMENT 'License Category according to roles',
  `cat_u` int DEFAULT NULL COMMENT 'License Category according to usage',
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;