Follow-up to #1497 (PostgreSQL sink backend, added in #1532).
The postgres sink bootstraps an empty schema but provides no path to move existing data from the fs or mongo backends.
Decision needed first
users._id and repos._id are UUID columns (gen_random_uuid()), but mongo _ids are 24-char ObjectId hex strings, which are not valid UUIDs. The migration must either:
- regenerate IDs on import (repos are looked up by URL, users by username, and pushes reference repos by URL, so this is mostly safe — but
/repo/:id links would change), or
- change those columns to
TEXT to preserve the originals.
Scope
A documented, scripted migration (fs / mongo → postgres). The adapter's idempotent upserts (writeAudit, createRepo, createUser / updateUser) can be reused by the importer.
Follow-up to #1497 (PostgreSQL sink backend, added in #1532).
The postgres sink bootstraps an empty schema but provides no path to move existing data from the
fsormongobackends.Decision needed first
users._idandrepos._idareUUIDcolumns (gen_random_uuid()), but mongo_ids are 24-char ObjectId hex strings, which are not valid UUIDs. The migration must either:/repo/:idlinks would change), orTEXTto preserve the originals.Scope
A documented, scripted migration (
fs/mongo→postgres). The adapter's idempotent upserts (writeAudit,createRepo,createUser/updateUser) can be reused by the importer.