1- # -*- coding: utf-8 -*-
2- from __future__ import unicode_literals
1+ # Generated by Django 3.2rc1 on 2021-04-05 14:31
32
4- from django .db import models , migrations
5- import jsonfield .fields
3+ from django .db import migrations , models
64import uuid
75
8- from django .db .models import UUIDField
9-
106
117class Migration (migrations .Migration ):
128
9+ initial = True
10+
1311 dependencies = []
1412
1513 operations = [
@@ -18,38 +16,39 @@ class Migration(migrations.Migration):
1816 fields = [
1917 (
2018 "id" ,
21- UUIDField (
22- serialize = False ,
23- editable = False ,
19+ models .UUIDField (
2420 default = uuid .uuid4 ,
21+ editable = False ,
2522 primary_key = True ,
23+ serialize = False ,
2624 ),
2725 ),
28- ("created" , models .DateTimeField (db_index = True , auto_now_add = True )),
26+ ("created" , models .DateTimeField (auto_now_add = True , db_index = True )),
2927 ("modified" , models .DateTimeField (auto_now = True )),
3028 ("name" , models .CharField (max_length = 100 )),
3129 (
3230 "state" ,
3331 models .CharField (
34- db_index = True ,
35- max_length = 20 ,
36- default = "NEW" ,
3732 choices = [
38- ("NEW" , "NEW " ),
39- ("READY" , "READY " ),
40- ("PROCESSING" , "PROCESSING " ),
41- ("FAILED" , "FAILED " ),
42- ("COMPLETE" , "COMPLETE " ),
33+ ("NEW" , "New " ),
34+ ("READY" , "Ready " ),
35+ ("PROCESSING" , "Processing " ),
36+ ("FAILED" , "Failed " ),
37+ ("COMPLETE" , "Complete " ),
4338 ],
39+ db_index = True ,
40+ default = "NEW" ,
41+ max_length = 20 ,
4442 ),
4543 ),
46- ("next_task" , models .CharField (max_length = 100 , blank = True )),
47- ("workspace" , jsonfield . fields .JSONField (null = True )),
44+ ("next_task" , models .CharField (blank = True , max_length = 100 )),
45+ ("workspace" , models .JSONField (null = True )),
4846 (
4947 "queue_name" ,
50- models .CharField (db_index = True , max_length = 20 , default = "default" ),
48+ models .CharField (db_index = True , default = "default" , max_length = 20 ),
5149 ),
50+ ("priority" , models .SmallIntegerField (db_index = True , default = 0 )),
5251 ],
53- options = {"ordering" : ["-created" ],},
52+ options = {"ordering" : ["-priority" , " created" ],},
5453 ),
5554 ]
0 commit comments