Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
51b4c2f2
Commit
51b4c2f2
authored
Aug 21, 2019
by
Guilhem Saurel
Browse files
end trusty
parent
3b361adf
Pipeline
#5324
passed with stage
in 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/migrations/0038_end_trusty.py
0 → 100644
View file @
51b4c2f2
# Generated by Django 2.2 on 2019-08-21 15:14
from
django.db
import
migrations
def
end_trusty
(
apps
,
schema_editor
):
Target
=
apps
.
get_model
(
'rainboard'
,
'Target'
)
# Disable Trusty
Target
.
objects
.
filter
(
name
=
'trusty'
).
update
(
active
=
False
)
# Remove old images
Image
=
apps
.
get_model
(
'rainboard'
,
'Image'
)
Image
.
objects
.
filter
(
target__active
=
False
).
delete
()
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'rainboard'
,
'0037_project_has_python'
),
]
operations
=
[
migrations
.
RunPython
(
end_trusty
),
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment