/** * Create the `<%= tableName %>` table to make relationships * between `<%= details.collection %>` and `<%= relationship.collection %>`. */ connection.schema.createTableIfNotExists('<%= tableName %>', function (table) { table.integer('<%= details.attribute %>_<%= details.column %>').unsigned().references('<%= details.column %>').inTable('<%= details.collection %>'); table.integer('<%= relationship.attribute %>_<%= relationship.column %>').unsigned().references('<%= relationship.column %>').inTable('<%= relationship.collection %>'); }).catch(function (err) { console.log('Impossible to create the `<%= tableName %>` relation table.'); console.log(err) }),