不要怂,就是干,撸起袖子干!

Commit 9521a353 by Fabio Espinosa Committed by Sushant

docs: add name to FK constraint (#8080)

1 parent de7dc971
Showing with 1 additions and 0 deletions
...@@ -359,6 +359,7 @@ queryInterface.addConstraint('Users', ['username'], { ...@@ -359,6 +359,7 @@ queryInterface.addConstraint('Users', ['username'], {
//Foreign Key //Foreign Key
queryInterface.addConstraint('Posts', ['username'], { queryInterface.addConstraint('Posts', ['username'], {
type: 'FOREIGN KEY', type: 'FOREIGN KEY',
name: 'custom_fkey_constraint_name',
references: { //Required field references: { //Required field
table: 'target_table_name', table: 'target_table_name',
field: 'target_column_name' field: 'target_column_name'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!