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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -