drizzle-team / drizzle-team/drizzle-orm

[BUG]: Multiple variables with the same name generated after running the introspect command

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

Description

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

0.34.1

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

0.25.0

### Describe the Bug

I'm encountering an error while generating the `drizzle/schema.ts` file with Drizzle Kit. The error seems to stem from multiple definitions of the name `role`, which is preventing the compilation.

**Observe the compilation error:**
![2024-10-10_16-20](https://github.com/user-attachments/assets/7965ebef-34f4-49fd-b46e-2d7ef100320c)

![2024-10-10_16-21](https://github.com/user-attachments/assets/5966198d-d9c9-4875-b79f-0da314e71ff1)

![2024-10-10_16-22](https://github.com/user-attachments/assets/0e447440-517a-43de-8161-833e375ae202)

Run the following command: `bun with-env bun x drizzle-kit introspect --config=drizzle/config.ts`

### Expected behavior

It must not generate variables with the same names in the global context because NO !

### Environment & setup

_No response_

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.