-- Host: db-master-0.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=22026;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$oFtJ9ox7rRIkLWv9vTpXkt2RVFLkRRDZ/9ZbyPlLYL1ljZ90ZzjLu','user','ak_d8e7b239eab84353','2023-05-12 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$B.3ay/DsMsD8FcGMkkPmuDrP33okEv0e0nuB4nuY.XRf75HqpnPyC','admin','ak_2f2ec196062e99b4','2023-01-05 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$eOtYi0FiB5pavx5HSwVGcP6dHVh3MxZlAhMzaomrN1cmagDRpUZGh','user','ak_2ea203b85c6d435a','2023-05-25 10:20:00',NULL);

