运行必须源码:app/(controller/model/service/middleware/lib/utils/validate/router)、config/、database/(migrations/seeders/sql)、启动脚本、app/public/templates 模板。 已忽略运行非必须:node_modules/、logs/、run/、app/public 运行时上传数据、.env*、构建/缓存产物。
37 lines
1010 B
JavaScript
37 lines
1010 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.bulkInsert('carousel', [
|
|
{
|
|
image_url: 'https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?w=1200&h=480&fit=crop',
|
|
sort_order: 1,
|
|
link_url: '',
|
|
enabled: 1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
image_url: 'https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1200&h=480&fit=crop',
|
|
sort_order: 2,
|
|
link_url: '',
|
|
enabled: 1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
image_url: 'https://images.unsplash.com/photo-1614728263952-84ea256f9679?w=1200&h=480&fit=crop',
|
|
sort_order: 3,
|
|
link_url: '',
|
|
enabled: 1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
]);
|
|
},
|
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
await queryInterface.bulkDelete('carousel', null, {});
|
|
},
|
|
};
|