<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/05/2014 06:45 AM, Finn Herzfeld
wrote:<br>
</div>
<blockquote cite="mid:538FF604.4070804@seattlemesh.net" type="cite">
<pre wrap="">Hey there,
I ran a git pull, then tried to syncdb and migrate, but it error'd at
me. What should I do?</pre>
</blockquote>
This should probably work:<br>
<br>
python manage.py migrate --all --fake 0001<br>
<br>
Stefano<br>
<br>
<blockquote cite="mid:538FF604.4070804@seattlemesh.net" type="cite">
<pre wrap="">
(nodeshot)nodeshot@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@keiko:~/projects/ninux$
How should I proceed? I'm relative new at Django...
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Nodeshot mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nodeshot@ml.ninux.org">Nodeshot@ml.ninux.org</a>
<a class="moz-txt-link-freetext" href="http://ml.ninux.org/mailman/listinfo/nodeshot">http://ml.ninux.org/mailman/listinfo/nodeshot</a>
</pre>
</blockquote>
<br>
</body>
</html>