drizzle-team / drizzle-team/drizzle-orm

[DOCS]: add way to change the relationship name that shows up inside drizzle studio.

Open
#4,143 2 comments 0 reactions 1 assignee Claimed by @RomanNabukhotnyi View on GitHub
docs drizzle/studio
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Enhancement hasn't been filed before.

- [x] I have verified this enhancement I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

![Image](https://github.com/user-attachments/assets/ab5fd7b7-7096-4cad-95c3-b8ccf0f4cdd0)

How do I change the `id_tournaments_game_id` to be a custom name like "tournaments"

```js
export const tournaments_table = sqliteTable("tournaments", {
id: text().primaryKey(),
game_id: integer("game_id").references(() => games_table.id),
// ...
});

export const games_table = sqliteTable("games", {
id: integer({ mode: "number" }).primaryKey({ autoIncrement: true }),
// ...
});
```
this is a basic schema and relationship and I get that weird name on drizzle studio. Sadly the docs doesn't make it clear how to change it, or it probably doesn't exists at all.

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.