Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Hsin-Yu Chien
edx-platform-release
Commits
1a844a00
Commit
1a844a00
authored
9 years ago
by
Will Daly
Browse files
Options
Downloads
Plain Diff
Merge pull request #8265 from edx/will/fix-credit-requirement-migration
Fix credit requirement "criteria" name
parents
cc93dcab
05ea62fb
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/credit/migrations/0002_rename_credit_requirement_criteria_field.py
+76
-0
76 additions, 0 deletions
...grations/0002_rename_credit_requirement_criteria_field.py
with
76 additions
and
0 deletions
openedx/core/djangoapps/credit/migrations/0002_rename_credit_requirement_criteria_field.py
0 → 100644
+
76
−
0
View file @
1a844a00
# -*- coding: utf-8 -*-
from
south.utils
import
datetime_utils
as
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Deleting field 'CreditRequirement.configuration'
db
.
delete_column
(
'
credit_creditrequirement
'
,
'
configuration
'
)
# Adding field 'CreditRequirement.criteria'
db
.
add_column
(
'
credit_creditrequirement
'
,
'
criteria
'
,
self
.
gf
(
'
jsonfield.fields.JSONField
'
)(
default
=
''
),
keep_default
=
False
)
def
backwards
(
self
,
orm
):
# Adding field 'CreditRequirement.configuration'
db
.
add_column
(
'
credit_creditrequirement
'
,
'
configuration
'
,
self
.
gf
(
'
jsonfield.fields.JSONField
'
)(
default
=
''
),
keep_default
=
False
)
# Deleting field 'CreditRequirement.criteria'
db
.
delete_column
(
'
credit_creditrequirement
'
,
'
criteria
'
)
models
=
{
'
credit.creditcourse
'
:
{
'
Meta
'
:
{
'
object_name
'
:
'
CreditCourse
'
},
'
course_key
'
:
(
'
xmodule_django.models.CourseKeyField
'
,
[],
{
'
unique
'
:
'
True
'
,
'
max_length
'
:
'
255
'
,
'
db_index
'
:
'
True
'
}),
'
enabled
'
:
(
'
django.db.models.fields.BooleanField
'
,
[],
{
'
default
'
:
'
False
'
}),
'
id
'
:
(
'
django.db.models.fields.AutoField
'
,
[],
{
'
primary_key
'
:
'
True
'
})
},
'
credit.crediteligibility
'
:
{
'
Meta
'
:
{
'
unique_together
'
:
"
((
'
username
'
,
'
course
'
),)
"
,
'
object_name
'
:
'
CreditEligibility
'
},
'
course
'
:
(
'
django.db.models.fields.related.ForeignKey
'
,
[],
{
'
related_name
'
:
"'
eligibilities
'"
,
'
to
'
:
"
orm[
'
credit.CreditCourse
'
]
"
}),
'
created
'
:
(
'
model_utils.fields.AutoCreatedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
id
'
:
(
'
django.db.models.fields.AutoField
'
,
[],
{
'
primary_key
'
:
'
True
'
}),
'
modified
'
:
(
'
model_utils.fields.AutoLastModifiedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
provider
'
:
(
'
django.db.models.fields.related.ForeignKey
'
,
[],
{
'
related_name
'
:
"'
eligibilities
'"
,
'
to
'
:
"
orm[
'
credit.CreditProvider
'
]
"
}),
'
username
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
max_length
'
:
'
255
'
,
'
db_index
'
:
'
True
'
})
},
'
credit.creditprovider
'
:
{
'
Meta
'
:
{
'
object_name
'
:
'
CreditProvider
'
},
'
created
'
:
(
'
model_utils.fields.AutoCreatedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
display_name
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
max_length
'
:
'
255
'
}),
'
id
'
:
(
'
django.db.models.fields.AutoField
'
,
[],
{
'
primary_key
'
:
'
True
'
}),
'
modified
'
:
(
'
model_utils.fields.AutoLastModifiedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
provider_id
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
unique
'
:
'
True
'
,
'
max_length
'
:
'
255
'
,
'
db_index
'
:
'
True
'
})
},
'
credit.creditrequirement
'
:
{
'
Meta
'
:
{
'
unique_together
'
:
"
((
'
namespace
'
,
'
name
'
,
'
course
'
),)
"
,
'
object_name
'
:
'
CreditRequirement
'
},
'
active
'
:
(
'
django.db.models.fields.BooleanField
'
,
[],
{
'
default
'
:
'
True
'
}),
'
course
'
:
(
'
django.db.models.fields.related.ForeignKey
'
,
[],
{
'
related_name
'
:
"'
credit_requirements
'"
,
'
to
'
:
"
orm[
'
credit.CreditCourse
'
]
"
}),
'
created
'
:
(
'
model_utils.fields.AutoCreatedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
criteria
'
:
(
'
jsonfield.fields.JSONField
'
,
[],
{}),
'
id
'
:
(
'
django.db.models.fields.AutoField
'
,
[],
{
'
primary_key
'
:
'
True
'
}),
'
modified
'
:
(
'
model_utils.fields.AutoLastModifiedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
name
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
max_length
'
:
'
255
'
}),
'
namespace
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
max_length
'
:
'
255
'
})
},
'
credit.creditrequirementstatus
'
:
{
'
Meta
'
:
{
'
object_name
'
:
'
CreditRequirementStatus
'
},
'
created
'
:
(
'
model_utils.fields.AutoCreatedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
id
'
:
(
'
django.db.models.fields.AutoField
'
,
[],
{
'
primary_key
'
:
'
True
'
}),
'
modified
'
:
(
'
model_utils.fields.AutoLastModifiedField
'
,
[],
{
'
default
'
:
'
datetime.datetime.now
'
}),
'
requirement
'
:
(
'
django.db.models.fields.related.ForeignKey
'
,
[],
{
'
related_name
'
:
"'
statuses
'"
,
'
to
'
:
"
orm[
'
credit.CreditRequirement
'
]
"
}),
'
status
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
max_length
'
:
'
32
'
}),
'
username
'
:
(
'
django.db.models.fields.CharField
'
,
[],
{
'
max_length
'
:
'
255
'
,
'
db_index
'
:
'
True
'
})
}
}
complete_apps
=
[
'
credit
'
]
\ No newline at end of file
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