I defined the following table in db.py: db.define_table('timetable', Field('nodeID','reference node',default='',requires=[IS_IN_DB(db,'node.id','%(id)s',zero=T('Select a value'))],ondelete='CASCADE',notnull=True,writable=False,readable=False), Field('dayID','reference day',label='Dag * ',default='',requires=IS_IN_DB(db,'day.id','%(name)s',orderby='day.id',zero='select a value'),represent=lambda dayID, row: db(db.day.id==dayID).select().first().name if dayID else '',ondelete='RESTRICT',notnull=True), Field('startDate',writable=False,readable=False,**isemptyorisdate), Field('startTime',label='Start tijd * ',**istime), Field('TZID',length=64,default=TZID,requires=IS_LENGTH(64,error_message=T('length exceeds 64 characters')),label='Timezone ID',writable=False,readable=False), Field('duration',length=4,requires=IS_LENGTH(4,error_message=T('length exceeds 4 characters')),label='Duur in minuten'), Field('program',length=64,default='',requires=[IS_LENGTH(64,error_message=T('length exceeds 64 characters')),IS_NOT_EMPTY()],notnull=True,label='Les * '), migrate=False)
In Postgresql nodeID and dayID both have the property Not NULL set to No, whereas, program has this property set to Yes. Why isn't the Not NULL property set to Yes for nodeID and dayID? This makes it possible to enter data using for example PHPPgAdmin which are inconsistent with the table definition in web2py. Kind regards, Annet -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.