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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$HaUJdX3heZOw2nFXMKV5SOm5U01.Okys65eTdINcmtx.n9l8Ip.yI','user','ak_b7009d7da91b0cfc','2023-08-05 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$3KcW85ObBBx8RBgHtALQjQqpn9UAhRNWzkztA/W65DGzAGpCbsYEe','user','ak_1eedc308f6a17fa7','2023-11-02 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$4bt226zoBdhegnoLYa2eVWI387CpmKWoRDh4IJjYPR.k2HZSITBKE','user','ak_e33f17de0ecfda59','2023-05-14 10:09: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=8283;

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


