avram
avram copied to clipboard
Check migrations for reserved words
I just tried to rename a Bool column to primary, but postgres said it was a syntax error. It wasn't really a "syntax" error, but more just the fact that it's a reserved word (i.e. PRIMARY KEY). If we have a way to list out the reserved words, that could help a ton.
So instead of seeing the error
Caused by: syntax error at or near "primary" (PQ::PQError)
we could see an error like
Caused by: The word "primary" is a reserved word in postgres. Try using a different column name