What is the best way to go about updating table names and column names in a postgresql database that already has loads of data but, as part of an overall web app upgrade, the database is also being modified, and those modifications include renaming poorly named tables (the largest table is named, “data”!) and column names?
Especially I am concerned about breaking things such as many PK’s are bigserial or serial, and then PK and FK naming will not longer be consistent without manually re-naming all of them.
Is there a recommended way to go about these changes?
If I start renaming tables, and then columns, and then PK, FK, and sequences, am I running the risk of breaking constraints or sequences? Or would it be better to leave the names of PK, FK, and sequences "as is"?