| Issue 4: | long index identifier in MySQL causes index to not be installed | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. set up eve_db app as part of a project (django-eve for example) 2. run ./manage syncdb What is the expected output? What do you see instead? All table indexes should install correctly normally. But when using MySQL, the name of one of the models is too long, causing the index for that table not to be installed. Note the table itself is still installed correctly, just not the index. I get the following message: Failed to install index for eve_db.RamAssemblyLineTypeDetailPerCategory model: (1059, "Identifier name 'eve_db_ramassemblylinetypedetailpercategory_assembly_line_type_id' is too long") What version of the product are you using? On what operating system? Revision 38 Please provide any additional information below.
Apr 7, 2010
Yeah changing the model name would definitely be the wrong way to go about it. It's definitely possible to create the index manually, and since the import is not a frequent task it wouldn't be a problem. Might be worth adding this to the doc though in the future. I'll have a go at it and let you know how it goes once I actually have solved other problems I have with the import. FYI I'm using MacOSX 10.5.8, MySQL 5.0, python 2.5 and Django 1.1
Apr 7, 2010
Sounds good. Make sure you post any other problems you may be having so I can begin fixing them. This doesn't really help your situation, but I can tell you that on Mac OS 10.6.3, Postgres 8.3, Python 2.6, and Django 1.1, everything is golden. That's all that I have tested on so far.
Apr 26, 2010
Fun Fact: 64 - Number of chars allowed in a MySQL index name. 65 - Number of chars in "eve_db_ramassemblylinetypedetailpercategory_assembly_line_type_id" Just barely too big. Got mine to sync by adding: Meta: db_table = 'eve_db_foo' This keeps the API matching the EVE DB Dump.
Apr 30, 2010
Could we do a more permanent fix for this since I'm also running into the same
problem with MySQL.
Perhaps because the default table name is
"eve_db_ramassemblylinetypedetailpercategory" and it's only 1 character too long,
could we do the following:
Meta:
db_table = 'eve_db_ramassemblylinetypedetailpercat'
Apr 30, 2010
This MySQL issue was just fixed in Django 1.2 trunk. I'm not sure if you're developing against that, but we can either change the table name, or you can grab the latest revision from trunk, which supposedly fixes the issue. I think we're requiring 1.2 for most of the django-eve projects anyway. So either or. I'd be curious to know if they really did fix the behavior in Django trunk, though.
Apr 30, 2010
I am developing against trunk, which I last checked out a week ago, I'll test it and see what the result is.
Apr 30, 2010
I tested against Django 1.2 subversion trunk revision 13060 and it seems to be fixed. I no longer get an error when the indexes are installed. Before: CREATE INDEX `eve_db_ramassemblylinetypedetailpercategory_assembly_line_type_id` ON `eve_db_ramassemblylinetypedetailpercategory` (`assembly_line_type_id`); After: CREATE INDEX `eve_db_ramassemblylinetypedetailpercategory_41787952` ON `eve_db_ramassemblylinetypedetailpercategory` (`assembly_line_type_id`);
May 2, 2010
Tested a complete import and didn't receive any errors. I think it's safe to close this issue. We can re-open it again if the final release of Django 1.2 breaks something again.
Status:
WontFix
|
Owner: snagglepants