What happens if you add default='' to the field def? On Thursday, October 24, 2013 7:10:29 PM UTC-4, Carlos Zenteno wrote: > > What is wrong with the last line of my table? > > db.define_table('tenants_extra', > Field('tenant', 'reference tenants'), > Field('address', 'reference addresses'), > Field('tenant_type', type = 'string', length = 32, default = > T('Condominium'), required = True, label = T('Type'), comment = T('Type of > your organization'), notnull = True), > Field('logo', type = 'upload', label = T('Logo'), comment = 'Logo file > (jpg or png) - 200x200', notnull = True), > Field('legal_name', type = 'string', length = 64, label = T('Legal > Name'), comment = T('Legal name of your organization'), notnull = True), > Field('tax_id', type = 'string', length = 13, label = T('Tax ID'), > comment = T('Tax ID of your organization'), notnull = True) > ) > > Everything works just fine, but the second I add it, I get the following > error: > > <class 'sqlite3.OperationalError'> Cannot add a NOT NULL column with > default value NULL > > > Appreciate any help.... >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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.