diff --git a/README.md b/README.md index d7f36ae..ede7d60 100644 --- a/README.md +++ b/README.md @@ -583,7 +583,14 @@ type, you can: Foreign key constraints can be defined in the model definition. **Note**: The order of table creation is important. A referenced table must -exist before creating a foreign key constraint. +exist before creating a foreign key constraint. The order can be specified +using the optional `SchemaMigrationOptions` argument of `migrateSchema`: + +``` +await app.migrateSchema({ + models: [ 'Customer', 'Order' ] +}); +``` Define your models and the foreign key constraints as follows: