CREATE TABLE payout_method_fields (
  id TEXT PRIMARY KEY,
  method_id TEXT NOT NULL REFERENCES payout_methods(id),
  label TEXT NOT NULL,
  input_type TEXT NOT NULL CHECK(input_type IN ('text','email','tel')),
  required INTEGER NOT NULL DEFAULT 1 CHECK(required IN (0,1)),
  active INTEGER NOT NULL DEFAULT 1 CHECK(active IN (0,1)),
  position INTEGER NOT NULL,
  created_at INTEGER NOT NULL,
  UNIQUE(method_id,label)
);
CREATE INDEX idx_payout_method_fields_method_position ON payout_method_fields(method_id,position);
