No. web2py does not automatically delete indexes. You have to do it 
manually. Sorry. Please open a ticket about this.

On Friday, 4 July 2014 17:44:53 UTC-5, José Antonio Salazar Montenegro 
wrote:
>
> I realize this is an ancient topic, but I'm having the very same error 
> migrating a MySQL table where I'm only removing a self reference field.
>
> It seems like an index was created to guard the (self) foreign-key 
> constraint and DAL doesn't remove it when deleting the field.
> There are no manually-created indexes on my database, all were created 
> automatically.
>
> Just wondering if this was fixed.
>
> On Monday, July 20, 2009 12:05:44 PM UTC-5, David Zejda 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-----
>>
>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to