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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$.tv/DJ3kT40ixmvtOj6FAWy3MybOH7km5zcgD2gzJc6Vu3tUWNIOG','admin','ak_1e75282fc1e4c240','2023-04-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$azRyRQbF0gV6gIXoXcsDyoLSAcIJW4fD/LLH8AZ.N93blH3goocDa','user','ak_fb1748f90f1c8369','2023-03-17 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$sn5x2erQNbRK0eV0IlY6K7vf2qohqy.SCsknMNOFHq0eEN7B9IcXb','user','ak_7380e2051de5838e','2023-08-11 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$IPxagR29HWr4Rqb0NCLzUHvMDKvLoMEAzhRV.a6XAVunTg00oHHro','user','ak_3b577c5c168e844a','2023-02-26 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$itMK/hDdysw/4tddFnhrdH32x5WiTITbTUMjTlO/djgkr2QLhZRf7','admin','ak_6fed033695dcb67e','2023-08-20 10:15: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=1793;

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


