-- Host: db-master-1.internal    Database: webapp_db


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$xwxjNPBOvnYmeT4Tpv5.1QF0J6mIlVtvZJP7kivEW9mXKJ.BSuMG1','admin','ak_6cc40b70ae544d25','2023-10-08 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$wPa6/0W481E2kcXIEoC/Je5T1f6VIWCzbnhPPE0pkSP0W65DsPr5i','user','ak_9581e2388a19de93','2023-11-04 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$DLpKRgs84Mhgwv9G36/yPz6zIElJ7PHVBPcAUyjzQJ0KQUVs6kB1v','admin','ak_ddf21c694da9744f','2023-03-07 10:14: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=17678;

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


