#25133: Changing a PositiveIntegerField to an IntegerField does not remove >=0
check in migration
-------------------------------------+-------------------------------------
     Reporter:  jproffitt            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Migrations           |                  Version:  1.8
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  migrations,          |             Triage Stage:
  postgres                           |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by charettes):

 * cc: charettes, jproffitt (added)
 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Hi jproffitt,

 I still can't reproduce on Python 2.7 with Django 1.8.4.

 The constraint is effectively dropped if I run your exact testcase in
 isolation. Here's the output of `sqlmigrate` for the two migrations.

 `0001_initial`
 {{{#!sql
 BEGIN;
 CREATE TABLE "ticket_25133_foo" ("id" serial NOT NULL PRIMARY KEY, "num"
 integer NULL CHECK ("num" >= 0));

 COMMIT;
 }}}

 `0002_auto_...`
 {{{#!sql
 BEGIN;
 ALTER TABLE "ticket_25133_foo" DROP CONSTRAINT
 "ticket_25133_foo_num_6f290808d3aecee4_check";

 COMMIT;
 }}}

 What does `sqlmigrate` yield for your second migration?

--
Ticket URL: <https://code.djangoproject.com/ticket/25133#comment:3>
Django <https://code.djangoproject.com/>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.3465c7a65251f6cbe3321c1286178447%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to