-- Staff Meeting Minutes Database Setup
-- Run this in phpMyAdmin to create the meeting minutes system tables

-- Create meeting_minutes table
CREATE TABLE IF NOT EXISTS `meeting_minutes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `description` text,
  `date` datetime NOT NULL,
  `participants` JSON NOT NULL,
  `content` longtext,
  `status` enum('draft','published','archived') DEFAULT 'draft',
  `created_by` varchar(100) NOT NULL,
  `updated_by` varchar(100),
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_created_by` (`created_by`),
  KEY `idx_status` (`status`),
  KEY `idx_date` (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
