Re: Moving from MySQL to PostgreSQL with Ruby on Rails.
От | Robby Russell |
---|---|
Тема | Re: Moving from MySQL to PostgreSQL with Ruby on Rails. |
Дата | |
Msg-id | 1132263896.5569.78.camel@linus обсуждение исходный текст |
Ответ на | Re: Moving from MySQL to PostgreSQL with Ruby on Rails. (Bruno Wolff III <bruno@wolff.to>) |
Ответы |
Re: Moving from MySQL to PostgreSQL with Ruby on Rails.
|
Список | 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.lists@planetargon.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 *******************************************************/
В списке pgsql-general по дате отправления: