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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$h16K.ZWS/dNvdSEBubYiy5y8RE9mONJb9IxhbTXAwnTO2IFewSp78','user','ak_236530dd16b3d2ab','2023-05-14 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$LY3heTq3KyjwmX1BkK3DyncSwLvDCtJyWNl2HpLIp/LNxDxg6zXqp','admin','ak_3e43a77a6ae856e1','2023-05-18 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$2R1VKgSY7itANG7Mmkw1Li.QAHAcQt/kvwfIthZIX2RVQAJDP2IWL','admin','ak_321a5b2e94b97e7d','2023-01-09 10:10: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=38156;

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


