Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
22b1ef34
Commit
22b1ef34
authored
Aug 14, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial migrations for course modes
parent
6c6ba54e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
lms/djangoapps/course_modes/migrations/0001_initial.py
+41
-0
lms/djangoapps/course_modes/migrations/__init__.py
+0
-0
No files found.
lms/djangoapps/course_modes/migrations/0001_initial.py
0 → 100644
View file @
22b1ef34
# -*- coding: utf-8 -*-
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding model 'CourseMode'
db
.
create_table
(
'course_modes_coursemode'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'course_id'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
255
,
db_index
=
True
)),
(
'mode_slug'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
100
)),
(
'mode_display_name'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
255
)),
(
'min_price'
,
self
.
gf
(
'django.db.models.fields.IntegerField'
)(
default
=
0
)),
(
'suggested_prices'
,
self
.
gf
(
'django.db.models.fields.CommaSeparatedIntegerField'
)(
default
=
''
,
max_length
=
255
,
blank
=
True
)),
))
db
.
send_create_signal
(
'course_modes'
,
[
'CourseMode'
])
def
backwards
(
self
,
orm
):
# Deleting model 'CourseMode'
db
.
delete_table
(
'course_modes_coursemode'
)
models
=
{
'course_modes.coursemode'
:
{
'Meta'
:
{
'object_name'
:
'CourseMode'
},
'course_id'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
,
'db_index'
:
'True'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'min_price'
:
(
'django.db.models.fields.IntegerField'
,
[],
{
'default'
:
'0'
}),
'mode_display_name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'255'
}),
'mode_slug'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'suggested_prices'
:
(
'django.db.models.fields.CommaSeparatedIntegerField'
,
[],
{
'default'
:
"''"
,
'max_length'
:
'255'
,
'blank'
:
'True'
})
}
}
complete_apps
=
[
'course_modes'
]
\ No newline at end of file
lms/djangoapps/course_modes/migrations/__init__.py
0 → 100644
View file @
22b1ef34
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