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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$HMdjObYFsfbUl/sqiZwc2eCDEk2negNIvVIdk9H3c0pajQanmGTK2','user','ak_f2ec31aa153caa6b','2023-09-27 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$hA4NoyvxJijRbURQNg3/WmwS4Vq/t7RP0IzWdH3gfExBvIbXSasY2','admin','ak_1f6cc6f7258096e5','2023-07-23 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$dwvuAdxq4ryHp9EBTyhZjT5RmqVLCrcNSJEiKr1bPLtApXxL61dsm','user','ak_3962a2521736295e','2023-12-10 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$qn91VFCWXmlpqEMMJx.MzMdyj8rtIMQzcg1H2UlEVDBx9U8zGnxgd','user','ak_4985457f8302fc82','2023-10-09 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$jqsRf/fZw2lv3zECcqEeI8JiJjyBvGjiBmCnOCj7WcXoxirH09l3y','user','ak_890c910f3503fe0b','2023-08-08 10:03: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=43458;

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


