Advertisement
Guest User

django evolution

a guest
May 17th, 2010
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. 1) create database and push the mysqldump in it
  2. 2) follow your steps 1-4
  3. 3) manage.py syncdb in old_osqa
  4.  
  5. den@ev:~ > cd old_osqa
  6. den@ev:~/old_osqa > ./manage.py syncdb
  7. Creating table django_project_version
  8. Creating table django_evolution
  9. Creating table forum_keyvalue
  10. Creating table forum_markedtag
  11. Creating table forum_questionview
  12. Creating table forum_emailfeedsetting
  13. Creating table forum_validationhash
  14. Creating table forum_authkeyuserassociation
  15. Creating table forum_openidnonce
  16. Creating table forum_openidassociation
  17. Installing baseline version
  18. Installing index for django_evolution.Evolution model
  19. Installing index for forum.MarkedTag model
  20. Installing index for forum.QuestionView model
  21. Installing index for forum.EmailFeedSetting model
  22. Installing index for forum.ValidationHash model
  23. Installing index for forum.AuthKeyUserAssociation model
  24. den@ev:~/old_osqa > ./manage.py evolve --hint
  25. No evolution required.
  26.  
  27. 4) steps 5-6, after syncdb 'evolution required' message displays. create_extended_user fails with unknown column errors:
  28. ...
  29. _mysql_exceptions.OperationalError: (1054, "Unknown column 'is_approved' in 'field list'") . alter table to pass the errors
  30.  
  31. mysql> alter table auth_user add column is_approved boolean default false;
  32. mysql> alter table auth_user add column hide_ignored_questions boolean default true;
  33. mysql> alter table auth_user add column tag_filter_setting varchar(16) default 'ignored';
  34.  
  35. re-run create_extended_user, fails with _mysql_exceptions.OperationalError: (1050, "Table 'forum_user' already exists")
  36. drop table forum_user, re-run create_extended_user. fails with _mysql_exceptions.OperationalError: (1005, "Can't create table 'dbname.forum_user' (errno: 150)")
  37. seems that error was: table auth_user's type was myisam, referencing table forum_user's was to be innodb. modified the script and re-run. got the following error:
  38.  
  39.  
  40. _mysql_exceptions.OperationalError: (1054, "Unknown column 'is_approved' in 'field list'")
  41. den@ev:~/old_osqa > mysql -u tester -p dbname
  42. Enter password:
  43. Reading table information for completion of table and column names
  44. You can turn off this feature to get a quicker startup with -A
  45.  
  46. Welcome to the MySQL monitor. Commands end with ; or \g.
  47. Your MySQL connection id is 210
  48. Server version: 5.2.3-falcon-alpha-log Source distribution
  49.  
  50. Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
  51.  
  52. mysql> describe auth_user;
  53. +--------------+--------------+------+-----+---------+----------------+
  54. | Field | Type | Null | Key | Default | Extra |
  55. +--------------+--------------+------+-----+---------+----------------+
  56. | id | int(11) | NO | PRI | NULL | auto_increment |
  57. | username | varchar(30) | NO | UNI | | |
  58. | first_name | varchar(30) | NO | | | |
  59. | last_name | varchar(30) | NO | | | |
  60. | email | varchar(75) | NO | | | |
  61. | password | varchar(128) | NO | | | |
  62. | is_staff | tinyint(1) | NO | | | |
  63. | is_active | tinyint(1) | NO | | | |
  64. | is_superuser | tinyint(1) | NO | | | |
  65. | last_login | datetime | NO | | | |
  66. | date_joined | datetime | NO | | | |
  67. | use_uploaded | tinyint(1) | NO | | | |
  68. +--------------+--------------+------+-----+---------+----------------+
  69. 12 rows in set (0.01 sec)
  70.  
  71. this is where i give up.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement