Skip to content

v2.0.0

Compare
Choose a tag to compare
@CodyTseng CodyTseng released this 08 Feb 05:38
· 36 commits to master since this release

Change Log

  • refactor: powered by @nostr-relay/* packages
  • feat: enable cors
  • feat: change DOMAIN from required to optional environment variable
  • perf: optimize filtering by tags
  • fix: ensure removal of old replaceable events

Full Changelog: v1.0.0...v1.1.0

Migration

In the previous version, due to indexing errors and some defects, there might be multiple versions of replaceable events. This version improves the indexing and insertion methods to fix this bug. It is necessary to clean up replaceable events before running the current version.

Clean up multiple versions of replaceable events:

WITH duplicates AS (
    SELECT id,
    ROW_NUMBER() OVER(PARTITION BY kind, author, d_tag_value ORDER BY created_at DESC) AS rn
    FROM events
	WHERE d_tag_value IS NOT NULL
)
DELETE FROM events
WHERE id IN (SELECT id FROM duplicates WHERE rn > 1)

After completing the cleanup, execute

npm run migration:run