Skip to content

Commit

Permalink
Make migration to uuid more robust
Browse files Browse the repository at this point in the history
Instead of changing the id field, remove it and recreate it as a uuid.
This shouldn't be a problem, since the external API isn't dependent on
ids.
  • Loading branch information
nielsvanoch committed Nov 15, 2015
1 parent 5133d68 commit da8d03a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class Migration(migrations.Migration):
]

operations = [
migrations.AlterField(
migrations.RemoveField(
model_name='nonblockinglock',
name='id',
),
migrations.AddField(
model_name='nonblockinglock',
name='id',
field=models.UUIDField(default=uuid.uuid4, serialize=False, editable=False, primary_key=True),
Expand Down

0 comments on commit da8d03a

Please sign in to comment.