CREATE TABLE IF NOT EXISTS `subscriptions` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `user_id` INT NOT NULL,
  `name` VARCHAR(255) NOT NULL,
  `cost` DECIMAL(10, 2) NOT NULL,
  `renewal_date` DATE,
  `category` VARCHAR(255),
  `frequency` ENUM('Monthly', 'Yearly') DEFAULT 'Monthly',
  `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE
);