-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path20250115171819-category.js
48 lines (46 loc) · 1.08 KB
/
20250115171819-category.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"use strict";
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.bulkInsert(
"Categories",
[
{
name: "前端开发",
rank: 1,
createdAt: new Date(),
updatedAt: new Date(),
},
{
name: "后端开发",
rank: 2,
createdAt: new Date(),
updatedAt: new Date(),
},
{
name: "移动端开发",
rank: 3,
createdAt: new Date(),
updatedAt: new Date(),
},
{
name: "数据库",
rank: 4,
createdAt: new Date(),
updatedAt: new Date(),
},
{
name: "服务器运维",
rank: 5,
createdAt: new Date(),
updatedAt: new Date(),
},
{ name: "公共", rank: 6, createdAt: new Date(), updatedAt: new Date() },
],
{}
);
},
async down(queryInterface, Sequelize) {
await queryInterface.bulkDelete("Categories", null, {});
},
};