this is the definition of my model
const Sequelize = require("sequelize");
const sequelize = require("../../db/db_tp.js");
const manage_notice = sequelize.define("manage_notice", {
nid: {type:Sequelize.INTEGER,primaryKey: true,autoIncrement: true},
nname:Sequelize.STRING(20),
nmaincolor:Sequelize.STRING(20),
nothercolor:Sequelize.STRING(20),
nshareicon:Sequelize.STRING(100),
nsharetitle:Sequelize.STRING(30),
nsharecontent:Sequelize.STRING(50),
})
manage_notice.sync({force: false}).then(function () {
// Table created
manage_notice.findAll().then(result => {
})
});
module.exports = manage_notice;
because there is a table with a certain amount of data before, but every time it is mapped, it is because the table name repeats and creates a new table with a tail added to it.
if so, isn"t it troublesome to change the table structure? Do you have to think about all the field structures in the first place?