-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic data model (no overrides, no multitenant)
- Loading branch information
Bill DeRusha
committed
Mar 18, 2016
1 parent
946bd5a
commit 8287fef
Showing
5 changed files
with
409 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
course_discovery/apps/core/migrations/0004_language_locale.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django_extensions.db.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0003_auto_20160315_1910'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Language', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('iso_code', models.CharField(max_length=2)), | ||
('name', models.CharField(max_length=255)), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Locale', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('iso_code', models.CharField(max_length=5)), | ||
('name', models.CharField(max_length=255)), | ||
('language', models.ForeignKey(to='core.Language')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
214 changes: 214 additions & 0 deletions
214
course_discovery/apps/course_metadata/migrations/0003_auto_20160318_1900.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django_extensions.db.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0004_language_locale'), | ||
('course_metadata', '0002_course_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CourseOrganization', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('type', models.CharField(max_length=100)), | ||
('course', models.ForeignKey(related_name='relationship', to='course_metadata.Course')), | ||
('organization', models.ForeignKey(related_name='relationship', to='course_metadata.Organization')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='CourseRunPerson', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('type', models.CharField(max_length=100)), | ||
('index', models.IntegerField()), | ||
('course_run', models.ForeignKey(related_name='relationship', to='course_metadata.CourseRun')), | ||
('person', models.ForeignKey(related_name='relationship', to='course_metadata.Person')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Effort', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('min', models.IntegerField()), | ||
('max', models.IntegerField()), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ExpectedLearningItem', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('value', models.CharField(max_length=255)), | ||
('index', models.IntegerField()), | ||
('course', models.ForeignKey(to='course_metadata.Course')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Image', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('height', models.IntegerField()), | ||
('width', models.IntegerField()), | ||
('src', models.CharField(max_length=255)), | ||
('description', models.CharField(max_length=255)), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='LevelType', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('name', models.CharField(max_length=255)), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='PacingType', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('name', models.CharField(max_length=255)), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Prerequisite', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('name', models.CharField(max_length=255)), | ||
('course', models.ManyToManyField(to='course_metadata.Course')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Subject', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('name', models.CharField(max_length=255)), | ||
('course', models.ManyToManyField(to='course_metadata.Course')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='SyllabusItem', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('index', models.IntegerField()), | ||
('value', models.CharField(max_length=255)), | ||
('course_run', models.ForeignKey(to='course_metadata.CourseRun')), | ||
('parent', models.ForeignKey(blank=True, null=True, related_name='children', to='course_metadata.SyllabusItem')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='TranscriptLocale', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('course_run', models.ForeignKey(to='course_metadata.CourseRun')), | ||
('locale', models.ForeignKey(to='core.Locale')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Video', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('type', models.CharField(max_length=255)), | ||
('src', models.CharField(max_length=255)), | ||
('description', models.CharField(max_length=255)), | ||
('image', models.ForeignKey(to='course_metadata.Image')), | ||
], | ||
options={ | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
'get_latest_by': 'modified', | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='course', | ||
name='organizations', | ||
field=models.ManyToManyField(through='course_metadata.CourseOrganization', to='course_metadata.Organization'), | ||
), | ||
migrations.AddField( | ||
model_name='courserun', | ||
name='people', | ||
field=models.ManyToManyField(through='course_metadata.CourseRunPerson', to='course_metadata.Person'), | ||
), | ||
] |
Oops, something went wrong.