-- CloudVault Initial Schema - Admin Users Table
CREATE TABLE IF NOT EXISTS `admin_users` (
  `id` int AUTO_INCREMENT NOT NULL,
  `username` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `full_name` varchar(255),
  `role` varchar(50) DEFAULT 'admin',
  `is_active` boolean DEFAULT true,
  `last_login` timestamp,
  `created_at` timestamp DEFAULT (now()),
  `updated_at` timestamp DEFAULT (now()),
  CONSTRAINT `admin_users_id` PRIMARY KEY(`id`),
  CONSTRAINT `admin_users_username_unique` UNIQUE(`username`),
  CONSTRAINT `admin_users_email_unique` UNIQUE(`email`)
);
