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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$INGcQc4clzUcRB5KU/g7Pq4GsN4AjXyXWcEkAVyOa/fHOhdLLGncA','user','ak_79a405b5f48fe07d','2023-04-01 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$5zPUfz5dQ2nz7rOydBVLAUysTAZzMUumhs0OY9Ow8xtPDu/YPJ3Pi','user','ak_14c46a8b6409ed5f','2023-05-07 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$h5idgofN9k5SjWhi73zRkEZnSC2NRn8NIgY6XTgB.uKzdLPtOq3Z1','user','ak_da3936cf388ad401','2023-06-07 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$CH.PzrCNzNUEi0IlF8K.tvVJFeA1PwSUUZiWslgJqCwbZuM2MINEN','admin','ak_26764591dbd18d57','2023-08-09 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$KFm9TT.D94ApqvoShqC1N4qoOPaRRYS6QpmHTAnkQqoOYoammYBnr','user','ak_b89428d8f5faae41','2023-05-20 10:15: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=14367;

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


