Re: [Django] #21958: Migrations fail on adding ForeignKey field to User model

2014-04-01 Thread Django
#21958: Migrations fail on adding ForeignKey field to User model
-+-
 Reporter:  code22   |Owner:  Andrew
 Type:  Bug  |  Godwin 
Component:  Migrations   |   Status:  closed
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-alpha-1
Has patch:  0|   Resolution:  fixed
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by andrewgodwin):

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


Comment:

 Please open a new ticket and explain the bug more fully; it's the not the
 same as this bug, so please don't re-open it unless you've found the same
 problem as before.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.2c2e7920d4050f919533eb8f47883d39%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21958: Migrations fail on adding ForeignKey field to User model

2014-04-01 Thread Django
#21958: Migrations fail on adding ForeignKey field to User model
-+-
 Reporter:  code22   |Owner:  Andrew
 Type:  Bug  |  Godwin 
Component:  Migrations   |   Status:  new
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-alpha-1
Has patch:  0|   Resolution:
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by snanda85@…):

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


Comment:

 Dependency handling should also be done for "NOT NULL fields with no
 default"

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e51a50e454dd85411928a5dadda2b864%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21958: Migrations fail on adding ForeignKey field to User model

2014-02-09 Thread Django
#21958: Migrations fail on adding ForeignKey field to User model
-+-
 Reporter:  code22   |Owner:  Andrew
 Type:  Bug  |  Godwin 
Component:  Migrations   |   Status:  closed
 Severity:  Release blocker  |  Version:
 Keywords:   |  1.7-alpha-1
Has patch:  0|   Resolution:  fixed
  Needs tests:  0| Triage Stage:  Accepted
Easy pickings:  0|  Needs documentation:  0
 |  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by Andrew Godwin ):

 * owner:   => Andrew Godwin 
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"11c021336c8cb1c92be998f1a44c89a746275107"]:
 {{{
 #!CommitTicketReference repository=""
 revision="11c021336c8cb1c92be998f1a44c89a746275107"
 Fixed #21958: Handle dependencies for swappable models in AddField
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.cc2b26ceea338e6cf616c62322824df8%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21958: Migrations fail on adding ForeignKey field to User model

2014-02-08 Thread Django
#21958: Migrations fail on adding ForeignKey field to User model
-+---
 Reporter:  code22   |Owner:
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-alpha-1
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * stage:  Unreviewed => Accepted
 * severity:  Normal => Release blocker
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 This looks like a bug with swappable models.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.6a7f799bfd86e5a6418930cb01b1eab1%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21958: Migrations fail on adding ForeignKey field to User model

2014-02-05 Thread Django
#21958: Migrations fail on adding ForeignKey field to User model
+-
 Reporter:  code22  |  Owner:
 Type:  Bug | Status:  new
Component:  Migrations  |Version:  1.7-alpha-1
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+-
 It seems that migrations have problems with adding columns with foreign
 key to User tables. This happens both if I use `settings.AUTH_USER_MODEL`
 and `django.contrib.auth.model.User`.

 My model looked like this:
 {{{#!python
 class TestModel(models.Model):

 text = models.CharField(max_length=10)
 }}}
 so if I add User field
 {{{#!python
 class TestModel(models.Model):

 text = models.CharField(max_length=10)
 user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True)
 }}}

 then run `manage.py makemigrations` and then `manage.py migrate` I get
 this:
 {{{
 Operations to perform:
   Synchronize unmigrated apps: admin, contenttypes, auth, sessions
   Apply all migrations: migr_test
 Synchronizing apps without migrations:
   Creating tables...
   Installing custom SQL...
   Installing indexes...
 Installed 0 object(s) from 0 fixture(s)
 Running migrations:
   Applying migr_test.0002_testmodel_user...Traceback (most recent call
 last):
   File "./manage.py", line 10, in 
 execute_from_command_line(sys.argv)
   File
 "/private/tmp/test_env/src/django/django/core/management/__init__.py",
 line 427, in execute_from_command_line
 utility.execute()
   File
 "/private/tmp/test_env/src/django/django/core/management/__init__.py",
 line 419, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/private/tmp/test_env/src/django/django/core/management/base.py",
 line 288, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/private/tmp/test_env/src/django/django/core/management/base.py",
 line 337, in execute
 output = self.handle(*args, **options)
   File
 "/private/tmp/test_env/src/django/django/core/management/commands/migrate.py",
 line 145, in handle
 executor.migrate(targets, plan, fake=options.get("fake", False))
   File
 "/private/tmp/test_env/src/django/django/db/migrations/executor.py", line
 60, in migrate
 self.apply_migration(migration, fake=fake)
   File
 "/private/tmp/test_env/src/django/django/db/migrations/executor.py", line
 94, in apply_migration
 migration.apply(project_state, schema_editor)
   File
 "/private/tmp/test_env/src/django/django/db/migrations/migration.py", line
 97, in apply
 operation.database_forwards(self.app_label, schema_editor,
 project_state, new_state)
   File
 "/private/tmp/test_env/src/django/django/db/migrations/operations/fields.py",
 line 35, in database_forwards
 field,
   File
 "/private/tmp/test_env/src/django/django/db/backends/sqlite3/schema.py",
 line 96, in add_field
 self._remake_table(model, create_fields=[field])
   File
 "/private/tmp/test_env/src/django/django/db/backends/sqlite3/schema.py",
 line 33, in _remake_table
 if field.get_default():
   File
 "/private/tmp/test_env/src/django/django/db/models/fields/related.py",
 line 1649, in get_default
 if isinstance(field_default, self.rel.to):
 TypeError: isinstance() arg 2 must be a class, type, or tuple of classes
 and types
 }}}

 Used Python3.3.3 and Python2.7.6 with the same result

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.928b92c91eb42bc9aa405e84087a9a16%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.