You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up #488, it would be nice to have a column in the SchemaBuilding functions that references a column. The example proposed is that when you create a table with createTable that has columns referencing other tables, you need to be careful in the order you create your table to not receive error: relation "x" does not exist.
(Sometimes when two tables reference mutually it's impossible to do it this way, and you need to create your tables first and then do the wiring.)
With the current API the only way to do this is to create your columns after the table is created.
Following up #488, it would be nice to have a
column
in theSchemaBuilding
functions that references a column. The example proposed is that when you create a table withcreateTable
that has columns referencing other tables, you need to be careful in the order you create your table to not receiveerror: relation "x" does not exist
.(Sometimes when two tables reference mutually it's impossible to do it this way, and you need to create your tables first and then do the wiring.)
With the current API the only way to do this is to create your columns after the table is created.
When a more elegant solution would be to create your columns at the table creation time and then just do the wiring
What do you think? I might do a PR for this.
The text was updated successfully, but these errors were encountered: