我在使用 PostgreSQL 数据库运行 Sails 应用程序时遇到问题。我需要插入一个 11 位整数,但我找不到一种简单的方法来为此调整我的模型。
编辑 1 这里是一个模型的例子:
/**
* Phone.js
*
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
number: {
type: 'integer',
required: true,
minLength: 9
}
}
};
有没有办法(使用 ORM)在 Postgre 中将该整数更改为 BIGINT,所以我在插入时没有得到ERROR: integer out of rage
?