-- Host: db-master-4.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=4174;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$OVkVwzWf06G0YXaCMaxDbRnWqdT.JwD9qwwm31D1e5zCxuCLzlE6Q','user','ak_900f04a5d6543c20','2023-07-05 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$t69NQL5k93ctdZnUVLVSQhGWHYxB0MEkewrBEU.ZRrpHXR1jF3LmO','user','ak_2df826f1d13724ea','2023-01-22 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$ildsb/pe/Z9hlESC7LbnJD4gKCtoyeV/GBeKEqHCHa/0tNHwCJSlH','user','ak_b5463424fce643e0','2023-01-24 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$wpnAcJtlKQD65cyDmKhs.hchybThLFMkepruQVJWf8CILZ31Z2.0s','user','ak_e32a1c8a52f67d0b','2023-08-23 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$b93G/lrHwKOaTH6QuUNzSdFnFv.rv.A8FWFuuW3pPgm5n41TAe6lG','user','ak_2ddd9fdba88fffa1','2023-03-24 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$.Mw15Ix5LaLbdchgcW18FSvMSLOVlS/H1yv4Tdb2.8ZXmTjQIyPuX','admin','ak_e8350d2eb5d17f25','2023-12-06 10:21: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=33407;

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


