#25133: Changing a PositiveIntegerField to an IntegerField does not remove >=0 check in migration ----------------------------+---------------------------------- Reporter: jproffitt | Owner: nobody Type: Bug | Status: new Component: Migrations | Version: 1.7 Severity: Normal | Keywords: migrations, postgres Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------+---------------------------------- When you change a `PositiveIntegerField` to just an `IntegerField`, the >=0 database check in postgres is not removed when running the migration.
Initial migration: {{{ ('year', models.PositiveIntegerField(blank=True, null=True,)), }}} Alter migration: {{{ migrations.AlterField( model_name='art', name='year', field=models.IntegerField(blank=True, null=True), preserve_default=True, ), }}} I'm left with having to do a `RunSQL` operation to remove the constraint. -- Ticket URL: <https://code.djangoproject.com/ticket/25133> 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 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/052.2934d0a1d13970f5bb65a440d83bbbad%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.