-- Create table for Google Drive folder configurations
-- Supports public and shareholders-only folders

CREATE TABLE IF NOT EXISTS `GoogleDriveFolders` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `folder_type` ENUM('public', 'shareholders') NOT NULL COMMENT 'Type of folder: public or shareholders-only',
  `folder_name` VARCHAR(255) NOT NULL COMMENT 'Display name for the folder',
  `google_drive_folder_id` VARCHAR(255) NOT NULL COMMENT 'Google Drive folder ID',
  `google_drive_folder_url` VARCHAR(500) DEFAULT NULL COMMENT 'Full Google Drive folder URL',
  `description` TEXT DEFAULT NULL COMMENT 'Description of the folder contents',
  `is_active` ENUM('Y', 'N') DEFAULT 'Y' COMMENT 'Whether this folder configuration is active',
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_folder_type` (`folder_type`, `is_active`),
  INDEX `idx_folder_type` (`folder_type`),
  INDEX `idx_is_active` (`is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Google Drive folder configurations for public and shareholders access';





