# PostgreSQL and migrations

**URL:** <https://discuss.rubyonrails.org/t/postgresql-and-migrations/558>\
**Category:** rubyonrails-talk\
**Created:** [August 27, 2006, 2:02am UTC](https://discuss.rubyonrails.org/t/postgresql-and-migrations/558 "2006-08-27T02:02:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![timothymorgan](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@timothymorgan](https://discuss.rubyonrails.org/u/timothymorgan)\
**Post date:** [August 27, 2006, 2:02am UTC](https://discuss.rubyonrails.org/t/postgresql-and-migrations/558/1 "2006-08-27T02:02:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![timothymorgan](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@timothymorgan](https://discuss.rubyonrails.org/u/timothymorgan)\
**Post date:** [August 27, 2006, 3:08am UTC](https://discuss.rubyonrails.org/t/postgresql-and-migrations/558/2 "2006-08-27T03:08:53Z")

</div>

: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. 🙂

Tim

Joe Ruby wrote:
