PostgreSQL and migrations

Just thought I'd pass a note of an error I see when using migrations with PostgreSQL. In a create_table |table| block, the line

table.column :trinkets, :text, :limit => 8192

will create a PGError. It will try to turn that into a field

"trinkets" text(8192)

and since the text data type does not take a parameter, it produces an error. Removing the :limit option creates

"trinkets" text

which is valid.

:text works fine for unbounded fields, and :string with :limit works fine for bounded fields. Only problem is when you use :limit with :text. This is more of an FYI than an actual problem. I've figured out the problem myself and solved it already. :slight_smile:


Joe Ruby wrote: