Draft
Implement dual SQLite/Supabase backend with runtime flag#7
Conversation
Agent-Logs-Url: https://github.com/TemporalResearch/social2000/sessions/f068f537-ba74-412f-9cda-baad3148531b Co-authored-by: lyncmi07 <8515907+lyncmi07@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
lyncmi07
March 28, 2026 19:59
View session
… runtime flag Agent-Logs-Url: https://github.com/TemporalResearch/social2000/sessions/aa9dcae8-bcc4-4f30-9d16-c55256bab5b2 Co-authored-by: lyncmi07 <8515907+lyncmi07@users.noreply.github.com>
Member
|
@copilot complete the plan |
…her, make all callers async Agent-Logs-Url: https://github.com/TemporalResearch/social2000/sessions/0b9ee56d-8d53-493b-95c9-396636ed0d87 Co-authored-by: lyncmi07 <8515907+lyncmi07@users.noreply.github.com>
…nd .env.example Agent-Logs-Url: https://github.com/TemporalResearch/social2000/sessions/0b9ee56d-8d53-493b-95c9-396636ed0d87 Co-authored-by: lyncmi07 <8515907+lyncmi07@users.noreply.github.com>
…olean conversion docs Agent-Logs-Url: https://github.com/TemporalResearch/social2000/sessions/0b9ee56d-8d53-493b-95c9-396636ed0d87 Co-authored-by: lyncmi07 <8515907+lyncmi07@users.noreply.github.com>
Author
Done in cbe6ea1. All 10 plan steps implemented:
All 182 existing tests pass unchanged against the SQLite backend. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
Add Supabase migration plan
Implement dual SQLite/Supabase backend with runtime flag
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the dual-backend database architecture outlined in the migration plan. The site can run using either SQLite or Supabase (PostgreSQL) based on the
DB_BACKENDenvironment variable, defaulting tosqliteso existing tests and local development are unchanged.Architecture
db_interface.ts— TypeScript interface declaring all 43 database functions as asyncdb_sqlite.ts— SQLite implementation extracted from originaldb.ts, wrapped in asyncdb_supabase.ts— Supabase implementation using@supabase/supabase-jswith query builder, foreign key joins, and RPC calls for atomic operationsdb.ts— Thin runtime dispatcher that selects the backend based onDB_BACKENDenv var and re-exports all functionsChanges
index.ts,routes/auth.ts,routes/websites.ts,routes/git_websites.ts,routes/friends.ts,routes/messages.ts) updated toawaitall DB callssupabase/migrations/001_initial.sql) with 10 tables,citextcolumns, and indexessupabase/migrations/002_rpc_functions.sql) for atomic operations:accept_friend_request,remove_friend,set_website_tags,get_unread_counts,get_all_tags_with_counts@supabase/supabase-jsdependency.env.exampledocumentingDB_BACKEND,DB_PATH,SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEYplans/supabase_migration.mdwith all steps marked as completedTesting
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.