sleep-tracker-backend/data/seeds/addDailyAverages.js

78 lines
1.2 KiB
JavaScript
Raw Normal View History

exports.seed = function(knex) {
return knex('dailyAverages').truncate()
.then(function () {
return knex('dailyAverages').insert([
{
"id": 1,
"session_id": 1,
"user_id": 1,
"sleep_duration": 9,
"average_mood": 3
},
{
"id": 2,
"session_id": 2,
"user_id": 1,
"sleep_duration": 7.67,
"average_mood": 4
},
{
"id": 3,
"session_id": 3,
"user_id": 1,
"sleep_duration": 7.67,
"average_mood": 4
},
{
"id": 4,
"session_id": 4,
"user_id": 1,
"sleep_duration": 6.67,
"average_mood": 3
},
{
"id": 5,
"session_id": 5,
"user_id": 1,
"sleep_duration": 9.5,
"average_mood": 4
},
{
"id": 6,
"session_id": 6,
"user_id": 1,
"sleep_duration": 7.5,
"average_mood": 4
},
{
"id": 7,
"session_id": 7,
"user_id": 1,
"sleep_duration": 8.58,
"average_mood": 2.67
},
{
"id": 8,
"session_id": 8,
"user_id": 1,
"sleep_duration": 8.42,
"average_mood": 4.33
},
{
"id": 9,
"session_id": 9,
"user_id": 1,
"sleep_duration": 6.25,
"average_mood": 3.33
},
{
"id": 10,
"session_id": 10,
"user_id": 1,
"sleep_duration": 11.25,
"average_mood": 3.67
}
]);
});
};