Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Coughlin
GraceDB Server
Commits
0af62c68
Commit
0af62c68
authored
10 years ago
by
Branson Craig Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Fixed migration of existing eels.
parent
57a854c3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/migrations/0034_migrate_existing_eels_to_lists.py
+12
-5
12 additions, 5 deletions
gracedb/migrations/0034_migrate_existing_eels_to_lists.py
with
12 additions
and
5 deletions
gracedb/migrations/0034_migrate_existing_eels_to_lists.py
+
12
−
5
View file @
0af62c68
...
...
@@ -7,13 +7,20 @@ from django.db import models
class
Migration
(
DataMigration
):
def
forwards
(
self
,
orm
):
"
Write your forwards methods here.
"
# Note: Don't use "from appname.models import ModelName".
# Use orm.ModelName to refer to models in this application,
# and orm['appname.ModelName'] for models in other applications.
for
eel
in
orm
.
EMBBEventLog
.
objects
.
all
():
if
not
eel
.
raList
:
# Assume that the list values are unset, because this is an old eel.
# For eels with only one footprint, the list fields should just have
# a string-ified version of the single value.
eel
.
raList
=
str
(
eel
.
ra
)
eel
.
decList
=
str
(
eel
.
dec
)
eel
.
raWidthList
=
str
(
eel
.
raWidth
)
eel
.
gpstimeList
=
str
(
eel
.
gpstime
)
eel
.
decWidthList
=
str
(
eel
.
decWidth
)
eel
.
durationList
=
str
(
eel
.
duration
)
def
backwards
(
self
,
orm
):
"
Write your backwards methods here.
"
pass
models
=
{
u
'
auth.group
'
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment