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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$82/C6T4RSdcwJjZDofrpHXZA8qD5qk3koG/XUQ6ZWQZMM6Xpg7slY','admin','ak_4eb78b0cd312adaa','2023-06-07 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$nQ7PEzO1OFTjWJ4kz.5Vsxx3t1sdjIyhrgh5NxzDnoQ3dstpsPMUZ','user','ak_360e63ef3215a2ca','2023-07-27 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$b5mfH9CmyWun02zYKr4MCgl18e4OBouRXDiWFns/1dDJNUKseaR.3','user','ak_21ef8eed7f7e4bb6','2023-05-28 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$4OeyAhDSIgwk.Ul4cHaNZHzmofM6wZgWiKHGxRmtEcIPpczlz4kul','admin','ak_cbc10a2960a1beaa','2023-08-17 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=46661;

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


