-- Migration: Add refactor columns
-- Description: Adds birth_date to users, years_in_market to companies, and questions to jobs

-- Add birth_date to users
ALTER TABLE users ADD COLUMN IF NOT EXISTS birth_date DATE;

-- Add years_in_market to companies
ALTER TABLE companies ADD COLUMN IF NOT EXISTS years_in_market VARCHAR(50);

-- Add questions to jobs (stores the dynamic form schema)
ALTER TABLE jobs ADD COLUMN IF NOT EXISTS questions JSONB;

-- Comments
COMMENT ON COLUMN users.birth_date IS 'Date of birth of the user';
COMMENT ON COLUMN companies.years_in_market IS 'How many years the company has been in the market';
COMMENT ON COLUMN jobs.questions IS 'JSON array of custom application questions (max 8)';
