Something went wrong. Try again.
A fork of @slices.network/slices forked from slices.network/slices
Something went wrong. Try again.
535 B · 13 lines
SQL
at main
12345678910111213-- Add jetstream cursor table for tracking event processing positionCREATE TABLE IF NOT EXISTS jetstream_cursor ( id TEXT PRIMARY KEY DEFAULT 'default', time_us BIGINT NOT NULL, updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW());
-- Index for tracking cursor freshnessCREATE INDEX idx_jetstream_cursor_updated_at ON jetstream_cursor(updated_at);
-- Insert default cursor starting at 0 (will be updated when events are processed)INSERT INTO jetstream_cursor (id, time_us) VALUES ('default', 0)ON CONFLICT (id) DO NOTHING;