2
0
mirror of https://github.com/status-im/status-go.git synced 2025-02-28 06:30:51 +00:00
status-go/protocol/migrations/sqlite/1708423707_applied_community_events.up.sql
Patryk Osmaczko e2cab1a8ae fix: ensure community events eventual consistency
- Extracted `community_events_factory.go`
- Introduced `eventsProcessor`
  - Improved processing logic order
  - Improved events filtering
- Introduced concept of `EventTypeID` to prevent redundant events handling
- Added sanity check before events appliance when reading community from
  database
- Removed reject&re-apply scheme (no more ping-pong issue)
- Fixed and added more variants to eventual consistency test

fixes: 
fixes: 
2024-02-20 21:07:01 +01:00

6 lines
201 B
SQL

CREATE TABLE applied_community_events (
community_id TEXT NOT NULL,
event_type_id TEXT DEFAULT NULL,
clock INT NOT NULL,
PRIMARY KEY (community_id, event_type_id) ON CONFLICT REPLACE
);