avram icon indicating copy to clipboard operation
avram copied to clipboard

Check migrations for reserved words

Open jwoertink opened this issue 4 years ago • 0 comments

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

jwoertink avatar Oct 07 '21 20:10 jwoertink