33
44from django .db import models , migrations
55import jsonfield .fields
6- import uuidfield . fields
6+ import uuid
77
88
99class Migration (migrations .Migration ):
@@ -15,18 +15,17 @@ class Migration(migrations.Migration):
1515 migrations .CreateModel (
1616 name = 'Job' ,
1717 fields = [
18- ('id' , uuidfield . fields . UUIDField (primary_key = True , serialize = False , editable = False , max_length = 32 , blank = True , unique = True , db_index = True )),
19- ('created' , models .DateTimeField (auto_now_add = True , db_index = True )),
18+ ('id' , models . UUIDField (serialize = False , editable = False , default = uuid . uuid4 , primary_key = True )),
19+ ('created' , models .DateTimeField (db_index = True , auto_now_add = True )),
2020 ('modified' , models .DateTimeField (auto_now = True )),
2121 ('name' , models .CharField (max_length = 100 )),
22- ('state' , models .CharField (default = b'NEW' , max_length = 20 , db_index = True , choices = [(b 'NEW' , b 'NEW' ), (b 'READY' , b 'READY' ), (b 'PROCESSING' , b 'PROCESSING' ), (b 'FAILED' , b 'FAILED' ), (b 'COMPLETE' , b 'COMPLETE' )])),
22+ ('state' , models .CharField (db_index = True , max_length = 20 , default = 'NEW' , choices = [('NEW' , 'NEW' ), ('READY' , 'READY' ), ('PROCESSING' , 'PROCESSING' ), ('FAILED' , 'FAILED' ), ('COMPLETE' , 'COMPLETE' )])),
2323 ('next_task' , models .CharField (max_length = 100 , blank = True )),
2424 ('workspace' , jsonfield .fields .JSONField (null = True )),
25- ('queue_name' , models .CharField (default = b'default' , max_length = 20 , db_index = True )),
25+ ('queue_name' , models .CharField (db_index = True , max_length = 20 , default = 'default' )),
2626 ],
2727 options = {
2828 'ordering' : ['-created' ],
2929 },
30- bases = (models .Model ,),
3130 ),
3231 ]
0 commit comments