-- 0008_drop_retired_tables.down.sql (manual rollback only — never auto-applied) -- -- Recreates the two dropped tables as EMPTY shells, matching the schema that existed -- immediately before 0008 (lp_profiles includes the deleted_at column that migration -- 0001 had added). Data is not restored — both tables were empty when dropped. CREATE TABLE IF NOT EXISTS lp_profiles ( id TEXT PRIMARY KEY, contact_id TEXT NOT NULL UNIQUE REFERENCES contacts(id) ON DELETE CASCADE, commitment_amount REAL DEFAULT 0, funded_amount REAL DEFAULT 0, commitment_date TEXT, fund_name TEXT, investor_type TEXT, accredited INTEGER DEFAULT 0, legal_docs_signed INTEGER DEFAULT 0, signed_date TEXT, wire_received INTEGER DEFAULT 0, wire_date TEXT, k1_sent INTEGER DEFAULT 0, preferred_communication TEXT DEFAULT 'email', notes TEXT, created_at TEXT DEFAULT (datetime('now')), updated_at TEXT DEFAULT (datetime('now')), deleted_at TEXT ); CREATE INDEX IF NOT EXISTS idx_lp_profiles_contact ON lp_profiles(contact_id); CREATE TABLE IF NOT EXISTS feature_requests ( id TEXT PRIMARY KEY, title TEXT NOT NULL, description TEXT, page TEXT, category TEXT DEFAULT 'general', priority TEXT DEFAULT 'medium', status TEXT DEFAULT 'new', requested_by TEXT, requested_by_user_id TEXT REFERENCES users(id), created_at TEXT DEFAULT (datetime('now')), updated_at TEXT DEFAULT (datetime('now')) ); CREATE INDEX IF NOT EXISTS idx_feature_requests_status ON feature_requests(status); CREATE INDEX IF NOT EXISTS idx_feature_requests_created_at ON feature_requests(created_at);