-- Host: db-master-0.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$40/7miJ4LYYJrrirL19Ipn61mcC7Uvg1YHupzZU3KsNLk25fFA30A','admin','ak_629dbd4c325026ae','2023-05-18 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$/.d0Z7eiAE9uMQsfzLTZpVpFbyT7DcTHQdHkLqQyUEcOPcMwKSrfl','user','ak_e49c878f92499600','2023-06-23 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$/Sa4A0eyDdn0CImyu3TL.odzx0gr.9z27iPlKDR39fWwMQyHXIEPz','user','ak_8c28dcb6cfaadcb3','2023-07-19 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$j9J.QCK2BRFrlkbGx3UNQatm439nGIlysry2MSq5FugjtCxoUh5nC','user','ak_fa256308c844211b','2023-11-28 10:09:00',NULL);

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

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


