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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$UtTUXwCr7/bD0jOD57vPVJzs3cHVQ8WYjJIyZHznqBZPR6nj8MQ5b','user','ak_50110d37b0f09905','2023-02-17 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$UAn93wXscEsoISJ.I5jn7p4dhjQu/ggkMif1Vl6CNXntc8RaAX4Zb','admin','ak_b8deda9d5d85a4ce','2023-09-02 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$YcbgHLgorEI.GTlRqUgDN2aDhhmm1lkbwhUPy32XRnp1NZKXJQDHf','user','ak_e7f85828887967bf','2023-05-02 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$X5aHUbEoHKD7sE2ZezLG0j46oNBnfjbheDGVPT7jXlOpdXYQ7Gjcn','user','ak_c3a9d72714a5c89c','2023-09-19 10:04:00',NULL);

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

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


