Knex: AUTO_INCREMENT a big integer

Created on 22 May 2016  路  3Comments  路  Source: knex/knex

I have the following line of code in my app:

table.bigInteger("parsonId").notNullable().primary();

How to make this auto increment?
table.increments() is not a suitable method for me.

Most helpful comment

A quick search through the sources turned up the bigincrements column type. Perhaps that can help?

Also found it documented here: http://knexjs.org/#Schema-increments

All 3 comments

A quick search through the sources turned up the bigincrements column type. Perhaps that can help?

Also found it documented here: http://knexjs.org/#Schema-increments

Perfect!

Note: This is mentioned in increments docs, so we can leave this issue closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattgrande picture mattgrande  路  3Comments

koskimas picture koskimas  路  3Comments

arconus picture arconus  路  3Comments

npow picture npow  路  3Comments

hyperh picture hyperh  路  3Comments