feat: support hybrid+remote job search and use job_scraper_db

- Replace remote_only flag with configurable work_types list (remote, hybrid, onsite)
- Switch database from job_matcher_db to job_scraper_db
- Add ALTER TABLE migration for existing jobs table with scoring columns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
harwinder
2026-05-27 19:47:22 -04:00
parent e608d367e2
commit 39a29a8e4e
3 changed files with 28 additions and 7 deletions
+17 -2
View File
@@ -1,5 +1,5 @@
CREATE DATABASE IF NOT EXISTS job_matcher_db;
USE job_matcher_db;
CREATE DATABASE IF NOT EXISTS job_scraper_db;
USE job_scraper_db;
CREATE TABLE IF NOT EXISTS jobs (
job_id INT AUTO_INCREMENT PRIMARY KEY,
@@ -39,3 +39,18 @@ CREATE TABLE IF NOT EXISTS alert_logs (
FOREIGN KEY (user_id) REFERENCES users(user_id),
FOREIGN KEY (job_id) REFERENCES jobs(job_id)
);
-- Migration: add columns required by daemon.py to an existing jobs table
ALTER TABLE jobs
ADD COLUMN IF NOT EXISTS description TEXT DEFAULT NULL,
ADD COLUMN IF NOT EXISTS match_score INT DEFAULT NULL,
ADD COLUMN IF NOT EXISTS match_breakdown JSON DEFAULT NULL,
ADD COLUMN IF NOT EXISTS matched_skills JSON DEFAULT NULL,
ADD COLUMN IF NOT EXISTS missing_skills JSON DEFAULT NULL,
ADD COLUMN IF NOT EXISTS verdict VARCHAR(50) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS detail_fetched_at DATETIME DEFAULT NULL,
ADD COLUMN IF NOT EXISTS scored_at DATETIME DEFAULT NULL;
ALTER TABLE jobs
ADD INDEX IF NOT EXISTS idx_match_score (match_score),
ADD INDEX IF NOT EXISTS idx_verdict (verdict);