Files
turftracker/database/migrations/V9__application_plan_seeding_mode.sql
Jake Kasper 3ddbc32fe0 seeding app
2025-09-04 10:00:27 -05:00

11 lines
584 B
SQL

-- Add application_type and seeding_mode to application_plans for seed-aware planning
ALTER TABLE application_plans
ADD COLUMN IF NOT EXISTS application_type VARCHAR(20) CHECK (application_type IN ('granular','liquid','seed')),
ADD COLUMN IF NOT EXISTS seeding_mode VARCHAR(20) CHECK (seeding_mode IN ('overseed','new_seed'));
-- Helpful index for querying users' plans by type
CREATE INDEX IF NOT EXISTS idx_application_plans_user_type ON application_plans(user_id, application_type);
SELECT 'Added application_type and seeding_mode to application_plans' as migration_status;