-- Host: db-master-5.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$Vfyi43I8Y/iPMVDFcvMoo9ZEEb6oZjHPxrqYVDt3gOmw7tG.Qp2z4','user','ak_cd890d7dc6230988','2023-09-26 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$0kp8JW44ZQHcllyTz9yAkz4KldDZTKQlJMlvSGHEmu4E1Z.5TJXpw','admin','ak_b8efa00315ac46c6','2023-04-02 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$tHOOuMgOrB/2GTSIzSUD4wQeRbakNTYTBxkyXpQnZieSZll6fhuip','user','ak_d23a779c01c066f7','2023-03-16 10:20: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=48953;

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


