From df1da0905d09368533033d8c3fe650c83f78764c Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Tue, 17 Jun 2025 13:55:30 -0700 Subject: [PATCH] Db, add atproto error support --- db/migrations/20250612223204_initial_schema.sql | 6 +++--- db/src/error.rs | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/db/migrations/20250612223204_initial_schema.sql b/db/migrations/20250612223204_initial_schema.sql index f52b19b..b95abd4 100644 --- a/db/migrations/20250612223204_initial_schema.sql +++ b/db/migrations/20250612223204_initial_schema.sql @@ -19,7 +19,7 @@ CREATE TABLE session ( label VARCHAR, -- Participants in participant - created_at VARCHAR NOT NULL, + created_at VARCHAR, indexed_at VARCHAR NOT NULL, sort_at VARCHAR GENERATED ALWAYS AS (LEAST(created_at,indexed_at)) STORED NOT NULL ); @@ -33,13 +33,13 @@ CREATE TABLE activity ( -- Progress in progress performed_at VARCHAR, - created_at VARCHAR NOT NULL, + created_at VARCHAR, indexed_at VARCHAR NOT NULL, sort_at VARCHAR GENERATED ALWAYS AS (LEAST(created_at,indexed_at)) STORED NOT NULL ); CREATE TABLE participant ( participantdid VARCHAR NOT NULL, - session VARCHAR NOT NULL, + sessionuri VARCHAR NOT NULL, role VARCHAR NOT NULL ); diff --git a/db/src/error.rs b/db/src/error.rs index ed1b585..1c330bc 100644 --- a/db/src/error.rs +++ b/db/src/error.rs @@ -3,6 +3,8 @@ pub enum Error { #[error("Database Implementation Error: {0}")] Backend(#[from] sqlx::Error), + #[error("AT Protocol Implementation Error: {0}")] + Atproto(#[from] atproto::error::Error), } pub type Result = std::result::Result;