diff options
author | David Reyna <David.Reyna@windriver.com> | 2020-03-25 21:24:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-03-29 20:02:36 +0100 |
commit | 4dabdbe11ddc47a885c7f8cc6b3f26439d40d77c (patch) | |
tree | 1cfd3f48830d5688e65c283c181767d74a951358 /bitbake/lib/toaster/bldcontrol/models.py | |
parent | 7e252ef31094f760b5666aec9b2205166a8ccbd2 (diff) | |
download | poky-4dabdbe11ddc47a885c7f8cc6b3f26439d40d77c.tar.gz |
bitbake: toaster: migrate to Django-2.2
Toaster migration to Django-2.2. Django-1.x has been deprecated.
[YOCTO #13207]
(Bitbake rev: 9730f95686b2ac72cf1fa513c555f7c7787e2667)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/models.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/models.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/models.py b/bitbake/lib/toaster/bldcontrol/models.py index 0d30fd9be0..c2f302da24 100644 --- a/bitbake/lib/toaster/bldcontrol/models.py +++ b/bitbake/lib/toaster/bldcontrol/models.py | |||
@@ -85,9 +85,9 @@ class BuildRequest(models.Model): | |||
85 | 85 | ||
86 | search_allowed_fields = ("brtarget__target", "build__project__name") | 86 | search_allowed_fields = ("brtarget__target", "build__project__name") |
87 | 87 | ||
88 | project = models.ForeignKey(Project) | 88 | project = models.ForeignKey(Project, on_delete=models.CASCADE) |
89 | build = models.OneToOneField(Build, null = True) # TODO: toasterui should set this when Build is created | 89 | build = models.OneToOneField(Build, on_delete=models.CASCADE, null = True) # TODO: toasterui should set this when Build is created |
90 | environment = models.ForeignKey(BuildEnvironment, null = True) | 90 | environment = models.ForeignKey(BuildEnvironment, on_delete=models.CASCADE, null = True) |
91 | state = models.IntegerField(choices = REQUEST_STATE, default = REQ_CREATED) | 91 | state = models.IntegerField(choices = REQUEST_STATE, default = REQ_CREATED) |
92 | created = models.DateTimeField(auto_now_add = True) | 92 | created = models.DateTimeField(auto_now_add = True) |
93 | updated = models.DateTimeField(auto_now = True) | 93 | updated = models.DateTimeField(auto_now = True) |
@@ -131,32 +131,32 @@ class BuildRequest(models.Model): | |||
131 | 131 | ||
132 | 132 | ||
133 | class BRLayer(models.Model): | 133 | class BRLayer(models.Model): |
134 | req = models.ForeignKey(BuildRequest) | 134 | req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) |
135 | name = models.CharField(max_length=100) | 135 | name = models.CharField(max_length=100) |
136 | giturl = models.CharField(max_length=254, null=True) | 136 | giturl = models.CharField(max_length=254, null=True) |
137 | local_source_dir = models.CharField(max_length=254, null=True) | 137 | local_source_dir = models.CharField(max_length=254, null=True) |
138 | commit = models.CharField(max_length=254, null=True) | 138 | commit = models.CharField(max_length=254, null=True) |
139 | dirpath = models.CharField(max_length=254, null=True) | 139 | dirpath = models.CharField(max_length=254, null=True) |
140 | layer_version = models.ForeignKey(Layer_Version, null=True) | 140 | layer_version = models.ForeignKey(Layer_Version, on_delete=models.CASCADE, null=True) |
141 | 141 | ||
142 | class BRBitbake(models.Model): | 142 | class BRBitbake(models.Model): |
143 | req = models.OneToOneField(BuildRequest) # only one bitbake for a request | 143 | req = models.OneToOneField(BuildRequest, on_delete=models.CASCADE) # only one bitbake for a request |
144 | giturl = models.CharField(max_length =254) | 144 | giturl = models.CharField(max_length =254) |
145 | commit = models.CharField(max_length = 254) | 145 | commit = models.CharField(max_length = 254) |
146 | dirpath = models.CharField(max_length = 254) | 146 | dirpath = models.CharField(max_length = 254) |
147 | 147 | ||
148 | class BRVariable(models.Model): | 148 | class BRVariable(models.Model): |
149 | req = models.ForeignKey(BuildRequest) | 149 | req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) |
150 | name = models.CharField(max_length=100) | 150 | name = models.CharField(max_length=100) |
151 | value = models.TextField(blank = True) | 151 | value = models.TextField(blank = True) |
152 | 152 | ||
153 | class BRTarget(models.Model): | 153 | class BRTarget(models.Model): |
154 | req = models.ForeignKey(BuildRequest) | 154 | req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) |
155 | target = models.CharField(max_length=100) | 155 | target = models.CharField(max_length=100) |
156 | task = models.CharField(max_length=100, null=True) | 156 | task = models.CharField(max_length=100, null=True) |
157 | 157 | ||
158 | class BRError(models.Model): | 158 | class BRError(models.Model): |
159 | req = models.ForeignKey(BuildRequest) | 159 | req = models.ForeignKey(BuildRequest, on_delete=models.CASCADE) |
160 | errtype = models.CharField(max_length=100) | 160 | errtype = models.CharField(max_length=100) |
161 | errmsg = models.TextField() | 161 | errmsg = models.TextField() |
162 | traceback = models.TextField() | 162 | traceback = models.TextField() |