From 6d341aa6a2198d6ab033f7ef01bec89a45971106 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Thu, 7 Aug 2025 12:24:16 +0100 Subject: [PATCH] appview/db: fix issues with collaborators table - CollaboratingIn was not producing reverse mappings - collaborators.created was never set Signed-off-by: oppiliappan --- appview/db/collaborators.go | 2 +- appview/db/db.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appview/db/collaborators.go b/appview/db/collaborators.go index 5d7621be..cf3b2ceb 100644 --- a/appview/db/collaborators.go +++ b/appview/db/collaborators.go @@ -50,7 +50,7 @@ func DeleteCollaborator(e Execer, filters ...filter) error { } func CollaboratingIn(e Execer, collaborator string) ([]Repo, error) { - rows, err := e.Query(`select repo_at from collaborators where did = ?`, collaborator) + rows, err := e.Query(`select repo_at from collaborators where subject_did = ?`, collaborator) if err != nil { return nil, err } diff --git a/appview/db/db.go b/appview/db/db.go index 3ee1f798..a444375f 100644 --- a/appview/db/db.go +++ b/appview/db/db.go @@ -603,7 +603,7 @@ func Make(dbPath string) (*DB, error) { repo_at text not null, -- meta - created text default (strftime('%y-%m-%dt%h:%m:%sz', 'now')), + created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')), -- constraints foreign key (repo_at) references repos(at_uri) on delete cascade -- 2.51.2