search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: remove nonexistent created_at from publications sync

Turso publications table doesn't have created_at column.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

zzstoatzz 50f2ae40 f51c2511

+6 -8
+2 -3
backend/src/db/LocalDb.zig
··· 93 93 return err; 94 94 }; 95 95 96 - // publications table 96 + // publications table (no created_at - matches Turso schema) 97 97 c.exec( 98 98 \\CREATE TABLE IF NOT EXISTS publications ( 99 99 \\ uri TEXT PRIMARY KEY, ··· 103 103 \\ description TEXT, 104 104 \\ base_path TEXT, 105 105 \\ platform TEXT DEFAULT 'leaflet', 106 - \\ source_collection TEXT, 107 - \\ created_at TEXT 106 + \\ source_collection TEXT 108 107 \\) 109 108 , .{}) catch |err| { 110 109 std.debug.print("local db: failed to create publications table: {}\n", .{err});
+4 -5
backend/src/db/sync.zig
··· 72 72 var pub_count: usize = 0; 73 73 { 74 74 var pub_result = turso.query( 75 - "SELECT uri, did, rkey, name, description, base_path, platform, created_at FROM publications", 75 + "SELECT uri, did, rkey, name, description, base_path, platform FROM publications", 76 76 &.{}, 77 77 ) catch |err| { 78 78 std.debug.print("sync: turso publications query failed: {}\n", .{err}); ··· 256 256 } 257 257 258 258 fn insertPublicationLocal(conn: zqlite.Conn, row: anytype) !void { 259 - // insert into main table 259 + // insert into main table (no created_at - Turso publications table doesn't have it) 260 260 conn.exec( 261 261 \\INSERT OR REPLACE INTO publications 262 - \\(uri, did, rkey, name, description, base_path, platform, created_at) 263 - \\VALUES (?, ?, ?, ?, ?, ?, ?, ?) 262 + \\(uri, did, rkey, name, description, base_path, platform) 263 + \\VALUES (?, ?, ?, ?, ?, ?, ?) 264 264 , .{ 265 265 row.text(0), // uri 266 266 row.text(1), // did ··· 269 269 row.text(4), // description 270 270 row.text(5), // base_path 271 271 row.text(6), // platform 272 - row.text(7), // created_at 273 272 }) catch |err| { 274 273 return err; 275 274 };