-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The same error occurs, if I remove from the table model SQLField, which
relates to an another table, like this:

SQLField('name', db.permission_level, default=1, requires =
        IS_IN_DB(db, 'permission_level.id', '%(level)s - %(name)s'))

I don't know - maybe there is no relation to MySQL and it's table
engines. My project is under development, so it is not so painful to
delete whole db and let the web2py to regenerate it, but in the full
operation it would be bad..

Thanks for ideas..

David

mdipierro napsal(a):
> The DAL assumes InnoDB, not MYISAM. Perhaps that is the problem?
> 
> On Jul 20, 12:05 pm, David Zejda <d...@atlas.cz> wrote:
> Hello,
> 
> my db backend is MySQL 5.0.51a-24 on Linux.
> 
> If I try to gently alter already generated table schema, like to rename
> 
> SQLField('relation', 'text', requires = \
>        IS_NULL_OR(IS_IN_DB(db, 'relation_type.id', 'relation_type.id',
> multiple=True)))
> 
> to
> 
> SQLField('relation_type', 'text', requires = \
>        IS_NULL_OR(IS_IN_DB(db, 'relation_type.id', 'relation_type.id',
> multiple=True)))
> 
> i get this:
> 
> Traceback (most recent call last):
>   File "/home/zejdad/!a/jfind/web2py/gluon/restricted.py", line 98, in
> restricted
>     exec ccode in environment
>   File "/home/zejdad/!a/jfind/web2py/applications/jfind/models/db.py",
> line 346, in <module>
>     migrate="person"
>   File "/home/zejdad/!a/jfind/web2py/gluon/sql.py", line 938, in
> define_table
>     raise e
> OperationalError: (1025, "Error on rename of './jfind/#sql-ac1_5e' to
> './jfind/person' (errno: 150)")
> 
> Maybe, it is related to the troubles mentioned there:
> 
> http://forums.mysql.com/read.php?22,95361
> 
> Please, do you have any experiences with a such type of errors?
> 
> I would like to test it with MyISAM instead of InnoDB tables, but it is
> not easy to change it in already generated and interrelated tables:
> 
> ALTER TABLE `person` ENGINE = MYISAM
> 
> #1217 - Cannot delete or update a parent row: a foreign key constraint
> fails
> 
> Or should I try other MySQL version?
> 
> Thank you for advices!
> 
> David
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkplqaYACgkQ3oCkkciamVHxZwCeKBTaVXkc1e1X1cgeAub3x2t/
fmAAn1DsiGEALo8CddJvulnNGBsCMuen
=U4K0
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to