Re: Check constraint in models

2007-12-27 Thread Eratothene
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, >  

Re: Check constraint in models

2007-12-27 Thread Eratothene
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

Re: Check constraint in models

2007-12-25 Thread Malcolm Tredinnick
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

Check constraint in models

2007-12-25 Thread bruno . jacquet
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 =