Migrating from Turso (libsql) to self hosted PostgreSQL 16 & connecting from Cloudflare Worker (Nov 2024)
Steps I took
Rewrite drizzle schema from sqlite to PostgreSQL and generate migration (*.sql) files.
Setup connection using Neon WebSocket proxy and test migration and code.
Attempt various ways to copy and settle on COPY via CSV type using stdout ...
lukasnotes.dk9 min read