Forum OpenACS Development: Re: Re: Ruby on Rails Review Part I

Collapse
Posted by Andrei Popov on

One more point -- rake migrations are great and ActiveRecord is pretty cool, but both work at a "lowest" denominator level. What this means is that you can have this defined in Postgres:

create table things (
  id integer not null primary key,
  some_text varchar(100)
    constraint things_some_text_un unique
);

create table gadgets ( id integer not null primary key, thing_id integer not null constraint gadgets_fk references things(id), status_code varchar(1) constraint gadgets_status_code_ck check (status_code in ('c','o')) default 'c' );

But all (well, most of) these wonderful constraints will not be re-created once you run rake migrate on another machine....