Connect a database

Connect a database

A source is a production database anybranch keeps a live replica of. Run preflight, then clone/sync. Both are branched the same way.

Two ways to make a root

Preflight first

Preflight is read-only. It prints a pass / warn / fail checklist and, when grants are the problem, a ready-to-run grant script. It creates nothing and stores no credentials. sync runs the same checks and refuses on any failure.

Replica identity

Logical replication needs a way to identify rows for UPDATE and DELETE. Tables without a PRIMARY KEY are skipped, and the exact ALTER TABLE … REPLICA IDENTITY FULL to include them is printed. Pass --fix-replica-identity to apply those on the source for you.

Engines

EngineSync mechanismSchema changes
Postgreslogical replicationevent-trigger replay, or reconcile
MySQLGTID replicationnative (binlog)
MongoDBdump + change streamsindexes, collections, collMod
SQLiten/a (file import)n/a

Hosted guides: AWS RDS · Supabase.