'how change data type already registered in the database
I'm working now on a system that defines a PK (primary key) of the table as int, this PK has a sequence with a rule:
"YearYearMonthMonth" + 6 numbers.
ex: 2105000001
But the year of "22" (2022) was not predicted, or, if I were to adjust this pattern of the sequence to the current year, it would give an error, as it exceeds the max value. of an int.
Doubt: the system is huge, in java, PostgreSQL database, what would be the pros and cons to switch to Long? Would it bring database performance impacts something like that? Would all IDs already saved in the bank as int automatically change to Long? Sorry, but I don't know the safest way to solve this.. thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
