Skip to content

[Airdrop] Missing pl_airdrop_proofs table in migration #914

@realproject7

Description

@realproject7

Parent: #877

Problem

The pl_airdrop_proofs table is referenced in 3 places but was never created in the DB migration (supabase/migrations/00035_airdrop_tables.sql).

Referenced in:

  • src/app/api/airdrop/proof/route.ts — queries proofs for claims
  • scripts/airdrop-finalize.ts — upserts computed Merkle proofs

Both use .from("pl_airdrop_proofs" as never) as a workaround, which confirms the table is missing from the schema.

Fix

Add the table to the migration:

CREATE TABLE pl_airdrop_proofs (
  address TEXT PRIMARY KEY,
  amount TEXT NOT NULL,
  proof TEXT NOT NULL,
  merkle_root TEXT NOT NULL
);

Also remove the as never type assertions once the table exists in the schema.

Impact

Campaign end (Phase 5) will crash — finalize script can't store proofs, users can't claim. Not blocking for campaign launch, but must be fixed before campaign end.

Acceptance Criteria

  • pl_airdrop_proofs table created
  • as never type assertions removed from proof/finalize code
  • Finalize script can upsert proofs
  • Proof API can query proofs

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentairdropPLOT 10x Airdrop CampaignbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions