On Tue, Sep 28, 2010 at 3:26 PM, Thomas Sibley <t...@bestpractical.com> wrote:
> Hi Matt,
>
> On 28 Sep 2010 15:58, Matt Zagrabelny wrote:
>> Do I model the UNIQUE constraints within my AppName::Record schema { } ?
>
> The way to do this is to specify "is distinct" for each column in your
> AppName::Record schema { } definition.

Hmmm. That doesn't seem quite logical. I could have a unique
constraint for each column individually or the *combination* of
multiple columns.

For instance:

CREATE TABLE widgets (
  name TEXT,
  model_number TEXT,

  UNIQUE(name),
  UNIQUE(model_number)
);

is very different from:

CREATE TABLE widgets (
  name TEXT,
  model_number TEXT,

  UNIQUE(name, model_number)
);

How does jifty handle the above difference?

or do you manually tweak the DB?

Thanks,

-matt zagrabelny
_______________________________________________
jifty-devel mailing list
jifty-devel@lists.jifty.org
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel

Reply via email to