Option to create many-to-many relations from imported SQL

When importing the following SQL:

CREATE TABLE "clients" (
  "id" UUID DEFAULT gen_random_uuid () NOT NULL PRIMARY KEY,
  "name" TEXT NOT NULL
)
CREATE TABLE "users" (
  "id" UUID DEFAULT gen_random_uuid () NOT NULL PRIMARY KEY,
  "email" varchar(254) NOT NULL UNIQUE
)
CREATE TABLE "users_clients" (
  "user_id" UUID NOT NULL,
  "client_id" UUID NOT NULL,
  CONSTRAINT "fk_users_clients_user_id" FOREIGN KEY ("user_id") REFERENCES "users" ("id"),
  CONSTRAINT "fk_users_clients_client_id" FOREIGN KEY ("client_id") REFERENCES "clients" ("id")
)

The following DBML is generated:

Table "clients" {
  "id" UUID [pk, not null, default: `gen_random_uuid()`]
  "name" TEXT [not null]
}

Table "users" {
  "id" UUID [pk, not null, default: `gen_random_uuid()`]
  "email" varchar(254) [unique, not null]
}

Table "users_clients" {
  "user_id" UUID [not null]
  "client_id" UUID [not null]
}

Ref "fk_users_clients_user_id":"users"."id" < "users_clients"."user_id"

Ref "fk_users_clients_client_id":"clients"."id" < "users_clients"."client_id"

Since many-to-many relations are supported, despite of the fact that I’ll loose the naming of the constraints, I would like the system to generate the following DBML:

Table "clients" {
  "id" UUID [pk, not null, default: `gen_random_uuid()`]
  "name" TEXT [not null]
}

Table "users" {
  "id" UUID [pk, not null, default: `gen_random_uuid()`]
  "email" varchar(254) [unique, not null]
}

Ref "users_clients": "users"."id" <> "clients"."id"

Since not everyone might like this change, it would be good to have it as an option in the SQL-importer.

Hi @Simon_Schick ,

Thank you for your suggestion.

This feature would certainly be helpful for many users. We have noted this down to discuss and we will notify you when we consider implementing this feature in the future.