@@ -16,150 +16,250 @@ class Migration(migrations.Migration):
1616
1717 operations = [
1818 migrations .CreateModel (
19- name = ' Automation' ,
19+ name = " Automation" ,
2020 fields = [
21- ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
22- ('modified' , models .DateTimeField (auto_now = True , help_text = 'The date/time this resource was created.' )),
23- ('created' , models .DateTimeField (auto_now_add = True , help_text = 'The date/time this resource was created.' )),
24- ('automation_type' , models .CharField (choices = [('job_template' , 'Job template' )], max_length = 200 )),
25- ('automation_id' , models .BigIntegerField ()),
26- ('primary' , models .BooleanField (default = False )),
21+ (
22+ "id" ,
23+ models .BigAutoField (
24+ auto_created = True ,
25+ primary_key = True ,
26+ serialize = False ,
27+ verbose_name = "ID" ,
28+ ),
29+ ),
30+ (
31+ "modified" ,
32+ models .DateTimeField (
33+ auto_now = True ,
34+ help_text = "The date/time this resource was created." ,
35+ ),
36+ ),
37+ (
38+ "created" ,
39+ models .DateTimeField (
40+ auto_now_add = True ,
41+ help_text = "The date/time this resource was created." ,
42+ ),
43+ ),
44+ (
45+ "automation_type" ,
46+ models .CharField (
47+ choices = [("job_template" , "Job template" )], max_length = 200
48+ ),
49+ ),
50+ ("automation_id" , models .BigIntegerField ()),
51+ ("primary" , models .BooleanField (default = False )),
2752 ],
2853 options = {
29- ' ordering' : ['id' ],
54+ " ordering" : ["id" ],
3055 },
3156 ),
3257 migrations .CreateModel (
33- name = ' ControllerLabel' ,
58+ name = " ControllerLabel" ,
3459 fields = [
35- ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
36- ('modified' , models .DateTimeField (auto_now = True , help_text = 'The date/time this resource was created.' )),
37- ('created' , models .DateTimeField (auto_now_add = True , help_text = 'The date/time this resource was created.' )),
38- ('label_id' , models .BigIntegerField (unique = True )),
60+ (
61+ "id" ,
62+ models .BigAutoField (
63+ auto_created = True ,
64+ primary_key = True ,
65+ serialize = False ,
66+ verbose_name = "ID" ,
67+ ),
68+ ),
69+ (
70+ "modified" ,
71+ models .DateTimeField (
72+ auto_now = True ,
73+ help_text = "The date/time this resource was created." ,
74+ ),
75+ ),
76+ (
77+ "created" ,
78+ models .DateTimeField (
79+ auto_now_add = True ,
80+ help_text = "The date/time this resource was created." ,
81+ ),
82+ ),
83+ ("label_id" , models .BigIntegerField (unique = True )),
3984 ],
4085 options = {
41- ' ordering' : ['id' ],
86+ " ordering" : ["id" ],
4287 },
4388 ),
4489 migrations .CreateModel (
45- name = ' Pattern' ,
90+ name = " Pattern" ,
4691 fields = [
47- ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
48- ('collection_name' , models .CharField (max_length = 200 )),
49- ('collection_version' , models .CharField (max_length = 50 )),
50- ('collection_version_uri' , models .CharField (blank = True , max_length = 200 )),
51- ('pattern_name' , models .CharField (max_length = 200 )),
52- ('pattern_definition' , models .JSONField (blank = True )),
92+ (
93+ "id" ,
94+ models .BigAutoField (
95+ auto_created = True ,
96+ primary_key = True ,
97+ serialize = False ,
98+ verbose_name = "ID" ,
99+ ),
100+ ),
101+ ("collection_name" , models .CharField (max_length = 200 )),
102+ ("collection_version" , models .CharField (max_length = 50 )),
103+ (
104+ "collection_version_uri" ,
105+ models .CharField (blank = True , max_length = 200 ),
106+ ),
107+ ("pattern_name" , models .CharField (max_length = 200 )),
108+ ("pattern_definition" , models .JSONField (blank = True )),
53109 ],
54110 options = {
55- ' ordering' : ['id' ],
111+ " ordering" : ["id" ],
56112 },
57113 ),
58114 migrations .CreateModel (
59- name = ' PatternInstance' ,
115+ name = " PatternInstance" ,
60116 fields = [
61- ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
62- ('modified' , models .DateTimeField (auto_now = True , help_text = 'The date/time this resource was created.' )),
63- ('created' , models .DateTimeField (auto_now_add = True , help_text = 'The date/time this resource was created.' )),
64- ('organization_id' , models .BigIntegerField ()),
65- ('controller_project_id' , models .BigIntegerField (blank = True )),
66- ('controller_ee_id' , models .BigIntegerField (blank = True , null = True )),
67- ('credentials' , models .JSONField ()),
68- ('executors' , models .JSONField (blank = True , null = True )),
69- ('controller_labels' , models .ManyToManyField (blank = True , related_name = 'pattern_instances' , to = 'core.controllerlabel' )),
70- (
71- 'created_by' ,
117+ (
118+ "id" ,
119+ models .BigAutoField (
120+ auto_created = True ,
121+ primary_key = True ,
122+ serialize = False ,
123+ verbose_name = "ID" ,
124+ ),
125+ ),
126+ (
127+ "modified" ,
128+ models .DateTimeField (
129+ auto_now = True ,
130+ help_text = "The date/time this resource was created." ,
131+ ),
132+ ),
133+ (
134+ "created" ,
135+ models .DateTimeField (
136+ auto_now_add = True ,
137+ help_text = "The date/time this resource was created." ,
138+ ),
139+ ),
140+ ("organization_id" , models .BigIntegerField ()),
141+ ("controller_project_id" , models .BigIntegerField (blank = True )),
142+ ("controller_ee_id" , models .BigIntegerField (blank = True , null = True )),
143+ ("credentials" , models .JSONField ()),
144+ ("executors" , models .JSONField (blank = True , null = True )),
145+ (
146+ "controller_labels" ,
147+ models .ManyToManyField (
148+ blank = True ,
149+ related_name = "pattern_instances" ,
150+ to = "core.controllerlabel" ,
151+ ),
152+ ),
153+ (
154+ "created_by" ,
72155 models .ForeignKey (
73156 default = None ,
74157 editable = False ,
75- help_text = ' The user who created this resource.' ,
158+ help_text = " The user who created this resource." ,
76159 null = True ,
77160 on_delete = django .db .models .deletion .SET_NULL ,
78- related_name = ' %(app_label)s_%(class)s_created+' ,
161+ related_name = " %(app_label)s_%(class)s_created+" ,
79162 to = settings .AUTH_USER_MODEL ,
80163 ),
81164 ),
82165 (
83- ' modified_by' ,
166+ " modified_by" ,
84167 models .ForeignKey (
85168 default = None ,
86169 editable = False ,
87- help_text = ' The user who last modified this resource.' ,
170+ help_text = " The user who last modified this resource." ,
88171 null = True ,
89172 on_delete = django .db .models .deletion .SET_NULL ,
90- related_name = ' %(app_label)s_%(class)s_modified+' ,
173+ related_name = " %(app_label)s_%(class)s_modified+" ,
91174 to = settings .AUTH_USER_MODEL ,
92175 ),
93176 ),
94- ('pattern' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'pattern_instances' , to = 'core.pattern' )),
177+ (
178+ "pattern" ,
179+ models .ForeignKey (
180+ on_delete = django .db .models .deletion .CASCADE ,
181+ related_name = "pattern_instances" ,
182+ to = "core.pattern" ,
183+ ),
184+ ),
95185 ],
96186 options = {
97- ' ordering' : ['id' ],
187+ " ordering" : ["id" ],
98188 },
99189 ),
100190 migrations .AddConstraint (
101- model_name = 'pattern' ,
102- constraint = models .UniqueConstraint (fields = ('collection_name' , 'collection_version' , 'pattern_name' ), name = 'unique_pattern_collection_version' ),
191+ model_name = "pattern" ,
192+ constraint = models .UniqueConstraint (
193+ fields = ("collection_name" , "collection_version" , "pattern_name" ),
194+ name = "unique_pattern_collection_version" ,
195+ ),
103196 ),
104197 migrations .AddField (
105- model_name = ' controllerlabel' ,
106- name = ' created_by' ,
198+ model_name = " controllerlabel" ,
199+ name = " created_by" ,
107200 field = models .ForeignKey (
108201 default = None ,
109202 editable = False ,
110- help_text = ' The user who created this resource.' ,
203+ help_text = " The user who created this resource." ,
111204 null = True ,
112205 on_delete = django .db .models .deletion .SET_NULL ,
113- related_name = ' %(app_label)s_%(class)s_created+' ,
206+ related_name = " %(app_label)s_%(class)s_created+" ,
114207 to = settings .AUTH_USER_MODEL ,
115208 ),
116209 ),
117210 migrations .AddField (
118- model_name = ' controllerlabel' ,
119- name = ' modified_by' ,
211+ model_name = " controllerlabel" ,
212+ name = " modified_by" ,
120213 field = models .ForeignKey (
121214 default = None ,
122215 editable = False ,
123- help_text = ' The user who last modified this resource.' ,
216+ help_text = " The user who last modified this resource." ,
124217 null = True ,
125218 on_delete = django .db .models .deletion .SET_NULL ,
126- related_name = ' %(app_label)s_%(class)s_modified+' ,
219+ related_name = " %(app_label)s_%(class)s_modified+" ,
127220 to = settings .AUTH_USER_MODEL ,
128221 ),
129222 ),
130223 migrations .AddField (
131- model_name = ' automation' ,
132- name = ' created_by' ,
224+ model_name = " automation" ,
225+ name = " created_by" ,
133226 field = models .ForeignKey (
134227 default = None ,
135228 editable = False ,
136- help_text = ' The user who created this resource.' ,
229+ help_text = " The user who created this resource." ,
137230 null = True ,
138231 on_delete = django .db .models .deletion .SET_NULL ,
139- related_name = ' %(app_label)s_%(class)s_created+' ,
232+ related_name = " %(app_label)s_%(class)s_created+" ,
140233 to = settings .AUTH_USER_MODEL ,
141234 ),
142235 ),
143236 migrations .AddField (
144- model_name = ' automation' ,
145- name = ' modified_by' ,
237+ model_name = " automation" ,
238+ name = " modified_by" ,
146239 field = models .ForeignKey (
147240 default = None ,
148241 editable = False ,
149- help_text = ' The user who last modified this resource.' ,
242+ help_text = " The user who last modified this resource." ,
150243 null = True ,
151244 on_delete = django .db .models .deletion .SET_NULL ,
152- related_name = ' %(app_label)s_%(class)s_modified+' ,
245+ related_name = " %(app_label)s_%(class)s_modified+" ,
153246 to = settings .AUTH_USER_MODEL ,
154247 ),
155248 ),
156249 migrations .AddField (
157- model_name = 'automation' ,
158- name = 'pattern_instance' ,
159- field = models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'automations' , to = 'core.patterninstance' ),
250+ model_name = "automation" ,
251+ name = "pattern_instance" ,
252+ field = models .ForeignKey (
253+ on_delete = django .db .models .deletion .CASCADE ,
254+ related_name = "automations" ,
255+ to = "core.patterninstance" ,
256+ ),
160257 ),
161258 migrations .AddConstraint (
162- model_name = 'patterninstance' ,
163- constraint = models .UniqueConstraint (fields = ('organization_id' , 'pattern' ), name = 'unique_pattern_instance_organization' ),
259+ model_name = "patterninstance" ,
260+ constraint = models .UniqueConstraint (
261+ fields = ("organization_id" , "pattern" ),
262+ name = "unique_pattern_instance_organization" ,
263+ ),
164264 ),
165265 ]
0 commit comments