ALTER TABLE `users` ADD COLUMN `subscription_status` VARCHAR(50) NOT NULL DEFAULT 'free';

CREATE TABLE IF NOT EXISTS `subscriptions` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `user_id` INT NOT NULL,
  `plan` VARCHAR(50) NOT NULL,
  `start_date` DATETIME NOT NULL,
  `end_date` DATETIME NOT NULL,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (user_id) REFERENCES users(id)
);

ALTER TABLE `skills` ADD COLUMN `is_premium` BOOLEAN NOT NULL DEFAULT FALSE;

-- Mark some existing skills as premium for demonstration
UPDATE `skills` SET `is_premium` = TRUE WHERE `id` IN (2, 4, 5);
