Poggerssss
Poggerssss
Explore posts from servers
DTDrizzle Team
Created by Poggerssss on 4/9/2025 in #help
drizzle kit CI Github action
Hey guys, I am trying to automate migrations: I got this Github Action:
migrate:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set DATABASE_URL from secret
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
echo "DATABASE_URL is $DATABASE_URL"

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Run Drizzle Migrations
run: |
pnpm db:migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
migrate:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set DATABASE_URL from secret
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
echo "DATABASE_URL is $DATABASE_URL"

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Run Drizzle Migrations
run: |
pnpm db:migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
drizzle tells me: No config path provided, using default 'drizzle.config.ts' Reading config file '/home/runner/work/code/code/packages/database/drizzle.config.ts' Error Please provide required params for Postgres driver: [x] url: '' obviously, the secret is provided. I am working in a monorepo. what could be the problem?
1 replies
DTDrizzle Team
Created by Poggerssss on 4/6/2025 in #help
drizzle kit CI Github action
Hey guys, I am trying to automate migrations: I got this Github Action:
migrate:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set DATABASE_URL from secret
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
echo "DATABASE_URL is $DATABASE_URL"

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Run Drizzle Migrations
run: |
pnpm db:migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
migrate:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set DATABASE_URL from secret
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
echo "DATABASE_URL is $DATABASE_URL"

- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Run Drizzle Migrations
run: |
pnpm db:migrate
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
drizzle tells me: No config path provided, using default 'drizzle.config.ts' Reading config file '/home/runner/work/code/code/packages/database/drizzle.config.ts' Error Please provide required params for Postgres driver: [x] url: '' obviously, the secret is provided. I am working in a monorepo. what could be the problem?
1 replies
PPrisma
Created by Poggerssss on 10/10/2024 in #help-and-questions
prisma neon adapter
hey, is that the right way to implement the prisma neon adapter?
import { PrismaClient } from "@prisma/client";
import { PrismaNeon } from "@prisma/adapter-neon";
import { Pool } from "@neondatabase/serverless";

declare global {
var prisma: PrismaClient | undefined;
}

const connectionString = `${process.env.DATABASE_URL}`;

const pool = new Pool({ connectionString })
const adapter = new PrismaNeon(pool);

export const db = globalThis.prisma || new PrismaClient({ adapter });

if (process.env.NODE_ENV !== "production") globalThis.prisma = db;
import { PrismaClient } from "@prisma/client";
import { PrismaNeon } from "@prisma/adapter-neon";
import { Pool } from "@neondatabase/serverless";

declare global {
var prisma: PrismaClient | undefined;
}

const connectionString = `${process.env.DATABASE_URL}`;

const pool = new Pool({ connectionString })
const adapter = new PrismaNeon(pool);

export const db = globalThis.prisma || new PrismaClient({ adapter });

if (process.env.NODE_ENV !== "production") globalThis.prisma = db;
13 replies