HR-ATS-Portal/backend/migrations/manual/017_talent_outreach.sql

22 lines
872 B
SQL

-- 017_talent_outreach.sql
-- Manual outreach funnel on talent_profiles: sourced -> shortlisted -> contacted.
-- The app sends no messages; recruiters reach out on LinkedIn themselves and
-- record the result here (who shortlisted / contacted, and when). Applied at
-- startup by alembic_setup.run_manual_sql(). Needed because prod boots with
-- DB_AUTOGENERATE=false.
ALTER TABLE app.talent_profiles
ADD COLUMN IF NOT EXISTS outreach_status TEXT NOT NULL DEFAULT 'sourced';
ALTER TABLE app.talent_profiles
ADD COLUMN IF NOT EXISTS shortlisted_at TIMESTAMPTZ;
ALTER TABLE app.talent_profiles
ADD COLUMN IF NOT EXISTS shortlisted_by UUID REFERENCES app.users(id);
ALTER TABLE app.talent_profiles
ADD COLUMN IF NOT EXISTS contacted_at TIMESTAMPTZ;
ALTER TABLE app.talent_profiles
ADD COLUMN IF NOT EXISTS contacted_by UUID REFERENCES app.users(id);