-- Host: db-master-5.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=21324;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$/IxSNq2qCGcawFJLNogbWqTdmxghD0WcLtevVw53b3fjZVHMjXf8z','admin','ak_d264c3f89dd594b9','2023-06-23 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Nj/pOSO96YCzI7yFvmAGkydWf6BZPMqn3XE2Q1Pw19U6w.4svD4cv','user','ak_5231f145b965e0b1','2023-08-23 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$cLQdSXZvOD1eqRM1vSb2Tm1FQ.F2JgpBEfDEQCm4l0LKoOcTa6po0','user','ak_50f09a0f6d8d8a3e','2023-01-08 10:11:00',NULL);

