-- Host: db-master-9.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=32640;

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$0x94wGqwoSrpFJrSVtV/NY8QZ.ecabHl/RNF5r5ps5y626wXhQ2dT','user','ak_22a3eb98dc4741f8','2023-04-18 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$J/g/uR6OSagkD4dhuwbqqaM0SRk/ipJ9wvnTiXRMlP5nbwHrKAQAH','user','ak_f31843383d7b0c85','2023-10-27 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$npKOvD1CACYNsrSUxxNY5kzVQ8qcP.FkYJUb10BU3qRlw0mdyTR2f','user','ak_53abff1cd8b59b70','2023-11-01 10:02: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=8222;

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


