I am using Laravel 5.3 and creating some data using Faker
when running locally this code
$factory->define(App\User::class, function (Faker\Generator $faker) {
$username = str_replace(".","",$faker->username);
return [
'username' => $username,
'email' => $faker->safeEmail,
'password' => bcrypt('123456'),
'remember_token' => str_random(10),
];
});
produces data where id ranges from 1-50 like in following image http://i.imgur.com/DhIK8JP.png
Another piece of code runs after it and expects user id's to be between 1-50
$factory->define(App\Album::class, function (Faker\Generator $faker) {
return [
'hash' => str_random(7),
'title' => $faker->sentence,
'user_id' => $faker->numberBetween(1, 50),
'published' => false,
];
});
That all works locally everytime I run php artisan db:seed I am now using Heroku and mysql addon from cleardb.com
when I deploy and run db:seed it produces this every time. Id's allways start from 4 and go up to 494, every time I run it. So when I try to seed on production my db:seed fails since it expects users id's to be 1-50. Any ideas what is going on?