DB: Referencing to own table column #10792
Closed
wpinfusion
started this conversation in
Ideas
Replies: 1 comment
-
|
We're closing stale and outdated discussion to keep only the discussions still relevant to the current project version and/or the current docs state. I haven't follow everything that happened to If you think this is a mistake and that this discussion should remain open, please feel free to ping me, I'll take a second look at it. Thank your for your contribution! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Creating a table where one column referenced to another column is possible, but it generates type errors in your IDE.
For example:
The use-case here is to allow parent/child relationships in
posts(for example).The solution (by Fryuni) is to import the type:
And then use that in the table schema:
Beta Was this translation helpful? Give feedback.
All reactions