openvibers/openvibe.live Commits
N-1 fixtures re-recorded from 2e6f546, the release now in production (npm run n-1:record).
Changes
@@@ -1,14 +1,14 @@{"service": "live",-- "release": "f9599c631bd977fee05ddb99a0c8b3f3ce2ebd8b",-- "recorded_at": "2026-09-26T15:19:45.475Z",++ "release": "2e6f546444ef378a6e2126702960623635ac97a2",++ "recorded_at": "2026-09-27T19:07:42.982Z","note": "N-1 fixture: written by `npm run n-1:record`, replayed by test/n-1.test.js","manifest": {"service": "live",-- "release": "f9599c631bd9",-- "released_at": "2026-09-26T15:19:03.000Z",-- "booted_at": "2026-09-26T15:19:42.701Z",-- "contracts_version": "0.56.0",++ "release": "2e6f546444ef",++ "released_at": "2026-09-26T17:11:09.000Z",++ "booted_at": "2026-09-27T19:07:39.507Z",++ "contracts_version": "0.68.0","packages": {"openvibe-shared": "1.22.0","openvibe-sdk": "0.11.0"@@@ -18,17 +18,20 @@"components": {"shell": {"kind": "script",-- "version": "f9599c631bd9"++ "version": "2e6f546444ef"},"server": {"kind": "server",-- "version": "f9599c631bd9"++ "version": "2e6f546444ef"}},"assets": {},"schema_generation": null,"schema_compatible_from": null,"contract_ranges": {},++ "client_generation": null,++ "min_client_generation": null,++ "shell": null,"metrics_url": "/release-metrics"},"dynamic_calls": 44,@@@ -1,7 +1,7 @@{"service": "live",-- "release": "f9599c631bd977fee05ddb99a0c8b3f3ce2ebd8b",-- "recorded_at": "2026-09-26T15:19:45.475Z",++ "release": "2e6f546444ef378a6e2126702960623635ac97a2",++ "recorded_at": "2026-09-27T19:07:42.982Z","note": "N-1 fixture: written by `npm run n-1:record`, replayed by test/n-1.test.js","user_version": 0,"schema": [@@@ -257,21 +257,21 @@"schema_migrations": [{"id": "001_vibes_decimal_to_bits",-- "applied_at": "2026-09-26 15:19:41",++ "applied_at": "2026-09-27 19:07:37","mode": "adopted",-- "duration_ms": 1++ "duration_ms": 0},{"id": "002_pastes_ai_columns",-- "applied_at": "2026-09-26 15:19:41",++ "applied_at": "2026-09-27 19:07:37","mode": "applied",-- "duration_ms": 11++ "duration_ms": 5},{"id": "004_hot_path_indexes",-- "applied_at": "2026-09-26 15:19:41",++ "applied_at": "2026-09-27 19:07:37","mode": "applied",-- "duration_ms": 1++ "duration_ms": 0}]},@@@ -289,6 +289,7 @@"CREATE TABLE IF NOT EXISTS lineage_unresolved ( ref TEXT NOT NULL, reason TEXT NOT NULL, detail TEXT, last_caller TEXT, count INTEGER NOT NULL DEFAULT 1, first_at TEXT NOT NULL, last_at TEXT NOT NULL, PRIMARY KEY (ref, reason) )","CREATE TABLE IF NOT EXISTS billing_actions ( id INTEGER PRIMARY KEY AUTOINCREMENT, action TEXT NOT NULL, idempotency_key TEXT NOT NULL UNIQUE, live_user_id INTEGER, live_ref TEXT, method TEXT NOT NULL, path TEXT NOT NULL, request_json TEXT NOT NULL, status TEXT NOT NULL DEFAULT 'pending', http_status INTEGER, billing_ref TEXT, response_json TEXT, error TEXT, attempts INTEGER NOT NULL DEFAULT 0, created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP )","CREATE TABLE IF NOT EXISTS opencoin_admin_grants ( id INTEGER PRIMARY KEY AUTOINCREMENT, client_key TEXT UNIQUE, admin_id INTEGER, user_id INTEGER NOT NULL, amount INTEGER NOT NULL, reason TEXT, balance INTEGER, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )",++ "CREATE TABLE IF NOT EXISTS follow_projection_revisions ( follower_subject TEXT NOT NULL, target_subject TEXT NOT NULL, revision INTEGER NOT NULL, PRIMARY KEY (follower_subject, target_subject) )","CREATE TABLE IF NOT EXISTS tips_deliveries ( idempotency_key TEXT PRIMARY KEY, effect TEXT, state TEXT NOT NULL DEFAULT 'pending', response_json TEXT, claimed_at INTEGER NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )","ALTER TABLE users ADD COLUMN theme_id INTEGER","ALTER TABLE streams ADD COLUMN call_mode TEXT DEFAULT NULL"@@@ -311,7 +312,9 @@"DELETE FROM chat_bridge_outbox","DELETE FROM chat_bridge_outbox WHERE id = ?","DELETE FROM chat_dual_read_stats WHERE tbl = ?",++ "DELETE FROM clip_ai_state WHERE clip_id = ?","DELETE FROM coin_rewards WHERE id = ?",++ "DELETE FROM content_views WHERE content_type = ? AND content_id = ?","DELETE FROM control_config_buttons WHERE id = ?","DELETE FROM control_config_buttons WHERE id = ? AND config_id = ?","DELETE FROM control_configs WHERE id = ?",@@@ -347,6 +350,7 @@"DELETE FROM user_equipped WHERE user_id = ? AND slot = ?","DELETE FROM user_equipped WHERE user_id = ? AND slot = ? AND item_id = ?","DELETE FROM viewer_samples WHERE sampled_at < datetime('now', '-400 days')",++ "DELETE FROM vod_ai_state WHERE vod_id = ?","INSERT INTO ai_chatbot_configs (user_id, enabled, base_url, api_token, model, transcribe_enabled, transcribe_model, num_bots, post_interval_seconds, persona, vision_enabled) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)","INSERT INTO ai_timeline_cache (user_id, payload, generated_at) VALUES (?, ?, CURRENT_TIMESTAMP) ON CONFLICT(user_id) DO UPDATE SET payload = excluded.payload, generated_at = CURRENT_TIMESTAMP","INSERT INTO ai_usage (kind, model, input_tokens, output_tokens, cached_tokens, cost_usd, owner_user_id, source, role, provider, latency_ms) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",@@@ -398,6 +402,7 @@"INSERT INTO donation_goals (user_id, title, target_amount) VALUES (?, ?, ?)","INSERT INTO donation_goals (user_id, title, target_amount, image_url, media_type, sort_order) VALUES (?, ?, ?, ?, ?, ?)","INSERT INTO emotes (user_id, code, url, animated, width, height, is_global, channel_owner_id, size) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",++ "INSERT INTO follow_projection_revisions (follower_subject, target_subject, revision) VALUES (?, ?, ?) ON CONFLICT (follower_subject, target_subject) DO UPDATE SET revision = excluded.revision","INSERT INTO ip_log (user_id, anon_id, ip_address, action, geo_country, geo_region, geo_city, geo_isp, geo_org, geo_ll, user_agent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)","INSERT INTO kick_channel_cache (slug, chatroom_id, kick_channel_id, updated_at) VALUES (?, ?, ?, CURRENT_TIMESTAMP) ON CONFLICT(slug) DO UPDATE SET chatroom_id = excluded.chatroom_id, kick_channel_id = COALESCE(excluded.kick_channel_id, kick_channel_cache.kick_channel_id), updated_at = CURRENT_TIMESTAMP","INSERT INTO lineage_unresolved (ref, reason, detail, last_caller, count, first_at, last_at) VALUES (?, ?, ?, ?, 1, ?, ?) ON CONFLICT (ref, reason) DO UPDATE SET detail = excluded.detail, last_caller = excluded.last_caller, count = count + 1, last_at = excluded.last_at",@@@ -787,10 +792,10 @@"SELECT COUNT(*) as c FROM users WHERE role = 'mod'","SELECT COUNT(*) as c FROM users WHERE role IN ('streamer', 'admin')","SELECT COUNT(*) as c FROM users WHERE username LIKE ? OR display_name LIKE ?",-- "SELECT COUNT(*) as cnt FROM chat_messages WHERE is_global = 1 AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",++ "SELECT COUNT(*) as cnt FROM chat_messages WHERE is_global = 1 AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0","SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND is_deleted = 0 AND is_global = 0 AND message_type = 'chat'","SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= ? AND is_deleted = 0 AND is_global = 0 AND message_type = 'chat'",-- "SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",++ "SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0","SELECT COUNT(*) as cnt FROM follows WHERE streamer_id = ?","SELECT COUNT(*) as cnt FROM follows WHERE streamer_id = ? AND created_at >= ? AND created_at <= ?","SELECT COUNT(*) as cnt FROM streams WHERE user_id = ? AND duration_seconds > 0",@@@ -994,6 +999,7 @@"SELECT r.stream_id, r.user_id, r.json, r.created_at FROM stream_recaps r JOIN users u ON u.id = r.user_id WHERE r.ai = 1 AND COALESCE(u.is_banned, 0) = 0 ORDER BY r.created_at DESC, r.stream_id DESC LIMIT ? OFFSET ?","SELECT reason, COUNT(*) AS refs, SUM(count) AS answers FROM lineage_unresolved GROUP BY reason","SELECT recorded_at AS t, viewer_count AS v, COALESCE(chat_messages_5m, 0) AS c FROM viewer_snapshots WHERE stream_id = ? ORDER BY recorded_at ASC",++ "SELECT revision FROM follow_projection_revisions WHERE follower_subject = ? AND target_subject = ?","SELECT revision FROM subject_projection WHERE subject_id = ?","SELECT rowid AS id, * FROM relay_users WHERE platform = ? AND username = ?","SELECT rowid AS id, * FROM relay_users WHERE rowid = ?",@@@ -1039,6 +1045,7 @@"SELECT started_at, is_live FROM streams WHERE id = ?","SELECT status, COUNT(*) AS n FROM billing_actions GROUP BY status","SELECT stream_id, json, ai, created_at FROM stream_recaps WHERE user_id = ? ORDER BY created_at DESC LIMIT ?",++ "SELECT stream_id, new_followers, clips_created, coins_earned FROM stream_analytics WHERE stream_id = ?","SELECT streamer_id FROM follows WHERE follower_id = ?","SELECT strftime('%s', sampled_at) AS t, viewers, live_streams FROM viewer_samples WHERE sampled_at >= datetime('now', ?) ORDER BY sampled_at ASC","SELECT subject_id FROM linked_accounts WHERE service = 'network' AND user_id = ?",@@@ -1145,8 +1152,8 @@"UPDATE chat_dual_read_stats SET last_mismatch_at = CURRENT_TIMESTAMP, last_mismatch = ? WHERE tbl = ?","UPDATE chat_messages SET channel_user_id = (SELECT s.user_id FROM streams s WHERE s.id = chat_messages.stream_id) WHERE stream_id IS NOT NULL AND channel_user_id IS NULL","UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE id = ?",-- "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE is_global = 1 AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",-- "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE stream_id = ? AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",++ "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE is_global = 1 AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0",++ "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE stream_id = ? AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0","UPDATE chat_messages SET message = ?, metadata = ? WHERE id = ?","UPDATE chat_messages SET metadata = ? WHERE id = ?","UPDATE clip_ai_state SET ai_overview = ?, ai_overview_short = ?, ai_transcript_json = COALESCE(?, ai_transcript_json) WHERE clip_id = ?",
@@ -1,14 +1,14 @@
@@ -1,14 +1,14 @@
{
{
"service": "live",
"service": "live",
- "release": "f9599c631bd977fee05ddb99a0c8b3f3ce2ebd8b",
- "recorded_at": "2026-09-26T15:19:45.475Z",
+ "release": "2e6f546444ef378a6e2126702960623635ac97a2",
+ "recorded_at": "2026-09-27T19:07:42.982Z",
"note": "N-1 fixture: written by `npm run n-1:record`, replayed by test/n-1.test.js",
"note": "N-1 fixture: written by `npm run n-1:record`, replayed by test/n-1.test.js",
"manifest": {
"manifest": {
"service": "live",
"service": "live",
- "release": "f9599c631bd9",
- "released_at": "2026-09-26T15:19:03.000Z",
- "booted_at": "2026-09-26T15:19:42.701Z",
- "contracts_version": "0.56.0",
+ "release": "2e6f546444ef",
+ "released_at": "2026-09-26T17:11:09.000Z",
+ "booted_at": "2026-09-27T19:07:39.507Z",
+ "contracts_version": "0.68.0",
"packages": {
"packages": {
"openvibe-shared": "1.22.0",
"openvibe-shared": "1.22.0",
"openvibe-sdk": "0.11.0"
"openvibe-sdk": "0.11.0"
@@ -18,17 +18,20 @@
@@ -18,17 +18,20 @@
"components": {
"components": {
"shell": {
"shell": {
"kind": "script",
"kind": "script",
- "version": "f9599c631bd9"
+ "version": "2e6f546444ef"
},
},
"server": {
"server": {
"kind": "server",
"kind": "server",
- "version": "f9599c631bd9"
+ "version": "2e6f546444ef"
}
}
},
},
"assets": {},
"assets": {},
"schema_generation": null,
"schema_generation": null,
"schema_compatible_from": null,
"schema_compatible_from": null,
"contract_ranges": {},
"contract_ranges": {},
+ "client_generation": null,
+ "min_client_generation": null,
+ "shell": null,
"metrics_url": "/release-metrics"
"metrics_url": "/release-metrics"
},
},
"dynamic_calls": 44,
"dynamic_calls": 44,
@@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
{
{
"service": "live",
"service": "live",
- "release": "f9599c631bd977fee05ddb99a0c8b3f3ce2ebd8b",
- "recorded_at": "2026-09-26T15:19:45.475Z",
+ "release": "2e6f546444ef378a6e2126702960623635ac97a2",
+ "recorded_at": "2026-09-27T19:07:42.982Z",
"note": "N-1 fixture: written by `npm run n-1:record`, replayed by test/n-1.test.js",
"note": "N-1 fixture: written by `npm run n-1:record`, replayed by test/n-1.test.js",
"user_version": 0,
"user_version": 0,
"schema": [
"schema": [
@@ -257,21 +257,21 @@
@@ -257,21 +257,21 @@
"schema_migrations": [
"schema_migrations": [
{
{
"id": "001_vibes_decimal_to_bits",
"id": "001_vibes_decimal_to_bits",
- "applied_at": "2026-09-26 15:19:41",
+ "applied_at": "2026-09-27 19:07:37",
"mode": "adopted",
"mode": "adopted",
- "duration_ms": 1
+ "duration_ms": 0
},
},
{
{
"id": "002_pastes_ai_columns",
"id": "002_pastes_ai_columns",
- "applied_at": "2026-09-26 15:19:41",
+ "applied_at": "2026-09-27 19:07:37",
"mode": "applied",
"mode": "applied",
- "duration_ms": 11
+ "duration_ms": 5
},
},
{
{
"id": "004_hot_path_indexes",
"id": "004_hot_path_indexes",
- "applied_at": "2026-09-26 15:19:41",
+ "applied_at": "2026-09-27 19:07:37",
"mode": "applied",
"mode": "applied",
- "duration_ms": 1
+ "duration_ms": 0
}
}
]
]
},
},
@@ -289,6 +289,7 @@
@@ -289,6 +289,7 @@
"CREATE TABLE IF NOT EXISTS lineage_unresolved ( ref TEXT NOT NULL, reason TEXT NOT NULL, detail TEXT, last_caller TEXT, count INTEGER NOT NULL DEFAULT 1, first_at TEXT NOT NULL, last_at TEXT NOT NULL, PRIMARY KEY (ref, reason) )",
"CREATE TABLE IF NOT EXISTS lineage_unresolved ( ref TEXT NOT NULL, reason TEXT NOT NULL, detail TEXT, last_caller TEXT, count INTEGER NOT NULL DEFAULT 1, first_at TEXT NOT NULL, last_at TEXT NOT NULL, PRIMARY KEY (ref, reason) )",
"CREATE TABLE IF NOT EXISTS billing_actions ( id INTEGER PRIMARY KEY AUTOINCREMENT, action TEXT NOT NULL, idempotency_key TEXT NOT NULL UNIQUE, live_user_id INTEGER, live_ref TEXT, method TEXT NOT NULL, path TEXT NOT NULL, request_json TEXT NOT NULL, status TEXT NOT NULL DEFAULT 'pending', http_status INTEGER, billing_ref TEXT, response_json TEXT, error TEXT, attempts INTEGER NOT NULL DEFAULT 0, created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP )",
"CREATE TABLE IF NOT EXISTS billing_actions ( id INTEGER PRIMARY KEY AUTOINCREMENT, action TEXT NOT NULL, idempotency_key TEXT NOT NULL UNIQUE, live_user_id INTEGER, live_ref TEXT, method TEXT NOT NULL, path TEXT NOT NULL, request_json TEXT NOT NULL, status TEXT NOT NULL DEFAULT 'pending', http_status INTEGER, billing_ref TEXT, response_json TEXT, error TEXT, attempts INTEGER NOT NULL DEFAULT 0, created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP )",
"CREATE TABLE IF NOT EXISTS opencoin_admin_grants ( id INTEGER PRIMARY KEY AUTOINCREMENT, client_key TEXT UNIQUE, admin_id INTEGER, user_id INTEGER NOT NULL, amount INTEGER NOT NULL, reason TEXT, balance INTEGER, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )",
"CREATE TABLE IF NOT EXISTS opencoin_admin_grants ( id INTEGER PRIMARY KEY AUTOINCREMENT, client_key TEXT UNIQUE, admin_id INTEGER, user_id INTEGER NOT NULL, amount INTEGER NOT NULL, reason TEXT, balance INTEGER, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )",
+ "CREATE TABLE IF NOT EXISTS follow_projection_revisions ( follower_subject TEXT NOT NULL, target_subject TEXT NOT NULL, revision INTEGER NOT NULL, PRIMARY KEY (follower_subject, target_subject) )",
"CREATE TABLE IF NOT EXISTS tips_deliveries ( idempotency_key TEXT PRIMARY KEY, effect TEXT, state TEXT NOT NULL DEFAULT 'pending', response_json TEXT, claimed_at INTEGER NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )",
"CREATE TABLE IF NOT EXISTS tips_deliveries ( idempotency_key TEXT PRIMARY KEY, effect TEXT, state TEXT NOT NULL DEFAULT 'pending', response_json TEXT, claimed_at INTEGER NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP )",
"ALTER TABLE users ADD COLUMN theme_id INTEGER",
"ALTER TABLE users ADD COLUMN theme_id INTEGER",
"ALTER TABLE streams ADD COLUMN call_mode TEXT DEFAULT NULL"
"ALTER TABLE streams ADD COLUMN call_mode TEXT DEFAULT NULL"
@@ -311,7 +312,9 @@
@@ -311,7 +312,9 @@
"DELETE FROM chat_bridge_outbox",
"DELETE FROM chat_bridge_outbox",
"DELETE FROM chat_bridge_outbox WHERE id = ?",
"DELETE FROM chat_bridge_outbox WHERE id = ?",
"DELETE FROM chat_dual_read_stats WHERE tbl = ?",
"DELETE FROM chat_dual_read_stats WHERE tbl = ?",
+ "DELETE FROM clip_ai_state WHERE clip_id = ?",
"DELETE FROM coin_rewards WHERE id = ?",
"DELETE FROM coin_rewards WHERE id = ?",
+ "DELETE FROM content_views WHERE content_type = ? AND content_id = ?",
"DELETE FROM control_config_buttons WHERE id = ?",
"DELETE FROM control_config_buttons WHERE id = ?",
"DELETE FROM control_config_buttons WHERE id = ? AND config_id = ?",
"DELETE FROM control_config_buttons WHERE id = ? AND config_id = ?",
"DELETE FROM control_configs WHERE id = ?",
"DELETE FROM control_configs WHERE id = ?",
@@ -347,6 +350,7 @@
@@ -347,6 +350,7 @@
"DELETE FROM user_equipped WHERE user_id = ? AND slot = ?",
"DELETE FROM user_equipped WHERE user_id = ? AND slot = ?",
"DELETE FROM user_equipped WHERE user_id = ? AND slot = ? AND item_id = ?",
"DELETE FROM user_equipped WHERE user_id = ? AND slot = ? AND item_id = ?",
"DELETE FROM viewer_samples WHERE sampled_at < datetime('now', '-400 days')",
"DELETE FROM viewer_samples WHERE sampled_at < datetime('now', '-400 days')",
+ "DELETE FROM vod_ai_state WHERE vod_id = ?",
"INSERT INTO ai_chatbot_configs (user_id, enabled, base_url, api_token, model, transcribe_enabled, transcribe_model, num_bots, post_interval_seconds, persona, vision_enabled) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO ai_chatbot_configs (user_id, enabled, base_url, api_token, model, transcribe_enabled, transcribe_model, num_bots, post_interval_seconds, persona, vision_enabled) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO ai_timeline_cache (user_id, payload, generated_at) VALUES (?, ?, CURRENT_TIMESTAMP) ON CONFLICT(user_id) DO UPDATE SET payload = excluded.payload, generated_at = CURRENT_TIMESTAMP",
"INSERT INTO ai_timeline_cache (user_id, payload, generated_at) VALUES (?, ?, CURRENT_TIMESTAMP) ON CONFLICT(user_id) DO UPDATE SET payload = excluded.payload, generated_at = CURRENT_TIMESTAMP",
"INSERT INTO ai_usage (kind, model, input_tokens, output_tokens, cached_tokens, cost_usd, owner_user_id, source, role, provider, latency_ms) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO ai_usage (kind, model, input_tokens, output_tokens, cached_tokens, cost_usd, owner_user_id, source, role, provider, latency_ms) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
@@ -398,6 +402,7 @@
@@ -398,6 +402,7 @@
"INSERT INTO donation_goals (user_id, title, target_amount) VALUES (?, ?, ?)",
"INSERT INTO donation_goals (user_id, title, target_amount) VALUES (?, ?, ?)",
"INSERT INTO donation_goals (user_id, title, target_amount, image_url, media_type, sort_order) VALUES (?, ?, ?, ?, ?, ?)",
"INSERT INTO donation_goals (user_id, title, target_amount, image_url, media_type, sort_order) VALUES (?, ?, ?, ?, ?, ?)",
"INSERT INTO emotes (user_id, code, url, animated, width, height, is_global, channel_owner_id, size) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO emotes (user_id, code, url, animated, width, height, is_global, channel_owner_id, size) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
+ "INSERT INTO follow_projection_revisions (follower_subject, target_subject, revision) VALUES (?, ?, ?) ON CONFLICT (follower_subject, target_subject) DO UPDATE SET revision = excluded.revision",
"INSERT INTO ip_log (user_id, anon_id, ip_address, action, geo_country, geo_region, geo_city, geo_isp, geo_org, geo_ll, user_agent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO ip_log (user_id, anon_id, ip_address, action, geo_country, geo_region, geo_city, geo_isp, geo_org, geo_ll, user_agent) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
"INSERT INTO kick_channel_cache (slug, chatroom_id, kick_channel_id, updated_at) VALUES (?, ?, ?, CURRENT_TIMESTAMP) ON CONFLICT(slug) DO UPDATE SET chatroom_id = excluded.chatroom_id, kick_channel_id = COALESCE(excluded.kick_channel_id, kick_channel_cache.kick_channel_id), updated_at = CURRENT_TIMESTAMP",
"INSERT INTO kick_channel_cache (slug, chatroom_id, kick_channel_id, updated_at) VALUES (?, ?, ?, CURRENT_TIMESTAMP) ON CONFLICT(slug) DO UPDATE SET chatroom_id = excluded.chatroom_id, kick_channel_id = COALESCE(excluded.kick_channel_id, kick_channel_cache.kick_channel_id), updated_at = CURRENT_TIMESTAMP",
"INSERT INTO lineage_unresolved (ref, reason, detail, last_caller, count, first_at, last_at) VALUES (?, ?, ?, ?, 1, ?, ?) ON CONFLICT (ref, reason) DO UPDATE SET detail = excluded.detail, last_caller = excluded.last_caller, count = count + 1, last_at = excluded.last_at",
"INSERT INTO lineage_unresolved (ref, reason, detail, last_caller, count, first_at, last_at) VALUES (?, ?, ?, ?, 1, ?, ?) ON CONFLICT (ref, reason) DO UPDATE SET detail = excluded.detail, last_caller = excluded.last_caller, count = count + 1, last_at = excluded.last_at",
@@ -787,10 +792,10 @@
@@ -787,10 +792,10 @@
"SELECT COUNT(*) as c FROM users WHERE role = 'mod'",
"SELECT COUNT(*) as c FROM users WHERE role = 'mod'",
"SELECT COUNT(*) as c FROM users WHERE role IN ('streamer', 'admin')",
"SELECT COUNT(*) as c FROM users WHERE role IN ('streamer', 'admin')",
"SELECT COUNT(*) as c FROM users WHERE username LIKE ? OR display_name LIKE ?",
"SELECT COUNT(*) as c FROM users WHERE username LIKE ? OR display_name LIKE ?",
- "SELECT COUNT(*) as cnt FROM chat_messages WHERE is_global = 1 AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",
+ "SELECT COUNT(*) as cnt FROM chat_messages WHERE is_global = 1 AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0",
"SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND is_deleted = 0 AND is_global = 0 AND message_type = 'chat'",
"SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND is_deleted = 0 AND is_global = 0 AND message_type = 'chat'",
"SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= ? AND is_deleted = 0 AND is_global = 0 AND message_type = 'chat'",
"SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= ? AND is_deleted = 0 AND is_global = 0 AND message_type = 'chat'",
- "SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",
+ "SELECT COUNT(*) as cnt FROM chat_messages WHERE stream_id = ? AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0",
"SELECT COUNT(*) as cnt FROM follows WHERE streamer_id = ?",
"SELECT COUNT(*) as cnt FROM follows WHERE streamer_id = ?",
"SELECT COUNT(*) as cnt FROM follows WHERE streamer_id = ? AND created_at >= ? AND created_at <= ?",
"SELECT COUNT(*) as cnt FROM follows WHERE streamer_id = ? AND created_at >= ? AND created_at <= ?",
"SELECT COUNT(*) as cnt FROM streams WHERE user_id = ? AND duration_seconds > 0",
"SELECT COUNT(*) as cnt FROM streams WHERE user_id = ? AND duration_seconds > 0",
@@ -994,6 +999,7 @@
@@ -994,6 +999,7 @@
"SELECT r.stream_id, r.user_id, r.json, r.created_at FROM stream_recaps r JOIN users u ON u.id = r.user_id WHERE r.ai = 1 AND COALESCE(u.is_banned, 0) = 0 ORDER BY r.created_at DESC, r.stream_id DESC LIMIT ? OFFSET ?",
"SELECT r.stream_id, r.user_id, r.json, r.created_at FROM stream_recaps r JOIN users u ON u.id = r.user_id WHERE r.ai = 1 AND COALESCE(u.is_banned, 0) = 0 ORDER BY r.created_at DESC, r.stream_id DESC LIMIT ? OFFSET ?",
"SELECT reason, COUNT(*) AS refs, SUM(count) AS answers FROM lineage_unresolved GROUP BY reason",
"SELECT reason, COUNT(*) AS refs, SUM(count) AS answers FROM lineage_unresolved GROUP BY reason",
"SELECT recorded_at AS t, viewer_count AS v, COALESCE(chat_messages_5m, 0) AS c FROM viewer_snapshots WHERE stream_id = ? ORDER BY recorded_at ASC",
"SELECT recorded_at AS t, viewer_count AS v, COALESCE(chat_messages_5m, 0) AS c FROM viewer_snapshots WHERE stream_id = ? ORDER BY recorded_at ASC",
+ "SELECT revision FROM follow_projection_revisions WHERE follower_subject = ? AND target_subject = ?",
"SELECT revision FROM subject_projection WHERE subject_id = ?",
"SELECT revision FROM subject_projection WHERE subject_id = ?",
"SELECT rowid AS id, * FROM relay_users WHERE platform = ? AND username = ?",
"SELECT rowid AS id, * FROM relay_users WHERE platform = ? AND username = ?",
"SELECT rowid AS id, * FROM relay_users WHERE rowid = ?",
"SELECT rowid AS id, * FROM relay_users WHERE rowid = ?",
@@ -1039,6 +1045,7 @@
@@ -1039,6 +1045,7 @@
"SELECT started_at, is_live FROM streams WHERE id = ?",
"SELECT started_at, is_live FROM streams WHERE id = ?",
"SELECT status, COUNT(*) AS n FROM billing_actions GROUP BY status",
"SELECT status, COUNT(*) AS n FROM billing_actions GROUP BY status",
"SELECT stream_id, json, ai, created_at FROM stream_recaps WHERE user_id = ? ORDER BY created_at DESC LIMIT ?",
"SELECT stream_id, json, ai, created_at FROM stream_recaps WHERE user_id = ? ORDER BY created_at DESC LIMIT ?",
+ "SELECT stream_id, new_followers, clips_created, coins_earned FROM stream_analytics WHERE stream_id = ?",
"SELECT streamer_id FROM follows WHERE follower_id = ?",
"SELECT streamer_id FROM follows WHERE follower_id = ?",
"SELECT strftime('%s', sampled_at) AS t, viewers, live_streams FROM viewer_samples WHERE sampled_at >= datetime('now', ?) ORDER BY sampled_at ASC",
"SELECT strftime('%s', sampled_at) AS t, viewers, live_streams FROM viewer_samples WHERE sampled_at >= datetime('now', ?) ORDER BY sampled_at ASC",
"SELECT subject_id FROM linked_accounts WHERE service = 'network' AND user_id = ?",
"SELECT subject_id FROM linked_accounts WHERE service = 'network' AND user_id = ?",
@@ -1145,8 +1152,8 @@
@@ -1145,8 +1152,8 @@
"UPDATE chat_dual_read_stats SET last_mismatch_at = CURRENT_TIMESTAMP, last_mismatch = ? WHERE tbl = ?",
"UPDATE chat_dual_read_stats SET last_mismatch_at = CURRENT_TIMESTAMP, last_mismatch = ? WHERE tbl = ?",
"UPDATE chat_messages SET channel_user_id = (SELECT s.user_id FROM streams s WHERE s.id = chat_messages.stream_id) WHERE stream_id IS NOT NULL AND channel_user_id IS NULL",
"UPDATE chat_messages SET channel_user_id = (SELECT s.user_id FROM streams s WHERE s.id = chat_messages.stream_id) WHERE stream_id IS NOT NULL AND channel_user_id IS NULL",
"UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE id = ?",
"UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE id = ?",
- "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE is_global = 1 AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",
- "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE stream_id = ? AND timestamp >= ? AND timestamp <= ? AND is_deleted = 0",
+ "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE is_global = 1 AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0",
+ "UPDATE chat_messages SET is_deleted = 1, deleted_by = ?, deleted_at = CURRENT_TIMESTAMP WHERE stream_id = ? AND timestamp >= datetime(?) AND timestamp <= datetime(?) AND is_deleted = 0",
"UPDATE chat_messages SET message = ?, metadata = ? WHERE id = ?",
"UPDATE chat_messages SET message = ?, metadata = ? WHERE id = ?",
"UPDATE chat_messages SET metadata = ? WHERE id = ?",
"UPDATE chat_messages SET metadata = ? WHERE id = ?",
"UPDATE clip_ai_state SET ai_overview = ?, ai_overview_short = ?, ai_transcript_json = COALESCE(?, ai_transcript_json) WHERE clip_id = ?",
"UPDATE clip_ai_state SET ai_overview = ?, ai_overview_short = ?, ai_transcript_json = COALESCE(?, ai_transcript_json) WHERE clip_id = ?",