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
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -583,7 +583,14 @@ type, you can:
583
583
Foreign key constraints can be defined in the model definition.
584
584
585
585
**Note**: The order of table creation is important. A referenced table must
586
-
exist before creating a foreign key constraint.
586
+
exist before creating a foreign key constraint. The order can be specified
587
+
using the optional <a href="https://loopback.io/doc/en/lb4/apidocs.repository.schemamigrationoptions.html">`SchemaMigrationOptions`</a> argument of `migrateSchema`:
588
+
589
+
```
590
+
awaitapp.migrateSchema({
591
+
models: [ 'Customer', 'Order' ]
592
+
});
593
+
```
587
594
588
595
Define your models and the foreign key constraints as follows:
0 commit comments