- Event.zakatEligible (boolean) replaces Organization.zakatEnabled + 5 fund types - Pledge.isZakat (boolean) replaces Pledge.fundType enum - Removed fundAllocation from Event (campaign IS the allocation) - Identity step: simple checkbox instead of 5-option grid - Campaign creation: Zakat toggle + optional external URL for self-payment - External redirect step: 'I've Donated' button calls /api/pledges/[id]/mark-initiated - Landing page: simplified Zakat section (toggle preview, not 5 fund descriptions) - Settings: removed org-level Zakat toggle (it's per campaign now) - Migration: ALTER TABLE adds zakatEligible/isZakat, drops fundAllocation
8 lines
482 B
SQL
8 lines
482 B
SQL
-- Move Zakat to campaign level, simplify pledge
|
|
ALTER TABLE "Event" ADD COLUMN IF NOT EXISTS "zakatEligible" BOOLEAN NOT NULL DEFAULT false;
|
|
ALTER TABLE "Pledge" ADD COLUMN IF NOT EXISTS "isZakat" BOOLEAN NOT NULL DEFAULT false;
|
|
-- Keep fundType column for backward compat but it's deprecated
|
|
-- DROP fundAllocation — the campaign name IS the allocation
|
|
ALTER TABLE "Event" DROP COLUMN IF EXISTS "fundAllocation";
|
|
ALTER TABLE "Organization" DROP COLUMN IF EXISTS "zakatEnabled";
|