We do this because the CREATE TABLE sql command is automatically lower
casing table_name since it is not wrapped in double quotes. This is an
issue for app labels that have upper case letters. The table_exists
function is always returning false if the app has upper case letters.
Then, an exception is raised when attempting to create a table with the
same name.
I guess if I were writing this all over again, I'd try to make the history tables match the case of the source tables. But given that postgres automatically lowercases anyway, I think this is fine.
We do this because the CREATE TABLE sql command is automatically lower casing table_name since it is not wrapped in double quotes. This is an issue for app labels that have upper case letters. The table_exists function is always returning false if the app has upper case letters. Then, an exception is raised when attempting to create a table with the same name.