Just solved the problem... I was declaring another table used by 'frase' after the 'frase' declaration, when I moved it, it works!
Thanks! Tito On Wed, Dec 5, 2012 at 6:47 PM, Massimo Di Pierro < [email protected]> wrote: > Could be this table 'frase' exists of is a mysql keyword? > > > On Wednesday, 5 December 2012 15:31:37 UTC-6, Tito Garrido wrote: >> >> Hi Folks, >> >> I am trying to create some tables using DAL + Mysql and I got: >> Ticket ID >> >> 127.0.0.1.2012-12-05.11-51-55.**a267bd2c-0651-43c1-8194-**56f3e5ee8fb8 >> <class 'gluon.contrib.pymysql.err.**InternalError'> (1005, u"Can't >> create table 'frasesdb.frase' (errno: 150)") >> >> This is my model: >> >> db.define_table('tag', >> Field('nome', requires=[IS_NOT_EMPTY(),IS_**NOT_IN_DB(db, >> 'tag.nome')], unique=True), >> format='%(nome)s') >> >> from smarthumb import SMARTHUMB >> box = (250, 250) >> db.define_table('frase', >> Field('frase', requires=IS_NOT_EMPTY()), >> Field('slug', requires=IS_SLUG()), >> Field('tag', 'list:reference tag'), >> Field('site', 'reference site', requires=IS_IN_DB(db, 'site.id', >> '%(dominio)s')), >> Field('image_filename', readable=False, writable=False), >> Field('image', 'upload', requires=IS_IMAGE(), uploadseparate=True, >> autodelete=True), >> Field('thumb', 'upload', requires=IS_IMAGE(), compute = lambda row: >> SMARTHUMB(row.image, box), autodelete=True), >> Field('postar_em', 'datetime', default=None), >> format='%(frase)s') >> >> >> Why does it happen? I could see some posts on the list about it but none >> seems to solve my problem. >> >> Regards, >> >> Tito >> -- >> >> Linux User #387870 >> .........____ >> .... _/_õ|__| >> ..º[ .-.___.-._| . . . . >> .__( o)__( o).:_______ >> > -- > > > > -- Linux User #387870 .........____ .... _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:_______ --

