sails.js - Waterline BIGINT type with sails-mysql -


i know how can define bigint type in waterline model using sails-mysql? couldn't find proper documentation it. seems doesn't support bigint types need it. trying dig on sourcecode found liek this: https://github.com/balderdashy/sails-mysql/blob/987f4674785970951bc52becdfdb479864106da1/helpers/private/schema/build-schema.js#l29 it's still not working.

module.exports = {     attributes: {          userid: {             type: 'bigint',             autoincrement: true,             primarykey: true,             unique: true,         },    } }; 

this 1 still keeps creating integer field in database.

ok after digging through source code bit more figured have set property called size field. setting 64 cause waterline create bigint field.

module.exports = {     attributes: {          userid: {             type: 'integer',             size: 64, // waterline translate bigint             autoincrement: true,             primarykey: true,             unique: true,         },    } }; 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -