Skip to content

Drizzle SQLite Generator is broken #249

@mastorm

Description

@mastorm

Which project does this relate to?

Start

Describe the bug

Drizzle-kit migrations failed because DATABASE_URL was undefined.

Workaround/Likely Cause:
The generator generates the env file as ".env.local", then uses dotenv's config() to load it. Dotenv doesnt load .env.local by default, though. Renaming .env.local to .env makes it work.

Your Example Website or App

it is not really a runtime issue but rather a project bootstrapping issue

Steps to Reproduce the Bug or Issue

  1. Generate a new Tanstack app (with pnpm)
  2. Pick drizzle with sqlite in the add-ons
  3. Ran migrations/tried to start the app

Expected behavior

In .env.local the sqlite file was called "dev.db", so after running drizzle-kit migrate, this file should exist and have migrations applied.

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.131.0]
  • OS: macOS
  • Browser: Brave
  • Browser Version: doesnt apply
  • Bundler: Vite
  • Bundler Version: latest

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions