From: Bud P. B. <bu...@si...> - 2003-04-22 10:52:10
|
Actually, a better (or more correct fix) would be the following: def _extraSQL(self): result = [] if self.notNull or self.alternateID: result.append('NOT NULL') if self.unique or self.alternateID: result.append('UNIQUE') return result This is the correct way that alternateID implies NOT NULL. --b On Tue, 22 Apr 2003 12:31:56 +0200 "Bud P. Bruegger" <bu...@si...> wrote: > Ian, > > I double checked the patches I sent and found that you didn't apply > one of my fixes in CVS: > > Col.py, in _extraSQL: instead of > > if self.unique or self.alternateID: > result.append('UNIQUE') > > it would be better to state: > > if self.unique or self.alternateID: > result.append('UNIQUE') > result.append('NOT NULL') > > At least in my understanding of PostgreSQL, UNIQUE does not seem to > imply NOT NULL. > > --b > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss > /----------------------------------------------------------------- | Bud P. Bruegger, Ph.D. | Sistema (www.sistema.it) | Via U. Bassi, 54 | 58100 Grosseto, Italy | +39-0564-411682 (voice and fax) \----------------------------------------------------------------- |