INT is used for storing IDs in database. Limit of INT is 2,147,483,647 (around 2 Billion records). Our biggest tables FINANCIAL_TRXN will be the first table to get hit if we cross the limit of 2Billion records of financial transactions. It was found that in a 100 GB Mifos database the MAX(TRXN_ID)was 147,913,398. We are going to exhaust the ID space when DB space reaches in around 10-50 TB, assuming linear growth in ID space versus DB space (ID space is directly proportional to [N * DB space] where N is a constant > 1). It will be difficult to increase the ID space (changing INT to LONG) when DB crosses limit of a Tera Bytes (TB) as time of applying the upgrade will be huge.
Increasing ID space would mean a large database upgrade which would cause a long downtime for large databases.
Resolving of this issue,
1) Figure out which tables are large
2) Create database upgrade (one upgrade per alter statement)
3) Find out the upgrade time
3) Make related code change in Entities and hibernate mappings.