Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null in sql_table constraint #1655

Closed
landmaj opened this issue Oct 11, 2023 · 0 comments
Closed

Null in sql_table constraint #1655

landmaj opened this issue Oct 11, 2023 · 0 comments
Labels
bug Something isn't working compiler good first issue Good for newcomers

Comments

@landmaj
Copy link
Contributor

landmaj commented Oct 11, 2023

When null is used in a list of sql_table constraints, it causes an invisible constraint in the rendered diagram.

table: {
  shape: sql_table
  invisible: {constraint: [foreign_key; null; next]}
  ok: {constraint: null}
}

It seems like null is never rendered, which is fine, you can double quote it to get the expected result. However, when used in a list of constraints, it results in an "invisible" constraint.

d2

The documentation is also missing any mention of this behaviour (requiring double quotes around null).

@cyborg-ts cyborg-ts added this to D2 Oct 11, 2023
@alixander alixander added good first issue Good for newcomers compiler bug Something isn't working labels Oct 11, 2023
@github-project-automation github-project-automation bot moved this to Done in D2 Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

2 participants