Skip to content
GitLab
Menu
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
fdbf317d
Commit
fdbf317d
authored
Jul 28, 2021
by
Guilhem Saurel
Browse files
migration
parent
54872938
Pipeline
#15386
failed with stage
in 2 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
rainboard/migrations/0058_drop_py3_debug.py
0 → 100644
View file @
fdbf317d
# Generated by Django 3.2.5 on 2021-07-28 15:56
from
django.db
import
migrations
,
models
def
remove_all_images
(
apps
,
schema_editor
):
Image
=
apps
.
get_model
(
'rainboard'
,
'Image'
)
Image
.
objects
.
delete
()
def
create_all_images
(
apps
,
schema_editor
):
Robotpkg
=
apps
.
get_model
(
'rainboard'
,
'Robotpkg'
)
for
rpkg
in
Robotpkg
.
objects
.
all
():
rpkg
.
update_images
()
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'rainboard'
,
'0057_target_public'
),
]
operations
=
[
migrations
.
RunPython
(
remove_all_images
),
migrations
.
RemoveField
(
model_name
=
'target'
,
name
=
'py2_available'
,
),
migrations
.
AlterField
(
model_name
=
'forge'
,
name
=
'source'
,
field
=
models
.
PositiveSmallIntegerField
(
choices
=
[(
1
,
'Github'
),
(
2
,
'Gitlab'
),
(
3
,
'Redmine'
),
(
4
,
'Robotpkg'
),
(
5
,
'Travis'
)]),
),
migrations
.
AlterUniqueTogether
(
name
=
'image'
,
unique_together
=
{(
'robotpkg'
,
'target'
)},
),
migrations
.
RemoveField
(
model_name
=
'image'
,
name
=
'debug'
,
),
migrations
.
RemoveField
(
model_name
=
'image'
,
name
=
'py3'
,
),
migrations
.
RunPython
(
create_all_images
),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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