[Django] #25043: Contenttype migration issue with django 1.8 (postgres)

12 views
Skip to first unread message

Django

unread,
Jul 1, 2015, 8:56:29 AM7/1/15
to django-...@googlegroups.com
#25043: Contenttype migration issue with django 1.8 (postgres)
--------------------------------------+-------------------------
Reporter: sachinvettithanam | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.contenttypes | Version: 1.8
Severity: Normal | Keywords: contenttype
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+-------------------------
contenttypes migration error while migrating from existing database (which
was from django1.4.10), issue can be resolved if we downgrade to 1.7 and
migrate

Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying asset.0003_subcostcenterw... OK
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/core/management/__init__.py", line 338, in
execute_from_command_line
utility.execute()
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/core/management/commands/migrate.py", line 225, in handle
emit_post_migrate_signal(created_models, self.verbosity,
self.interactive, connection.alias)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/core/management/sql.py", line 280, in
emit_post_migrate_signal
using=db)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/dispatch/dispatcher.py", line 201, in send
response = receiver(signal=self, sender=sender, **named)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/contrib/auth/management/__init__.py", line 82, in
create_permissions
ctype = ContentType.objects.db_manager(using).get_for_model(klass)
File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7/site-
packages/django/contrib/contenttypes/models.py", line 78, in get_for_model
"Error creating new content types. Please make sure contenttypes "
RuntimeError: Error creating new content types. Please make sure
contenttypes is migrated before trying to migrate apps individually.

--
Ticket URL: <https://code.djangoproject.com/ticket/25043>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 1, 2015, 8:58:43 AM7/1/15
to django-...@googlegroups.com
#25043: Contenttype migration issue with django 1.8 (postgres)
-------------------------------------+-------------------------------------
Reporter: sachinvettithanam | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: | Version: 1.8
contrib.contenttypes |
Severity: Normal | Resolution:

Keywords: contenttype | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sachinvettithanam):

* needs_docs: => 0
* needs_tests: => 0
* needs_better_patch: => 0


Old description:

> contenttypes migration error while migrating from existing database
> (which was from django1.4.10), issue can be resolved if we downgrade to
> 1.7 and migrate
>
> Synchronizing apps without migrations:
> Creating tables...
> Running deferred SQL...
> Installing custom SQL...
> Running migrations:
> Rendering model states... DONE
> Applying asset.0003_subcostcenterw... OK
> Traceback (most recent call last):
> File "./manage.py", line 10, in <module>
> execute_from_command_line(sys.argv)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7
> /site-packages/django/core/management/__init__.py", line 338, in
> execute_from_command_line
> utility.execute()
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/core/management/__init__.py", line 330, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7
> /site-packages/django/core/management/base.py", line 390, in


> run_from_argv
> self.execute(*args, **cmd_options)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/core/management/base.py", line 441, in execute


> output = self.handle(*args, **options)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/core/management/commands/migrate.py", line 225, in


> handle
> emit_post_migrate_signal(created_models, self.verbosity,
> self.interactive, connection.alias)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7
> /site-packages/django/core/management/sql.py", line 280, in
> emit_post_migrate_signal
> using=db)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/dispatch/dispatcher.py", line 201, in send


> response = receiver(signal=self, sender=sender, **named)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/contrib/auth/management/__init__.py", line 82, in


> create_permissions
> ctype = ContentType.objects.db_manager(using).get_for_model(klass)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/contrib/contenttypes/models.py", line 78, in


> get_for_model
> "Error creating new content types. Please make sure contenttypes "
> RuntimeError: Error creating new content types. Please make sure
> contenttypes is migrated before trying to migrate apps individually.

New description:

--

--
Ticket URL: <https://code.djangoproject.com/ticket/25043#comment:1>

Django

unread,
Jul 1, 2015, 9:38:06 AM7/1/15
to django-...@googlegroups.com
#25043: Contenttype migration issue with django 1.8 (postgres)
-------------------------------------+-------------------------------------
Reporter: sachinvettithanam | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: | Version: 1.8
contrib.contenttypes |
Severity: Normal | Resolution: invalid

Keywords: contenttype | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => invalid


Old description:

> contenttypes migration error while migrating from existing database
> (which was from django1.4.10), issue can be resolved if we downgrade to
> 1.7 and migrate
>

> Synchronizing apps without migrations:
> Creating tables...
> Running deferred SQL...
> Installing custom SQL...
> Running migrations:
> Rendering model states... DONE
> Applying asset.0003_subcostcenterw... OK
> Traceback (most recent call last):
> File "./manage.py", line 10, in <module>
> execute_from_command_line(sys.argv)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7
> /site-packages/django/core/management/__init__.py", line 338, in
> execute_from_command_line
> utility.execute()
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/core/management/__init__.py", line 330, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7
> /site-packages/django/core/management/base.py", line 390, in


> run_from_argv
> self.execute(*args, **cmd_options)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/core/management/base.py", line 441, in execute


> output = self.handle(*args, **options)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/core/management/commands/migrate.py", line 225, in


> handle
> emit_post_migrate_signal(created_models, self.verbosity,
> self.interactive, connection.alias)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7
> /site-packages/django/core/management/sql.py", line 280, in
> emit_post_migrate_signal
> using=db)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/dispatch/dispatcher.py", line 201, in send


> response = receiver(signal=self, sender=sender, **named)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/contrib/auth/management/__init__.py", line 82, in


> create_permissions
> ctype = ContentType.objects.db_manager(using).get_for_model(klass)
> File "/Users/sachinvettithanam/env/marlabs-onconsole/lib/python2.7

> /site-packages/django/contrib/contenttypes/models.py", line 78, in


> get_for_model
> "Error creating new content types. Please make sure contenttypes "
>
> RuntimeError: Error creating new content types. Please make sure
> contenttypes is migrated before trying to migrate apps individually.

New description:

--

Comment:

Please see TicketClosingReasons/UseSupportChannels.

There's [https://groups.google.com/forum/#!topic/django-
users/DlRQOdsJL6o/discussion a thread on django-users] about the problem
you are having.

--
Ticket URL: <https://code.djangoproject.com/ticket/25043#comment:2>

Reply all
Reply to author
Forward
0 new messages