Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
'use strict';
exports.seed = function(knex, Promise) {
var players = knex('players');
var users = knex('users');
return new Promise(function(resolve, reject) {
[users.insert, {id: 1, name: 'Joaozin'}],
[players.insert, {id: 1, name: 'JoaozinPlayer', user_id: 1}],
[users.insert, {id: 2, name: 'Mariazinha'}],
[players.insert, {id: 2, name: 'MariazinhaPlayer', user_id: 2}],
[users.insert, {id: 3, name: 'Joaquinzinho'}],
[users.insert, {id: 3, name: 'JoaquinzinhoPlayer', user_id: 3}]
return exec[1].call(exec[1], exec[2]);
}, {concurrency: 1}).then(function(execs){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.