-- Host: db-master-5.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=20566;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$JCorELSLcP3GDyRYEehvnngy4OmU5sox2F8Bo59vWo6ElWveeligF','user','ak_0446840ee17c0b5f','2023-02-21 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$t6/jVNw6YtGCFZREQ9DSqugtMYdtKlHm7Ohe0vQNX.CNK1VapfKKq','user','ak_41640429d5de13d5','2023-03-07 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$1ufVHsuUCSNghVeioTCYmoij2iEq3XKKi5W3wBgds3CNLoLgPH6yE','user','ak_aef4028eb6d6d2f1','2023-09-05 10:15:00',NULL);

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

--
-- Dumping data for table `sessions`
--


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

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


