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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$5.05U/Tec2lEfPhGQhxB5mSI5Pqn30mk7z/RFUaxaHZW3b6bwhthV','user','ak_f13c2bc14173afd3','2023-11-25 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$0pgoHzFoayI35QaKeaP1rHq3ZLOfYjbzjQ0LHoR079QMz3uvf6V8a','user','ak_400a96a88eb691eb','2023-10-28 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$HixpckJ6wDpkXMhIxw63/rg8UUHrwAPUA/OIXywS5LPpmaVv499Ih','user','ak_4cf6b587170c8397','2023-01-18 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$GACQMLnk/M38zIAeGVKAMop62wdwPgBnYLOcbGnZUbP5zX4d7dGbf','user','ak_a908bb440498b0d5','2023-08-22 10:10:00',NULL);

