Migrated the endpoint ‘region’ column to ‘region_id.
In addition to the rename, the new column is made a foreign key to the respective ‘region’ in the region table, ensuring that we auto-create any regions that are missing. Further, since the old region column was 255 chars, and the id column in the region table is 64 chars, the size of the id column in the region table is increased to match.
To Upgrade:
Region Table
Increase the size of the if column in the region table
Endpoint Table
Add the endpoint region_id column, that is a foreign key to the region table
Remove the column region
Add indexes to user_id and trust_id columns for the token table.