As the order field is unique, you'll need to add the field in several migration steps, replacing the original operations in your migration:
Add a nullable field, set the default to NULL.
Set the field to a unique value in each row.
Add a NOT NULL constraint.
You can use something like this:
operations = [
migrations.AddField('myapp.MyModel', 'order', models.PositiveIntegerField(null=True, unique=True)),
migrations.RunPython(set_order),
migrations.AlterField('myapp.MyModel', 'order', models.PositiveIntegerField(blank=True, unique=True)),
]