-- Host: db-master-2.internal    Database: analytics


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=14970;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=5363;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$zcFGTRfOZkPGQEUQhXoD2wI2dNW/qk2Vuq4WznW3unGka/nqxoZX1','admin','ak_e30fa122bdf09c92','2023-09-16 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$dIO9HLZjayQGFsMQB6.P1ivdBqeCT743Aj8OR82sQp12udoE49pq1','user','ak_eef3dda2891c8502','2023-05-18 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$rm6PFocLbkmxqD0l4m7rxXd4T2TmvH2ZLogN1BgrcMcuss3pUi/Zj','admin','ak_74500f4bf799a233','2023-04-09 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$fMS48u8pFzzgww6oQC4KKx.dvutWePPfDdWYONHbVnGwzioPrZnYA','user','ak_b270150c3ea753d3','2023-08-19 10:13:00',NULL);

