create folders table
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
return queryInterface.bulkInsert('Projects', [
|
||||
// Add projects table records
|
||||
await queryInterface.bulkInsert('Projects', [
|
||||
{
|
||||
name: 'Project 1',
|
||||
detail: 'Details of Project 1',
|
||||
@@ -11,13 +12,34 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
name: 'Project 2',
|
||||
detail: 'Details of Project 2',
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
{
|
||||
name: 'Project 3',
|
||||
detail: 'Details of Project 3',
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
]);
|
||||
|
||||
// Add folders table records
|
||||
await queryInterface.bulkInsert('folders', [
|
||||
{
|
||||
name: 'Folder 1',
|
||||
detail: 'Details of Folder 1',
|
||||
projectId: 1,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
{
|
||||
name: 'Folder 2',
|
||||
projectId: 1,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
{
|
||||
name: 'Folder 3',
|
||||
projectId: 1,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
@@ -25,6 +47,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
// do nothing
|
||||
// do nothingg
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user