The DAL assumes InnoDB, not MYISAM. Perhaps that is the problem?
On Jul 20, 12:05 pm, David Zejda <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 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
>
> iEYEARECAAYFAkpko+cACgkQ3oCkkciamVF3nACfdej9+FBUseSRBgMtJyBm0elR
> wKUAnjx/qSTnNzG+Dr47AKmHm40PxJUK
> =HqDy
> -----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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---