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

olaferlandsen picture olaferlandsen  路  3Comments

hyperh picture hyperh  路  3Comments

mattgrande picture mattgrande  路  3Comments

legomind picture legomind  路  3Comments

tjwebb picture tjwebb  路  3Comments