consider using django add-on django-check-constraints
http://code.google.com/p/django-check-constraints/wiki/Features
On Dec 26, 12:34 am, [EMAIL PROTECTED] wrote:
> Hello,
>
> Having the following (Postgre)SQL statement:
>
> CREATE TABLE Games (
> minPlayer integer NOT NULL DEFAULT 1,
>
django-check-constraints
On Dec 26, 12:34 am, [EMAIL PROTECTED] wrote:
> Hello,
>
> Having the following (Postgre)SQL statement:
>
> CREATE TABLE Games (
> minPlayer integer NOT NULL DEFAULT 1,
> maxPlayer integer NOT NULL DEFAULT 1,
> CHECK (min_player <= max_player)
> )
>
> the
On Tue, 2007-12-25 at 14:34 -0800, [EMAIL PROTECTED] wrote:
> Hello,
>
> Having the following (Postgre)SQL statement:
>
> CREATE TABLE Games (
> minPlayer integer NOT NULL DEFAULT 1,
> maxPlayer integer NOT NULL DEFAULT 1,
> CHECK (min_player <= max_player)
> )
>
> the consequent Model
Hello,
Having the following (Postgre)SQL statement:
CREATE TABLE Games (
minPlayer integer NOT NULL DEFAULT 1,
maxPlayer integer NOT NULL DEFAULT 1,
CHECK (min_player <= max_player)
)
the consequent Model for Django would be:
class Game(model.Models):
min_player =
4 matches
Mail list logo