You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, on a clean install, I am having issues with migrations and loading test data.
After doing syncdb, I get the following message:
Not synced (use migrations):
- badge
- project
- media
- p2pu_user
(use ./manage.py migrate to migrate these)
After running migrations I get:
> badge:0006_adding_featured_badges
- Migration 'badge:0006_adding_featured_badges' is marked for no-dry-run.
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had
! to leave it in an interim state between migrations.
[...]
in get
return self.get_query_set().get(*args, **kwargs)
File "/Users/jos/.venvs/badges/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
% self.model._meta.object_name)
badge.models.DoesNotExist: Badge matching query does not exist.
Skipping migrations and going directly to load test data I get:
File "/Users/jos/.venvs/badges/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 344, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: p2pu_user_user
Finally, loading the app in the browser I get:
Request Method: GET
Request URL: http://127.0.0.1:8000/en/
Django Version: 1.4.5
Exception Type: DatabaseError
Exception Value:
no such table: badge_badge
There seems to be a problem with table names; will dig in a bit more, but not sure how much I can do. This is a new install, with a new virtualenv only used for this project, on mac osx 10.8.3 and python 2.7.2
Thanks!
The text was updated successfully, but these errors were encountered:
It turns out that migration 0006 in badge is looking for a few hardcoded PKs to make those badges featuredbadges_pk_list = [36, 22, 47, 27, 8].
I guess this is used in the production system? Not sure what you guys want to do with it, but I'd say it shouldn't be part of the migrations. It won't work unless the right data is entered, right?
yes the 0006 migration is actually providing me with some featured badges that we are presenting on the home page. Since the request was quite clear on which these badges should be I just made an migration.
Meanwhile I myself had an issue with it and was doing the code refactorization just the other day. So fix for this issue will come up today indeed.
Hi guys, on a clean install, I am having issues with migrations and loading test data.
After doing syncdb, I get the following message:
After running migrations I get:
Skipping migrations and going directly to load test data I get:
Finally, loading the app in the browser I get:
There seems to be a problem with table names; will dig in a bit more, but not sure how much I can do. This is a new install, with a new virtualenv only used for this project, on mac osx 10.8.3 and python 2.7.2
Thanks!
The text was updated successfully, but these errors were encountered: