I am using django 1.8.1 and trying to extend the length of auth_user name field from one of my apps. Before, with south, I could just target the app with an underscore like so:
db.alter_column('auth_group', 'name', models.CharField(max_length=120, null=False, blank=False))
However, in django 1.8, I don't see a way to do this as django putts the app name in the sql withing the source code. I don't want to edit django source code so I have no way of changing that. my current attemp is here:
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
]
operations = [
migrations.AlterField('auth_group', 'name', field=models.CharField(max_length=120, null=False, blank=False)),
]
Please help. I don't want to edit django source code and I only want to do migrations.RunSQL as a last resort.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…