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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$bRwigl9dCV1OUOkDiH4jtvr8DaOVtaBX23H99XpsAQZjki3aJZY.s','admin','ak_3057eb5dec8dc992','2023-07-26 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$xi7cLxJqWAA6bHrp53/8vE7NPt2n.8A.xaCUSCNYwq6l6p2OS.iKH','admin','ak_555ccd3ef984bd0a','2023-03-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$L0FMRF.kx5mlCnkoCMVY3.947FZRGVmbPrzGwOGUjDCugiH2bZRoM','admin','ak_6422f13e75a7f5e8','2023-07-13 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$cjhwQXqi5TpW/ifW3r2HnJnXRPdHo58V7442elb7WmhgiO6xqo7yP','user','ak_ac285b49638362d0','2023-12-22 10:23: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=21994;

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


