Problem is at the time of migration my child tables created at first and it could not find parents table and not able to assign the foreign key of parent table primary key and i get the error as below.
here warehouses is children and the companies is parent
at Runner. (/Volumes/DATA/paras/adonis-js/smart-helmet-backend/smarthelmet/node_modules/knex/lib/runner.js:213:19) code: 'ER_FK_CANNOT_OPEN_PARENT', errno: 1824, sqlMessage: 'Failed to open the referenced table \'companies\'', sqlState: 'HY000',
index: 0, sql: 'alter tablewarehouses
add constraintwarehouses_company_id_foreign
foreign key (company_id
) referencescompanies
(id
)' }