javascript Sequelize:var基本模型设置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript Sequelize:var基本模型设置相关的知识,希望对你有一定的参考价值。

var tableName = sequelize.define("tableName", {
  Country: {
    type: Sequelize.STRING
  }
  PhoneCode: {
    type:Sequelize.INTEGER
  }
  Capital: {
    type: Sequelize.STRING
  },
  IndependenceYear: {
    type: Sequelize.INTEGER
  },
},
{
  freezeTableName: true //This allows the model name to be as set as specified above, irrespective of capitalization.
},
{
  tableName.sync({force: false}) //Forcing the sync to "false" will override the defualt "true", which will DROP this TABLE if it already exists whenevner running this code...
}
});

以上是关于javascript Sequelize:var基本模型设置的主要内容,如果未能解决你的问题,请参考以下文章

node.js Sequelize操作mysql基本的增删改查demo

javascript Sequelize命令db

javascript Sequelize嵌套包含

javascript Sequelize嵌套包含

javascript Sequelize Model

javascript Sequelize:.sequelizerc