Skip to content

Instantly share code, notes, and snippets.

View arimendelow's full-sized avatar
🎯
Focusing

Ari Mendelow arimendelow

🎯
Focusing
View GitHub Profile
@arimendelow
arimendelow / psql-to-d1.sh
Last active June 7, 2025 22:06
Script for migrating an app using Prisma from Postgres database to D1 (for Redwood GraphQL-> Redwood SDK)
#!/bin/bash
# This script migrates a PostgreSQL database to a Cloudflare D1 database.
# Put this script in the ./scripts directory of your project.
# To run it, CD into the ./scripts directory and run:
# ./psql-to-d1.sh
# If the file is not executable, you can make it executable with:
# chmod +x psql-to-d1.sh
# Define your D1_DATABASE_NAME and POSTGRES_CONN_STRING environment variables in a .env.scripts file.