I need to change the id field size on an oracle database to support storing longer id's. By default using the UUIDField in django creates a table with varchar field of 32 bytes but we now need it to store ids generated by uuid.uui4 and of supplied id's of character lengths up to 80. What is the least hacky way to do this in django so that the migrations are consistent across environments while keeping foreign key relationships in other models?
class CurrentModel(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
class desiredModel(models.Model):
id = models.CharField(max_length=80, primary_key=True, default=uuid.uuid4)
This was the change we made but oracle throws an error when applying the migration django.db.utils.DatabaseError: ORA-01430: column being added already exists in table