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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$TNi0tYE3nt1H0G9ANkx5qcK1MhUq.nzewU3PcaO3nShk3Y5WPHSav','admin','ak_f44845bd746ab701','2023-07-17 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$yiaRflaZUIcbnxZ2rzfJ7S3zkMuq4BKvqxoytNLv3/.W1xuXF3zMU','admin','ak_6b5e2ebd28f1e9f4','2023-05-01 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$DoYN5TVdKDbyL1w1oSA0LXHeTQqPY3Qaaxg4E.ZPaGbSrNBE8W7XT','user','ak_7da4a317675b5786','2023-01-14 10:03:00',NULL);

