创建模型与迁移
sequelize model:generate --name Page --attributes parentId:integer,title:string,rank:integer,content:text
修改迁移
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('Pages', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
parentId: {
al...