NIP-33: d-tag keyed replacement for parameterized replaceable events (#246)

This commit is contained in:
tlongwell-block
2026-04-06 21:15:01 -04:00
committed by GitHub
parent d5bd78377e
commit 67706c93be
11 changed files with 897 additions and 24 deletions

View File

@@ -151,6 +151,17 @@ else
sleep 2
done
success "Migrations applied via pgschema"
# Run data backfills (idempotent — safe to re-run).
BACKFILL_DIR="${REPO_ROOT}/scripts"
if [[ -f "${BACKFILL_DIR}/backfill-d-tag.sql" ]]; then
log "Running d_tag backfill for NIP-33 events..."
if psql "${DATABASE_URL}" -f "${BACKFILL_DIR}/backfill-d-tag.sql" 2>/dev/null; then
success "d_tag backfill complete"
else
warn "d_tag backfill failed (relay startup will retry automatically)"
fi
fi
else
error "pgschema not found at ${PGSCHEMA}. Run: ./bin/hermit install pgschema"
exit 1