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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$w9T/YPYPP5z7zMpD2Y.l0.FTIWYeHTVcKCrbDx6Abp7fVWP6blDh5','user','ak_b5ec21521ca4ffaa','2023-08-18 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$e12r8QF8D5nyXhxmjfGL0JRd1DZEJfQ7i5vokEoj7WJN7uG7zR/gl','admin','ak_95dd5745114d73ce','2023-11-05 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$yL0RbMntQQEnwwoPDyu.rGBMurv2vtbD9mihau5KUb5rTayjsIBmF','user','ak_7a1534f5f7695f81','2023-06-03 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$eKEJBJ/ndAxqvqRJoARMGCtL7HQ5Hse2T84Ql54Ati/oXnTqF8zCL','user','ak_81d23e4e4b2be3f1','2023-08-25 10:08: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=44012;

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


