Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) create database and push the mysqldump in it
- 2) follow your steps 1-4
- 3) manage.py syncdb in old_osqa
- den@ev:~ > cd old_osqa
- den@ev:~/old_osqa > ./manage.py syncdb
- Creating table django_project_version
- Creating table django_evolution
- Creating table forum_keyvalue
- Creating table forum_markedtag
- Creating table forum_questionview
- Creating table forum_emailfeedsetting
- Creating table forum_validationhash
- Creating table forum_authkeyuserassociation
- Creating table forum_openidnonce
- Creating table forum_openidassociation
- Installing baseline version
- Installing index for django_evolution.Evolution model
- Installing index for forum.MarkedTag model
- Installing index for forum.QuestionView model
- Installing index for forum.EmailFeedSetting model
- Installing index for forum.ValidationHash model
- Installing index for forum.AuthKeyUserAssociation model
- den@ev:~/old_osqa > ./manage.py evolve --hint
- No evolution required.
- 4) steps 5-6, after syncdb 'evolution required' message displays. create_extended_user fails with unknown column errors:
- ...
- _mysql_exceptions.OperationalError: (1054, "Unknown column 'is_approved' in 'field list'") . alter table to pass the errors
- mysql> alter table auth_user add column is_approved boolean default false;
- mysql> alter table auth_user add column hide_ignored_questions boolean default true;
- mysql> alter table auth_user add column tag_filter_setting varchar(16) default 'ignored';
- re-run create_extended_user, fails with _mysql_exceptions.OperationalError: (1050, "Table 'forum_user' already exists")
- drop table forum_user, re-run create_extended_user. fails with _mysql_exceptions.OperationalError: (1005, "Can't create table 'dbname.forum_user' (errno: 150)")
- 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:
- _mysql_exceptions.OperationalError: (1054, "Unknown column 'is_approved' in 'field list'")
- den@ev:~/old_osqa > mysql -u tester -p dbname
- Enter password:
- Reading table information for completion of table and column names
- You can turn off this feature to get a quicker startup with -A
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 210
- Server version: 5.2.3-falcon-alpha-log Source distribution
- Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
- mysql> describe auth_user;
- +--------------+--------------+------+-----+---------+----------------+
- | Field | Type | Null | Key | Default | Extra |
- +--------------+--------------+------+-----+---------+----------------+
- | id | int(11) | NO | PRI | NULL | auto_increment |
- | username | varchar(30) | NO | UNI | | |
- | first_name | varchar(30) | NO | | | |
- | last_name | varchar(30) | NO | | | |
- | email | varchar(75) | NO | | | |
- | password | varchar(128) | NO | | | |
- | is_staff | tinyint(1) | NO | | | |
- | is_active | tinyint(1) | NO | | | |
- | is_superuser | tinyint(1) | NO | | | |
- | last_login | datetime | NO | | | |
- | date_joined | datetime | NO | | | |
- | use_uploaded | tinyint(1) | NO | | | |
- +--------------+--------------+------+-----+---------+----------------+
- 12 rows in set (0.01 sec)
- this is where i give up.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement