Skip to content

[BUG]: Type '"postgresql"' is not assignable to type '"d1-http"' #4410

Open
@saurabh106

Description

@saurabh106

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

v0.41.0

What version of drizzle-kit are you using?

v0.30.6

Other packages

No response

Describe the Bug

import type { Config } from 'drizzle-kit';
import * as dotenv from 'dotenv';

// Load environment variables from .env
dotenv.config({ path: '.env' });

const DATABASE_URL = process.env.DATABASE_URL;

if (!DATABASE_URL) {
console.error('❌ DATABASE_URL is missing from .env');
process.exit(1);
}

export default {
schema: [
'./src/lib/supabase/schema.ts', // Main schema file
'./migrations/schema.ts', // Extra schema tables if needed
],
out: './migrations', // Output directory for migrations
driver: 'postgresql', // ✅ Correct driver for PostgreSQL
dbCredentials: {
connectionString: DATABASE_URL, // ✅ Use connectionString, not url
},
} satisfies Config;

• Showing error in driver and connectionString

Driver -> Type '"postgresql"' is not assignable to type '"d1-http"'
connectionString -> Object literal may only specify known properties, and 'connectionString' does not exist in type '{ accountId: string; databaseId: string; token: string; }'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions