Dear Django developers,
in a Django project that was created pre-1.7, did not use South before,
and was recently upgraded to Django 1.7 and is otherwise fine, I'm now
trying to convert it to use migrations, following the docs at
<https://docs.djangoproject.com/en/1.7/topics/migrations/#adding-migrations-to-apps>.
It seems that creating the initial migrations with `makemigrations`
works well, but the first run of `migrate` aborts with error
"django.db.utils.DatabaseError: ORA-00955: name is already used by an
existing object". Please see the full output below.
Unfortunately, I don't know enough about migrations to be able to debug
this myself, or to understand what the problem is.
What are good next steps, or where should I look for the cause of this
problem?
Best regards,
Carsten
(Zeiterfassung)carsten@blue-ring-ubuntu:~/Zeiterfassung$ rm -rf
Lori/migrations/
(Zeiterfassung)carsten@blue-ring-ubuntu:~/Zeiterfassung$ ./manage.py
makemigrations Lori
Migrations for 'Lori':
0001_initial.py:
- Create model AUB
- Create model Ausbezahlt
- Create model Aushilfslohn
- Create model Bereich
- Create model Code
- Create model Erfasst
- Create model KalenderEintrag
- Create model Kostenstelle
- Create model Mitarbeiter
- Create model MonatsSalden
- Create model Oeffnungszeiten
- Create model PekoBenchmarkCache
- Create model PekoGewichte
- Create model Region
- Create model Schicht
- Create model Status
- Create model SystemEmailEmpfaenger
- Create model TempMaBereichZuordnung
- Create model Termin
- Create model Umsatzgruppe
- Create model UserProfile
- Create model Vertragsverlauf
- Create model Vorblendplan
- Create model Vortraege
- Alter unique_together for schicht (1 constraint(s))
- Add field region to pekogewichte
- Add field fil_gruppe to pekobenchmarkcache
- Alter unique_together for pekobenchmarkcache (1 constraint(s))
- Alter unique_together for monatssalden (1 constraint(s))
- Add field tmp_bereiche to mitarbeiter
- Add field vbp_neu to mitarbeiter
- Add field fil_gruppe to kostenstelle
- Add field parent to kostenstelle
- Add field region to kostenstelle
- Add field kstellen to kalendereintrag
- Add field regionen to kalendereintrag
- Add field key to erfasst
- Add field last_user to erfasst
- Add field status to erfasst
- Alter unique_together for erfasst (1 constraint(s))
- Add field region to bereich
- Add field key to ausbezahlt
- Alter unique_together for ausbezahlt (1 constraint(s))
- Add field ma to aub
(Zeiterfassung)carsten@blue-ring-ubuntu:~/Zeiterfassung$ ./manage.py migrate
Operations to perform:
Apply all migrations: admin, contenttypes, Lori, auth, sessions
Running migrations:
Applying Lori.0001_initial...Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 385, in execute_from_command_line
utility.execute()
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/core/management/base.py",
line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/core/management/base.py",
line 338, in execute
output = self.handle(*args, **options)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
line 161, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 68, in migrate
self.apply_migration(migration, fake=fake)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
line 102, in apply_migration
migration.apply(project_state, schema_editor)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/migrations/migration.py",
line 108, in apply
operation.database_forwards(self.app_label, schema_editor,
project_state, new_state)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py",
line 36, in database_forwards
schema_editor.create_model(model)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/backends/schema.py",
line 261, in create_model
self.execute(sql, params)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/backends/schema.py",
line 102, in execute
cursor.execute(sql, params)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/backends/utils.py",
line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/backends/utils.py",
line 65, in execute
return self.cursor.execute(sql, params)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/utils.py",
line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/backends/utils.py",
line 65, in execute
return self.cursor.execute(sql, params)
File
"/home/carsten/.virtualenvs/Zeiterfassung/local/lib/python2.7/site-packages/django/db/backends/oracle/base.py",
line 916, in execute
return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-00955: name is already used by an
existing object
--
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+unsubscribe@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/54CFF116.1070606%40cafu.de.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment