﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24058	Sequence is dropped from AutoIncrement field on postgre when changing verbose name	hakib	nobody	"After adding `verbose_name` to an id field with auto increment I started getting errors on null PK. Further investigation reviled that after applying migration the id column was altered in a way that caused the sequence to be dropped. As far as i can tell this is an issue only on postgre.  

Altering the id field manually to associate the sequence solved the problem.

On my dev machine using sqlite this issue is not happening.

{{{
class MyModel(models.Model):
	id = models.AutoField(primary_key=True)
	name = models.TextField(null=False,blank=False)

./manage.py makemigrations app
./manage.py migrate app

class MyModel(models.Model):
	id = models.AutoField(primary_key=True, verbose_name='Identity')
	name = models.TextField(null=False,blank=False)

./manage.py makemigrations app
./manage.py migrate app

manage.py shell
o = MyModel.objects.create(name='Will fail on NN constraint')
}}}

Python 2.7, Django 1.7, Postgresql 9.2"	Bug	closed	Uncategorized	1.7	Normal	duplicate	migration, postgre		Unreviewed	0	0	0	0	0	0
