Model se schématem můžete nastavit pomocí model.schema
, něco jako:
var City = sequelize.define('City', {
id: {
type: sequelize.Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
field: 'id'
},
name: {
type: sequelize.Sequelize.STRING,
field: 'name'
}
}, {
timestamps: false,
tableName: 'cities'
});
City.schema("public");