holistics / holistics/dbml

problem with ref & sql generation

Open
#542 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
3.7k
Forks
233
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Hi team, I found some issues:

## 1. sql generation:
the following markup
```dbml
ref: remfo.cards.user_id - auth.users.id
```
generates following sql:
```sql
ALTER TABLE "auth"."users" ADD FOREIGN KEY ("id") REFERENCES "remfo"."cards" ("user_id");
```
This is confusing.
I feel the table we are altering should come first as it will resemble the sql query more.

## 2. dbdiagram should show an arrow
for syntax:
```dbml
ref: remfo.cards.user_id - auth.users.id
```

I find following more informative:
image

than:
image
(look at the arrow)

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.