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

sandrocsimas picture sandrocsimas  ·  3Comments

rarkins picture rarkins  ·  3Comments

aj0strow picture aj0strow  ·  3Comments