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
For foreign keys there are a number of options a foreign key may have, but from a definition standpoint adding the foreign key to the column definition make the most sense as each column may only reference a single foreign column.
What I propose is the following:
{username: {type: DataTypes.STRING,unique: "some-arbitrary-key",},session: {type: DataTypes.STRING,foreignKey: {table: "session-table",// example like Model.tableNamecolumn: "session-table-field-name",// example like Model.columnNameonDelete?: {cascade?: boolean,restrict?: boolean,setNull?: boolean,setDefault?: boolean,},onUpdate?: {cascade?: boolean,restrict?: boolean,setNull?: boolean,setDefault?: boolean,},},},}
I think this approach is fairly straight-forward and easy to follow.
Thoughts?
The text was updated successfully, but these errors were encountered:
Adding on to #53 ...
For foreign keys there are a number of options a foreign key may have, but from a definition standpoint adding the foreign key to the column definition make the most sense as each column may only reference a single foreign column.
What I propose is the following:
I think this approach is fairly straight-forward and easy to follow.
Thoughts?
The text was updated successfully, but these errors were encountered: