nxtgauge-backend-rust/crates/db/migrations/20260317000002_init_photographer_schema.up.sql
Ashwin Kumar 9764a7acdd feat: commit remaining service files, migrations, and model updates
- gateway, companies, customers, job_seekers apps updated
- users config/mod/mail handlers
- auth middleware and jwt crate updates
- db models: user, config, mod updates
- all remaining migrations: portfolio, notifications, reviews, kb, support, coupons, onboarding states

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:59:47 +01:00

17 lines
609 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE TABLE IF NOT EXISTS photographer_profiles (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
-- Photographer Specific Fields
portfolio_url VARCHAR(255),
equipment_list TEXT,
years_of_experience INT,
hourly_rate INTEGER, -- in paise (INR × 100)
specialties TEXT[], -- e.g., ["wedding", "portrait", "commercial"]
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
-- Ensure a user can only have one photographer profile
UNIQUE(user_id)
);