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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$YuUiPikDQ6x0ZXRYYL5QhPCFihMJ1/TFnw4I8B6GtkTOTxkhqmEA1','admin','ak_add128b9cb66de3f','2023-03-25 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$Yi8tfunn5TsvRVuClpkOkqEtXumiNtWtyUwDlPG4ySPofff.C50Qg','admin','ak_764d437fc862eb20','2023-08-01 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$/W1uRfLMd9mb5EhZ3TwsGj84ykQHjkjBbfM09DtTcqekjJLV8IBjX','user','ak_631116d64ec260d7','2023-06-17 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$KAMlzwi.nsgSlnvkmt.9.c2hxANPdzOk7guc6FaUVd./kxGDv9Hp4','admin','ak_c165b46f07ae4d8e','2023-02-13 10:22:00',NULL);

