Skip to content

Commit

Permalink
fixed migration questions.js seed file
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Moses committed May 1, 2024
1 parent 2e1e363 commit 950c7bc
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions packages/server/seeds/development/questions.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
// questions.js
exports.seed = function (knex) {
// Deletes all existing entries
return knex('Questions')
.del()
.then(() => {
// Inserts seed entries
return knex('Questions').insert([
{ id: 1, title: 'What did we do well?' },
{ id: 2, title: 'What did we learn?' },
{ id: 3, title: 'What should we do differently next time?' },
{ id: 4, title: 'What are the roadblocks?' },
]);
});
return knex('Questions').insert([
{ id: 1, title: 'What did we do well?' },
{ id: 2, title: 'What did we learn?' },
{ id: 3, title: 'What should we do differently next time?' },
{ id: 4, title: 'What are the roadblocks?' },
]);
};

0 comments on commit 950c7bc

Please sign in to comment.