drizzle-team / drizzle-team/drizzle-orm

[BUG]: drizzle-kit pull fails on sqlite / D1 views

Open
#5,810 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

0.45.1

### What version of `drizzle-kit` are you using?

0.31.8

### Other packages

_No response_

### Describe the Bug

## Context

###### Project Architecture:
TS/Node + Vite + React + CloudFlare/Wrangler + CloudFlare / D1 Database + Drizzle ORM

#### Dependencies

"cloudflare": "^5.2.0"

#### Dev Dependencies

"vite": "^7.3.1",
"vitest": "~3.2.4",
"wrangler": "^4.62.0"

## Bug
#### Expected Behaviour

In CloudFlare/D1 Project with 2 views

`drizzle-kit pull`

1. Allows selection of "local" or "remote" database instance
2. Generates Drizzle schema from local D1 Database
3. Output provides sufficient logs to debug any issues

#### Actual Behaviour

I got the following output on my project:

```
% DEBUG=drizzle-kit:* pnpm drizzle-kit pull
No config path provided, using default 'drizzle.config.ts'
Reading config file '//drizzle.config.ts'
◇ injected env (2) from .dev.vars // tip: ⌘ enable debugging { debug: true }
Pulling from ['public'] list of schemas

[✓] 16 tables fetched
[✓] 109 columns fetched
[✓] 33 indexes fetched
[✓] 20 foreign keys fetched
[⡿] 0 policies fetching
[⡿] 0 check constraints fetching
[⡿] 2 views fetching
Could not process view
```

Coverage of this issue is spotty online, making it difficult to identitfy the appropriate workaround.
I'm opening this ticket to begin the dialogue.

If the issue has been solved elsewhere, please provide EXPLICIT links to sucessfully resolved discussions.
If the solution is documented, please provide link(s) to explicit documentation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.