Hello;
I have a model with a CharField which is used as primary key:
class MyModel( Model ):
string_id = CharField("StringID" , primary_key = True )
I would now like to migrate this model to have a normal integer AutoField as primary key, and the string_id field should just be a unique string:
class MyModel( Model ):
int_id = AutoField( primary_key = True )
string_id = CharField( "StringID", unique = True )
I have tried several ways of doing this, but it either fails in the 'makemigrations' step, or when I try to apply the migration. Any tips?
Joakim