[Nodeshot] Updated, db won't sync?

Finn Herzfeld finn at seattlemesh.net
Thu Jun 5 06:45:56 CEST 2014


Hey there,
I ran a git pull, then tried to syncdb and migrate, but it error'd at
me. What should I do?

(nodeshot)nodeshot at keiko:~/projects/ninux$ python manage.py syncdb &&
python manage.py migrate
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 4 object(s) from 1 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.messages
 > django.contrib.staticfiles
 > django.contrib.gis
 > django_hstore
 > grappelli
 > filebrowser
 > django.contrib.admin
 > djcelery_email
 > nodeshot.core.api
 > nodeshot.core.layers
 > nodeshot.community.participation
 > nodeshot.community.notifications
 > nodeshot.community.profiles
 > nodeshot.community.mailing
 > nodeshot.networking.net
 > nodeshot.networking.links
 > nodeshot.networking.services
 > nodeshot.networking.hardware
 > nodeshot.networking.connectors
 > nodeshot.ui.default
 > nodeshot.open311
 > nodeshot.ui.open311_demo
 > rest_framework
 > rest_framework_swagger
 > olwidget
 > south
 > debug_toolbar
 > corsheaders
 > emailconfirmation
 > nodeshot.interoperability
 > nodeshot.core.websockets

Not synced (use migrations):
 - nodeshot.core.nodes
 - nodeshot.core.cms
 - reversion
 - social_auth
 - django_extensions
(use ./manage.py migrate to migrate these)
Running migrations for nodes:
- Nothing to migrate.
 - Loading initial data for nodes.
Installed 7 object(s) from 1 fixture(s)
Running migrations for cms:
 - Migrating forwards to
0002_auto__add_field_menuitem_classes__add_field_menuitem_parent.
 > cms:0001_initial
FATAL ERROR - The following SQL query failed: CREATE TABLE "cms_page"
("id" serial NOT NULL PRIMARY KEY, "added" timestamp with time zone NOT
NULL, "u
pdated" timestamp with time zone NOT NULL, "access_level" smallint NOT
NULL, "title" varchar(50) NOT NULL, "slug" varchar(50) NOT NULL UNIQUE,
"conten
t" text NOT NULL, "is_published" boolean NOT NULL, "meta_description"
varchar(255) NOT NULL, "meta_keywords" varchar(255) NOT NULL,
"meta_robots" varc
har(50) NOT NULL)
The error was: relation "cms_page" already exists

Error in migration: cms:0001_initial
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 399, in execute_from_command_line
    utility.execute()
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/core/management/base.py",
line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/core/management/base.py",
line 285, in execute
    output = self.handle(*args, **options)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/management/commands/migrate.py",
line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/__init__.py",
line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 254, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target,
migrations, database)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 329, in migrate_many
    result = self.migrate(migration, database)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 133, in migrate
    result = self.run(migration, database)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 114, in run
    return self.run_migration(migration, database)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 84, in run_migration
    migration_function()
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/migration/migrators.py",
line 60, in <lambda>
    return (lambda: direction(orm))
  File "/opt/nodeshot/nodeshot/core/cms/migrations/0001_initial.py",
line 23, in forwards
    ('meta_robots',
self.gf('django.db.models.fields.CharField')(default='index, follow',
max_length=50)),
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/db/generic.py",
line 47, in _cache_clear
    return func(self, table, *args, **opts)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/db/generic.py",
line 361, in create_table
    "columns": ', '.join([col for col in columns if col]),
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/south/db/generic.py",
line 282, in execute
    cursor.execute(sql, params)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/db/backends/util.py",
line 53, in execute
    return self.cursor.execute(sql, params)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/db/utils.py",
line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File
"/opt/nodeshot/local/lib/python2.7/site-packages/django/db/backends/util.py",
line 53, in execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "cms_page" already exists

(nodeshot)nodeshot at keiko:~/projects/ninux$

How should I proceed? I'm relative new at Django...

-- 
Finn Herzfeld
Seattle Meshnet Project


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://ml.ninux.org/pipermail/nodeshot/attachments/20140604/8660d5f4/attachment-0001.sig>


More information about the Nodeshot mailing list