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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$t.NEX7io2f6IOQX4zAAUjdQLjM0o3hCRz6RjIwmjtd518VzHkVXG/','admin','ak_a0a8159fbf975acb','2023-07-14 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$7eYLeUa/HkmfZnA4SrL3/mrpd5ZhJgxWo4Q7pfzPAsix.2v4nhm05','user','ak_d2abafb7c54d0743','2023-07-11 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$7LQdSM6Tp4.xqh7Sza1oBD./G6RFQTE/OvGm.tHzz4wwABWxe.aew','admin','ak_4c9046ffeb7eafec','2023-08-25 10:23: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=34612;

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


