BigAutoField not working

77 views
Skip to first unread message

Akshaya Krishnan

unread,
Jul 29, 2019, 12:34:45 PM7/29/19
to Django users
Hi all, 

I am trying to create a field in Django 2.2 with BigAutoField as the datatype. The backend is MySql. And I am using the mysql.connector. 

When I try to add datatype as BigAutoField for the column, I cannot see that column in my table.

If I alter it from 'AutoField' to 'BigAutoField', it throws an error:

ValueError: Cannot alter field TableName.columName into TableName.columName  - they do not properly define db_type (are you using a badly-written custom field?)


Thanks in advance



Chetan Ganji

unread,
Jul 29, 2019, 12:59:29 PM7/29/19
to django...@googlegroups.com
If you cant see it in your table in dbms, you probably have not run makemigrations and migrate commands.

If you have done that, you should grab the migration file when that field was first created and paste that code here. Also paste your old n new code from the models.py file. So that someone can help you.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2ab746fb-70c9-4979-a557-db83f39d00c7%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages