While trying to configure Merengue CMS + Django on Opensuse , I got stuck here. The instant I run the "python manage.py migrate" it started giving error (1005 "Can't create table 'nameofdb.#sql-*****' errno: 121" ).After checking INNODB(MySql engine) status I found out that it is because of violation of some Foreign Key constraints.
As the Django uses MYISM as the default engine it was having problems migrating the tables in Mysql 5.5 as the default engine in Mysql 5.5 is INNODB.
After doing a lot of googling , the solutions I tried out are as follows:-
1). In the settings.py script
DATABASE_OPTIONS={'init_command': 'SET storage_engine=INNODB',}.
Though it didnot work out for me.
2). ALTER TABLE <tablename> ENGINE=INNODB;
Though it is worst solution as it was having too many tables, but i did it after doing the migration, though it started the server, but it showed 500 Internal server error.
3). The solution provided by the Django community https://code.djangoproject.com/wiki/AlterModelOnSyncDB. I copied the whole code in __init.py. But nothing changed.
After spending lot of time I am still trying to find out the solution. Folks do provide your solutions.
In the meantime I am switching to Mezannine:-)
As the Django uses MYISM as the default engine it was having problems migrating the tables in Mysql 5.5 as the default engine in Mysql 5.5 is INNODB.
After doing a lot of googling , the solutions I tried out are as follows:-
1). In the settings.py script
DATABASE_OPTIONS={'init_command': 'SET storage_engine=INNODB',}.
Though it didnot work out for me.
2). ALTER TABLE <tablename> ENGINE=INNODB;
Though it is worst solution as it was having too many tables, but i did it after doing the migration, though it started the server, but it showed 500 Internal server error.
3). The solution provided by the Django community https://code.djangoproject.com/wiki/AlterModelOnSyncDB. I copied the whole code in __init.py. But nothing changed.
After spending lot of time I am still trying to find out the solution. Folks do provide your solutions.
In the meantime I am switching to Mezannine:-)
I got the same error for easy_thumbnails, turned out it was a bug in South 0.7.3. I would suggest using south maybe it would eliminate this error.
ReplyDeleteThank Emanuael. It's long I Know, but I should tell you that South works. Thanks.
Delete