BEGIN;

ALTER TABLE ai_usage_logs
    ALTER COLUMN created_at TYPE TIMESTAMP USING created_at AT TIME ZONE 'UTC';

ALTER TABLE ai_feature_costs
    ALTER COLUMN created_at TYPE TIMESTAMP USING created_at AT TIME ZONE 'UTC',
    ALTER COLUMN updated_at TYPE TIMESTAMP USING updated_at AT TIME ZONE 'UTC';

ALTER TABLE user_ai_subscriptions
    ALTER COLUMN current_period_start TYPE TIMESTAMP USING current_period_start AT TIME ZONE 'UTC',
    ALTER COLUMN current_period_end   TYPE TIMESTAMP USING current_period_end   AT TIME ZONE 'UTC',
    ALTER COLUMN created_at           TYPE TIMESTAMP USING created_at           AT TIME ZONE 'UTC',
    ALTER COLUMN updated_at           TYPE TIMESTAMP USING updated_at           AT TIME ZONE 'UTC';

ALTER TABLE ai_plans
    ALTER COLUMN created_at TYPE TIMESTAMP USING created_at AT TIME ZONE 'UTC',
    ALTER COLUMN updated_at TYPE TIMESTAMP USING updated_at AT TIME ZONE 'UTC';

COMMIT;
