Ticket #385 (closed defect: worksforme)
First migrate after initial set up
|Reported by:||anonymous||Owned by:||andrew|
The commands I've run (removing corporate information):
Creating table south_migrationhistory
Installed 3 object(s) from 1 fixture(s)
Not synced (use migrations):
(use ./manage.py migrate to migrate these)
$ ./manage.py startmigration foo.bar --initial
Creating migrations directory at '/var/www/foobar.com/trunk/foobar/foo/bar/migrations'...
Creating init.py in '/var/www/foobar.com/trunk/foobar/foo/bar/migrations'...
+ Added model 'bar.ModelName?'
+ Added model 'bar.ModelName2'
$ ./manage.py migrate foo.bar
Running migrations for bar:
- Migrating forwards to 0001_initial.
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
File "/usr/local/lib/python2.5/site-packages/django/core/management/init.py", line 438, in execute_manager
File "/usr/local/lib/python2.5/site-packages/django/core/management/init.py", line 379, in execute
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 195, in run_from_argv
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 222, in execute
output = self.handle(*args, options)
File "/usr/local/lib/python2.5/site-packages/south/management/commands/migrate.py", line 91, in handle
skip = skip,
File "/usr/local/lib/python2.5/site-packages/south/migration.py", line 586, in migrate_app
File "/usr/local/lib/python2.5/site-packages/south/db/generic.py", line 678, in send_pending_create_signals
File "/usr/local/lib/python2.5/site-packages/south/db/generic.py", line 718, in really_send_create_signal
File "/usr/local/lib/python2.5/site-packages/django/dispatch/dispatcher.py", line 166, in send
response = receiver(signal=self, sender=sender, named)
File "/usr/local/lib/python2.5/site-packages/django/contrib/contenttypes/management.py", line 10, in update_contenttypes
db = kwargsdb?
I've removed the tables, including the South table. Removed the migrations dir. And started from scratch.
With the same result.
If I make a change to the model:
./manage.py migrate foo.bar
Running migrations for bar:
- Migrating forwards to 0002_extend_bar.
- Loading initial data for foo.
Error: One or more models did not validate:
auth.user: 'groups' specifies an m2m relation through model <class 'django.contrib.auth.models.user_groups'>, which has not been installed.
auth.user: 'user_permissions' specifies an m2m relation through model <class 'django.contrib.auth.models.user_user_permissions'>, which has not been installed.
auth.group: 'permissions' specifies an m2m relation through model <class 'django.contrib.auth.models.group_permissions'>, which has not been installed.
Installed apps has 'django.contrib.auth'.
My models.py has this:
from django.contrib.auth.models import User
class Bar (models.Model):
user = models.ForeignKey?(User)
- Status changed from infoneeded to closed
- Resolution set to worksforme