careersgateway/migrations/003_visa_tracker.sql
King Omar c3fa7fc96c Add Visa Tracker Pro features to user dashboard
9 new tools modelled on Visa Tracker Pro (iOS):
- Points Calculator: full 189/190/491 points test with live breakdown
- Visa Case Timeline: 7-stage tracker (Skills Assess → EOI → Invite → Lodge → Grant) with date + notes
- Document Expiry Tracker: passport/visa/English test/assessment with colour-coded countdown
- VAC Fee Calculator: all major subclasses, primary + partner + children, live JS calc
- Occupation Search: 55 MLTSSL/STSOL occupations with ANZSCO, authority, visa eligibility
- State Nomination Criteria: all 8 states/territories, SC 190 + 491 min points + notes
- Processing Times: P25/P50/P75/P90 percentile table for 11 visa subclasses
- English Requirements: IELTS/PTE/TOEFL/OET table for 6 visa types
- Student Fund Calculator: DHA 2025-26 living costs + tuition + partner/children, live JS calc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-10 13:25:37 +10:00

46 lines
1.4 KiB
SQL

CREATE TABLE IF NOT EXISTS visa_profiles (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER UNIQUE NOT NULL,
occupation_anzsco TEXT,
occupation_name TEXT,
visa_subclass TEXT,
age INTEGER,
english_level TEXT,
education_level TEXT,
aus_study_years REAL,
professional_year INTEGER DEFAULT 0,
overseas_work_years REAL,
aus_work_years REAL,
partner_skills INTEGER DEFAULT 0,
naati INTEGER DEFAULT 0,
regional_study INTEGER DEFAULT 0,
state_nomination TEXT,
updated_at TEXT DEFAULT (datetime('now')),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE IF NOT EXISTS case_timelines (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
stage TEXT NOT NULL,
milestone_date TEXT,
notes TEXT,
updated_at TEXT DEFAULT (datetime('now')),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE IF NOT EXISTS document_expiries (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
doc_type TEXT NOT NULL,
doc_label TEXT NOT NULL,
expiry_date TEXT NOT NULL,
reminder_days INTEGER DEFAULT 180,
created_at TEXT DEFAULT (datetime('now')),
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE INDEX IF NOT EXISTS idx_visa_profiles_user ON visa_profiles(user_id);
CREATE INDEX IF NOT EXISTS idx_timelines_user ON case_timelines(user_id);
CREATE INDEX IF NOT EXISTS idx_docs_user ON document_expiries(user_id);
CREATE INDEX IF NOT EXISTS idx_docs_expiry ON document_expiries(expiry_date);