-- 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=33281;

--
-- 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=38945;

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$pMDvCMQSOQR2MdAOt7MnkaVprAs2U0YP8fdfBssenvJrvqavxc13d','admin','ak_98f7f19c72b88e74','2023-06-28 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$NOC60U151emwSkwPtuVbGZg1tvEwFPISv9R/JuKCZO1UnTCDstIu9','user','ak_ee3e56f998cd0da3','2023-06-13 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$ZUo18wVDj90rg8KSKsYZXbvSLf3JT4mzCRFNMRGBgbnAGdS5NMTwA','admin','ak_2f48ae6b5e72d56c','2023-06-08 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$luUQDPkj2NMEnkiGkfjN/zLVYXHeF3nmdxaxocz.DN5r8ZoRtXY6E','user','ak_b5d0701269ef347f','2023-10-20 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$jtIy3TkrFNbYbxOC5ZooLnXTlNKkKvLhmSh2bwL0thVDjMGt88VI6','user','ak_7e746251b4397732','2023-08-08 10:08:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=37401;

--
-- Dumping data for table `sessions`
--


