93 lines
1.3 KiB
JavaScript
93 lines
1.3 KiB
JavaScript
|
exports.seed = function (knex) {
|
||
|
return knex('roads')
|
||
|
.truncate()
|
||
|
.then(function () {
|
||
|
return knex('roads').insert([
|
||
|
{
|
||
|
id: 1,
|
||
|
start_city_id: 1,
|
||
|
end_city_id: 3,
|
||
|
distance: 40,
|
||
|
},
|
||
|
{
|
||
|
id: 2,
|
||
|
start_city_id: 3,
|
||
|
end_city_id: 10,
|
||
|
distance: 60,
|
||
|
},
|
||
|
{
|
||
|
id: 3,
|
||
|
start_city_id: 10,
|
||
|
end_city_id: 5,
|
||
|
distance: 70,
|
||
|
},
|
||
|
{
|
||
|
id: 4,
|
||
|
start_city_id: 3,
|
||
|
end_city_id: 5,
|
||
|
distance: 50,
|
||
|
},
|
||
|
{
|
||
|
id: 5,
|
||
|
start_city_id: 3,
|
||
|
end_city_id: 2,
|
||
|
distance: 50,
|
||
|
},
|
||
|
{
|
||
|
id: 6,
|
||
|
start_city_id: 2,
|
||
|
end_city_id: 4,
|
||
|
distance: 20,
|
||
|
},
|
||
|
{
|
||
|
id: 7,
|
||
|
start_city_id: 4,
|
||
|
end_city_id: 5,
|
||
|
distance: 20,
|
||
|
},
|
||
|
{
|
||
|
id: 8,
|
||
|
start_city_id: 5,
|
||
|
end_city_id: 6,
|
||
|
distance: 50,
|
||
|
},
|
||
|
{
|
||
|
id: 9,
|
||
|
start_city_id: 6,
|
||
|
end_city_id: 7,
|
||
|
distance: 60,
|
||
|
},
|
||
|
{
|
||
|
id: 10,
|
||
|
start_city_id: 6,
|
||
|
end_city_id: 10,
|
||
|
distance: 40,
|
||
|
},
|
||
|
{
|
||
|
id: 11,
|
||
|
start_city_id: 7,
|
||
|
end_city_id: 9,
|
||
|
distance: 110,
|
||
|
},
|
||
|
{
|
||
|
id: 12,
|
||
|
start_city_id: 9,
|
||
|
end_city_id: 7,
|
||
|
distance: 110,
|
||
|
},
|
||
|
{
|
||
|
id: 13,
|
||
|
start_city_id: 8,
|
||
|
end_city_id: 7,
|
||
|
distance: 50,
|
||
|
},
|
||
|
{
|
||
|
id: 14,
|
||
|
start_city_id: 8,
|
||
|
end_city_id: 5,
|
||
|
distance: 90,
|
||
|
},
|
||
|
]);
|
||
|
});
|
||
|
};
|