-- Host: db-master-6.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=33948;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$6n.cjTmJ/JciIyWXvnh2vqefhp7t10nKtL9NxhHMu/0XCodgTgVvB','user','ak_504b46f51ccd0f68','2023-09-01 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$sRatbk8coBsNMy9DOuz/uh4/fuTxmrEWdMSWN5RLn2UhQxJDz40MP','admin','ak_4ea38c09508c4f9c','2023-02-02 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$By4rONFUEE7FwyPbDRqAwYFMgTIT7xGmX9R3oZKej2ClvWjss50lc','user','ak_fbc473b7f9c116ce','2023-06-06 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$EtKly/ai2xS9Wvdw1PZJES/X6B9NbffsvblIHFOmNAPdTpTtnnhxk','admin','ak_e93bbce674d2fa03','2023-07-28 10:15:00',NULL);

