This is my first stab at upgrading directly from Django 1.6.11 to 1.81c
to see what needs to be done. I thought I'd skip 1.7.x - is that a bad
idea? Is there some step in 1.7.x which eases the path to 1.8.x?
On first starting the project up using runserver on localhost it advises:
Python: 3.4
Django: 1.8c1
Database: ssds.climate.com.au
Postgres: 9.1
16:18:54
Performing system checks...
System check identified no issues (0 silenced).
You have unapplied migrations; your app may not work properly until they
are applied.
Run 'python manage.py migrate' to apply them.
See below. Not sure where to go from here. Any ideas?
Thanks
Mike
On running manage.py migrate it returns a ProgrammingError as follows:
(xxex3) C:\Users\mike\env\xxex3\ssds>python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: admindocs, messages, credit, refer,
company, workplace, staticfiles, substance, common
Apply all migrations: contenttypes, sessions, auth, sites, admin
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial...Traceback (most recent call last):
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\utils.py",
line 62, in execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: relation "django_content_type" already exists
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 24, in <module>
execute_from_command_line(sys.argv)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\management\__init__.py",
line 338, in execute_from_command_line
utility.execute()
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\management\__init__.py",
line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\management\base.py",
line 390, in run_from_argv
self.execute(*args, **cmd_options)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\management\base.py",
line 441, in execute
output = self.handle(*args, **options)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\core\management\commands\migrate.py",
line 221, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\migrations\executor.py",
line 94, in migrate
self.apply_migration(states[migration], migration, fake=fake,
fake_initial=fake_initial)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\migrations\executor.py",
line 131, in apply_migration
state = migration.apply(state, schema_editor)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\migrations\migration.py",
line 111, in apply
operation.database_forwards(self.app_label, schema_editor,
old_state, project_state)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\migrations\operations\models.py",
line 59, in database_forwards
schema_editor.create_model(model)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\base\schema.py",
line 282, in create_model
self.execute(sql, params or None)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\base\schema.py",
line 107, in execute
cursor.execute(sql, params)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\utils.py",
line 64, in execute
return self.cursor.execute(sql, params)
File "C:\Users\mike\env\xxex3\lib\site-packages\django\db\utils.py",
line 97, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Users\mike\env\xxex3\lib\site-packages\django\utils\six.py",
line 658, in reraise
raise value.with_traceback(tb)
File
"C:\Users\mike\env\xxex3\lib\site-packages\django\db\backends\utils.py",
line 62, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation "django_content_type" already
exists
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/5510FD64.2040901%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.