Is It Safe to change the datatype from int to bigint in naming series table?

Hi Community!

Quick Question:

Is it safe to change the integer(int) datatype to Big Integer(bigint) in Series Table?

Current field in series table can hold upto 10 digit number but I need to generate 13 number to generate the EAN-13 Barcode.

Every time when I trying to give 13 digit number as a input then it’s discarding 3 digits.
Even behaviour of getseries function is unpredictable.

Series field is a Select by standard. Select field generally honors 13 digits value.

Right said @umair

But In this scenario I need 13 digits long number excluding naming series name(prefix). I don’t need to include SINV. prefix for barcode.
For Instance

// tabSeries Current value data length == 10
+---------+--------------+------+-----+---------+-------+
| Field   | Type         | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
| name    | varchar(100) | YES  |     | NULL    |       |
| current | int(10)      | NO   |     | 0       |       |
+---------+--------------+------+-----+---------+-------+

In this table current value field can only store upto 10 digits(1234567890) value, If It’s more than ten digits, then behaviour of naming sequence will be unpredictable and you can’t predict which number will come next.

I have achieved the desired results using custom Doctype to maintain the naming series, but I would prefer Standard functionality of ERP over making customisation for minor changes.

1 Like

Yeah, please change. Also send a patch :slight_smile:

2 Likes

Sent
Ref:Patch to modify Int datatype to bigint in `tabSeries` table by navdeepghai1 · Pull Request #6284 · frappe/frappe · GitHub