| From: | Robby Russell <robby(at)planetargon(dot)com> |
|---|---|
| To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
| Cc: | Peter Michaux <petermichaux(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Moving from MySQL to PostgreSQL with Ruby on Rails. |
| Date: | 2005-11-17 21:44:56 |
| Message-ID: | 1132263896.5569.78.camel@linus |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, 2005-11-17 at 15:10 -0600, Bruno Wolff III wrote:
> On Thu, Nov 17, 2005 at 09:23:51 -0800,
> Robby Russell <robby(dot)lists(at)planetargon(dot)com> wrote:
> >
> > CREATE TABLE product (
> > id SERIAL PRIMARY KEY,
> > name VARCHAR(255) NOT NULL DEFAULT '',
> > );
>
> And depending on why you chose VARCHAR(255), you may really want to use TEXT
> instead.
Mainly because, Rails will generate forms based on the data types
differently. A text field -> VARCHAR... textarea -> TEXT.
Sort of a meta-approach for Rails-based scaffolding generator. Not
required, but it'll speed up the process and limit the number of chars
that you can stick into a text field opposed to a text area.
Robby
--
/******************************************************
* Robby Russell, Founder.Developer.Geek
* PLANET ARGON, Rails Development, Consulting & Hosting
* Portland, Oregon | p: 503.351.4730 | f: 815.642.4068
* www.planetargon.com | www.robbyonrails.com
* Programming Rails | www.programmingrails.com
*******************************************************/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2005-11-17 21:57:53 | Sun supporting PostgreSQL |
| Previous Message | Andrew Sullivan | 2005-11-17 21:30:05 | Re: Rebranding PostgreSQL |