diff --git a/common/test/db_cache/bok_choy_data.json b/common/test/db_cache/bok_choy_data.json new file mode 100644 index 0000000000..c485e0decd --- /dev/null +++ b/common/test/db_cache/bok_choy_data.json @@ -0,0 +1 @@ +[{"pk": 30, "model": "contenttypes.contenttype", "fields": {"model": "anonymoususerid", "name": "anonymous user id", "app_label": "student"}}, {"pk": 50, "model": "contenttypes.contenttype", "fields": {"model": "article", "name": "article", "app_label": "wiki"}}, {"pk": 51, "model": "contenttypes.contenttype", "fields": {"model": "articleforobject", "name": "Article for object", "app_label": "wiki"}}, {"pk": 54, "model": "contenttypes.contenttype", "fields": {"model": "articleplugin", "name": "article plugin", "app_label": "wiki"}}, {"pk": 52, "model": "contenttypes.contenttype", "fields": {"model": "articlerevision", "name": "article revision", "app_label": "wiki"}}, {"pk": 59, "model": "contenttypes.contenttype", "fields": {"model": "articlesubscription", "name": "article subscription", "app_label": "wiki"}}, {"pk": 20, "model": "contenttypes.contenttype", "fields": {"model": "association", "name": "association", "app_label": "django_openid_auth"}}, {"pk": 78, "model": "contenttypes.contenttype", "fields": {"model": "certificateitem", "name": "certificate item", "app_label": "shoppingcart"}}, {"pk": 40, "model": "contenttypes.contenttype", "fields": {"model": "certificatewhitelist", "name": "certificate whitelist", "app_label": "certificates"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 48, "model": "contenttypes.contenttype", "fields": {"model": "courseauthorization", "name": "course authorization", "app_label": "bulk_email"}}, {"pk": 45, "model": "contenttypes.contenttype", "fields": {"model": "courseemail", "name": "course email", "app_label": "bulk_email"}}, {"pk": 47, "model": "contenttypes.contenttype", "fields": {"model": "courseemailtemplate", "name": "course email template", "app_label": "bulk_email"}}, {"pk": 37, "model": "contenttypes.contenttype", "fields": {"model": "courseenrollment", "name": "course enrollment", "app_label": "student"}}, {"pk": 38, "model": "contenttypes.contenttype", "fields": {"model": "courseenrollmentallowed", "name": "course enrollment allowed", "app_label": "student"}}, {"pk": 71, "model": "contenttypes.contenttype", "fields": {"model": "coursemode", "name": "course mode", "app_label": "course_modes"}}, {"pk": 43, "model": "contenttypes.contenttype", "fields": {"model": "coursesoftware", "name": "course software", "app_label": "licenses"}}, {"pk": 18, "model": "contenttypes.contenttype", "fields": {"model": "courseusergroup", "name": "course user group", "app_label": "course_groups"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "crontabschedule", "name": "crontab", "app_label": "djcelery"}}, {"pk": 49, "model": "contenttypes.contenttype", "fields": {"model": "externalauthmap", "name": "external auth map", "app_label": "external_auth"}}, {"pk": 66, "model": "contenttypes.contenttype", "fields": {"model": "flag", "name": "flag", "app_label": "waffle"}}, {"pk": 41, "model": "contenttypes.contenttype", "fields": {"model": "generatedcertificate", "name": "generated certificate", "app_label": "certificates"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 42, "model": "contenttypes.contenttype", "fields": {"model": "instructortask", "name": "instructor task", "app_label": "instructor_task"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "intervalschedule", "name": "interval", "app_label": "djcelery"}}, {"pk": 73, "model": "contenttypes.contenttype", "fields": {"model": "linkedin", "name": "linked in", "app_label": "linkedin"}}, {"pk": 22, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 15, "model": "contenttypes.contenttype", "fields": {"model": "migrationhistory", "name": "migration history", "app_label": "south"}}, {"pk": 19, "model": "contenttypes.contenttype", "fields": {"model": "nonce", "name": "nonce", "app_label": "django_openid_auth"}}, {"pk": 69, "model": "contenttypes.contenttype", "fields": {"model": "note", "name": "note", "app_label": "notes"}}, {"pk": 63, "model": "contenttypes.contenttype", "fields": {"model": "notification", "name": "notification", "app_label": "django_notify"}}, {"pk": 28, "model": "contenttypes.contenttype", "fields": {"model": "offlinecomputedgrade", "name": "offline computed grade", "app_label": "courseware"}}, {"pk": 29, "model": "contenttypes.contenttype", "fields": {"model": "offlinecomputedgradelog", "name": "offline computed grade log", "app_label": "courseware"}}, {"pk": 46, "model": "contenttypes.contenttype", "fields": {"model": "optout", "name": "optout", "app_label": "bulk_email"}}, {"pk": 74, "model": "contenttypes.contenttype", "fields": {"model": "order", "name": "order", "app_label": "shoppingcart"}}, {"pk": 75, "model": "contenttypes.contenttype", "fields": {"model": "orderitem", "name": "order item", "app_label": "shoppingcart"}}, {"pk": 76, "model": "contenttypes.contenttype", "fields": {"model": "paidcourseregistration", "name": "paid course registration", "app_label": "shoppingcart"}}, {"pk": 77, "model": "contenttypes.contenttype", "fields": {"model": "paidcourseregistrationannotation", "name": "paid course registration annotation", "app_label": "shoppingcart"}}, {"pk": 36, "model": "contenttypes.contenttype", "fields": {"model": "pendingemailchange", "name": "pending email change", "app_label": "student"}}, {"pk": 35, "model": "contenttypes.contenttype", "fields": {"model": "pendingnamechange", "name": "pending name change", "app_label": "student"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "periodictask", "name": "periodic task", "app_label": "djcelery"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "periodictasks", "name": "periodic tasks", "app_label": "djcelery"}}, {"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 17, "model": "contenttypes.contenttype", "fields": {"model": "psychometricdata", "name": "psychometric data", "app_label": "psychometrics"}}, {"pk": 65, "model": "contenttypes.contenttype", "fields": {"model": "puzzlecomplete", "name": "puzzle complete", "app_label": "foldit"}}, {"pk": 34, "model": "contenttypes.contenttype", "fields": {"model": "registration", "name": "registration", "app_label": "student"}}, {"pk": 55, "model": "contenttypes.contenttype", "fields": {"model": "reusableplugin", "name": "reusable plugin", "app_label": "wiki"}}, {"pk": 57, "model": "contenttypes.contenttype", "fields": {"model": "revisionplugin", "name": "revision plugin", "app_label": "wiki"}}, {"pk": 58, "model": "contenttypes.contenttype", "fields": {"model": "revisionpluginrevision", "name": "revision plugin revision", "app_label": "wiki"}}, {"pk": 68, "model": "contenttypes.contenttype", "fields": {"model": "sample", "name": "sample", "app_label": "waffle"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "tasksetmeta", "name": "saved group result", "app_label": "djcelery"}}, {"pk": 64, "model": "contenttypes.contenttype", "fields": {"model": "score", "name": "score", "app_label": "foldit"}}, {"pk": 16, "model": "contenttypes.contenttype", "fields": {"model": "servercircuit", "name": "server circuit", "app_label": "circuit"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 61, "model": "contenttypes.contenttype", "fields": {"model": "settings", "name": "settings", "app_label": "django_notify"}}, {"pk": 56, "model": "contenttypes.contenttype", "fields": {"model": "simpleplugin", "name": "simple plugin", "app_label": "wiki"}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "site", "name": "site", "app_label": "sites"}}, {"pk": 72, "model": "contenttypes.contenttype", "fields": {"model": "softwaresecurephotoverification", "name": "software secure photo verification", "app_label": "verify_student"}}, {"pk": 23, "model": "contenttypes.contenttype", "fields": {"model": "studentmodule", "name": "student module", "app_label": "courseware"}}, {"pk": 24, "model": "contenttypes.contenttype", "fields": {"model": "studentmodulehistory", "name": "student module history", "app_label": "courseware"}}, {"pk": 62, "model": "contenttypes.contenttype", "fields": {"model": "subscription", "name": "subscription", "app_label": "django_notify"}}, {"pk": 67, "model": "contenttypes.contenttype", "fields": {"model": "switch", "name": "switch", "app_label": "waffle"}}, {"pk": 14, "model": "contenttypes.contenttype", "fields": {"model": "taskstate", "name": "task", "app_label": "djcelery"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "taskmeta", "name": "task state", "app_label": "djcelery"}}, {"pk": 39, "model": "contenttypes.contenttype", "fields": {"model": "trackinglog", "name": "tracking log", "app_label": "track"}}, {"pk": 60, "model": "contenttypes.contenttype", "fields": {"model": "notificationtype", "name": "type", "app_label": "django_notify"}}, {"pk": 53, "model": "contenttypes.contenttype", "fields": {"model": "urlpath", "name": "URL path", "app_label": "wiki"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": 44, "model": "contenttypes.contenttype", "fields": {"model": "userlicense", "name": "user license", "app_label": "licenses"}}, {"pk": 21, "model": "contenttypes.contenttype", "fields": {"model": "useropenid", "name": "user open id", "app_label": "django_openid_auth"}}, {"pk": 70, "model": "contenttypes.contenttype", "fields": {"model": "userpreference", "name": "user preference", "app_label": "user_api"}}, {"pk": 32, "model": "contenttypes.contenttype", "fields": {"model": "userprofile", "name": "user profile", "app_label": "student"}}, {"pk": 31, "model": "contenttypes.contenttype", "fields": {"model": "userstanding", "name": "user standing", "app_label": "student"}}, {"pk": 33, "model": "contenttypes.contenttype", "fields": {"model": "usertestgroup", "name": "user test group", "app_label": "student"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "workerstate", "name": "worker", "app_label": "djcelery"}}, {"pk": 27, "model": "contenttypes.contenttype", "fields": {"model": "xmodulestudentinfofield", "name": "x module student info field", "app_label": "courseware"}}, {"pk": 26, "model": "contenttypes.contenttype", "fields": {"model": "xmodulestudentprefsfield", "name": "x module student prefs field", "app_label": "courseware"}}, {"pk": 25, "model": "contenttypes.contenttype", "fields": {"model": "xmoduleuserstatesummaryfield", "name": "x module user state summary field", "app_label": "courseware"}}, {"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 1, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:32Z", "app_name": "courseware", "migration": "0001_initial"}}, {"pk": 2, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:32Z", "app_name": "courseware", "migration": "0002_add_indexes"}}, {"pk": 3, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:32Z", "app_name": "courseware", "migration": "0003_done_grade_cache"}}, {"pk": 4, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:32Z", "app_name": "courseware", "migration": "0004_add_field_studentmodule_course_id"}}, {"pk": 5, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "courseware", "migration": "0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c"}}, {"pk": 6, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "courseware", "migration": "0006_create_student_module_history"}}, {"pk": 7, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "courseware", "migration": "0007_allow_null_version_in_history"}}, {"pk": 8, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "courseware", "migration": "0008_add_xmodule_storage"}}, {"pk": 9, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "courseware", "migration": "0009_add_field_default"}}, {"pk": 10, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "courseware", "migration": "0010_rename_xblock_field_content_to_user_state_summary"}}, {"pk": 11, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "student", "migration": "0001_initial"}}, {"pk": 12, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "student", "migration": "0002_text_to_varchar_and_indexes"}}, {"pk": 13, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:33Z", "app_name": "student", "migration": "0003_auto__add_usertestgroup"}}, {"pk": 14, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0004_add_email_index"}}, {"pk": 15, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0005_name_change"}}, {"pk": 16, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0006_expand_meta_field"}}, {"pk": 17, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0007_convert_to_utf8"}}, {"pk": 18, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0008__auto__add_courseregistration"}}, {"pk": 19, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0009_auto__del_courseregistration__add_courseenrollment"}}, {"pk": 20, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0010_auto__chg_field_courseenrollment_course_id"}}, {"pk": 21, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use"}}, {"pk": 22, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt"}}, {"pk": 23, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0013_auto__chg_field_userprofile_meta"}}, {"pk": 24, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0014_auto__del_courseenrollment"}}, {"pk": 25, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0015_auto__add_courseenrollment__add_unique_courseenrollment_user_course_id"}}, {"pk": 26, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0016_auto__add_field_courseenrollment_date__chg_field_userprofile_country"}}, {"pk": 27, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0017_rename_date_to_created"}}, {"pk": 28, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0018_auto"}}, {"pk": 29, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0019_create_approved_demographic_fields_fall_2012"}}, {"pk": 30, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:34Z", "app_name": "student", "migration": "0020_add_test_center_user"}}, {"pk": 31, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0021_remove_askbot"}}, {"pk": 32, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_"}}, {"pk": 33, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0023_add_test_center_registration"}}, {"pk": 34, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0024_add_allow_certificate"}}, {"pk": 35, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0025_auto__add_field_courseenrollmentallowed_auto_enroll"}}, {"pk": 36, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0026_auto__remove_index_student_testcenterregistration_accommodation_request"}}, {"pk": 37, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0027_add_active_flag_and_mode_to_courseware_enrollment"}}, {"pk": 38, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0028_auto__add_userstanding"}}, {"pk": 39, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0029_add_lookup_table_between_user_and_anonymous_student_id"}}, {"pk": 40, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0029_remove_pearson"}}, {"pk": 41, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0030_auto__chg_field_anonymoususerid_anonymous_user_id"}}, {"pk": 42, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "student", "migration": "0031_drop_student_anonymoususerid_temp_archive"}}, {"pk": 43, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:35Z", "app_name": "track", "migration": "0001_initial"}}, {"pk": 44, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "track", "migration": "0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch"}}, {"pk": 45, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0001_added_generatedcertificates"}}, {"pk": 46, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0002_auto__add_field_generatedcertificate_download_url"}}, {"pk": 47, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0003_auto__add_field_generatedcertificate_enabled"}}, {"pk": 48, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0004_auto__add_field_generatedcertificate_graded_certificate_id__add_field_"}}, {"pk": 49, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0005_auto__add_field_generatedcertificate_name"}}, {"pk": 50, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0006_auto__chg_field_generatedcertificate_certificate_id"}}, {"pk": 51, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0007_auto__add_revokedcertificate"}}, {"pk": 52, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add"}}, {"pk": 53, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge"}}, {"pk": 54, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti"}}, {"pk": 55, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat"}}, {"pk": 56, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific"}}, {"pk": 57, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0013_auto__add_field_generatedcertificate_error_reason"}}, {"pk": 58, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0014_adding_whitelist"}}, {"pk": 59, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:36Z", "app_name": "certificates", "migration": "0015_adding_mode_for_verified_certs"}}, {"pk": 60, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "instructor_task", "migration": "0001_initial"}}, {"pk": 61, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "instructor_task", "migration": "0002_add_subtask_field"}}, {"pk": 62, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "licenses", "migration": "0001_initial"}}, {"pk": 63, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0001_initial"}}, {"pk": 64, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0002_change_field_names"}}, {"pk": 65, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0003_add_optout_user"}}, {"pk": 66, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0004_migrate_optout_user"}}, {"pk": 67, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0005_remove_optout_email"}}, {"pk": 68, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0006_add_course_email_template"}}, {"pk": 69, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0007_load_course_email_template"}}, {"pk": 70, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:37Z", "app_name": "bulk_email", "migration": "0008_add_course_authorizations"}}, {"pk": 71, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:38Z", "app_name": "external_auth", "migration": "0001_initial"}}, {"pk": 72, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:38Z", "app_name": "wiki", "migration": "0001_initial"}}, {"pk": 73, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:38Z", "app_name": "wiki", "migration": "0002_auto__add_field_articleplugin_created"}}, {"pk": 74, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:38Z", "app_name": "wiki", "migration": "0003_auto__add_field_urlpath_article"}}, {"pk": 75, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:38Z", "app_name": "wiki", "migration": "0004_populate_urlpath__article"}}, {"pk": 76, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:38Z", "app_name": "wiki", "migration": "0005_auto__chg_field_urlpath_article"}}, {"pk": 77, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "wiki", "migration": "0006_auto__add_attachmentrevision__add_image__add_attachment"}}, {"pk": 78, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "wiki", "migration": "0007_auto__add_articlesubscription"}}, {"pk": 79, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "wiki", "migration": "0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_"}}, {"pk": 80, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "wiki", "migration": "0009_auto__add_field_imagerevision_width__add_field_imagerevision_height"}}, {"pk": 81, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "wiki", "migration": "0010_auto__chg_field_imagerevision_image"}}, {"pk": 82, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "wiki", "migration": "0011_auto__chg_field_imagerevision_width__chg_field_imagerevision_height"}}, {"pk": 83, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "django_notify", "migration": "0001_initial"}}, {"pk": 84, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:39Z", "app_name": "notifications", "migration": "0001_initial"}}, {"pk": 85, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "foldit", "migration": "0001_initial"}}, {"pk": 86, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0001_initial"}}, {"pk": 87, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0002_auto__add_sample"}}, {"pk": 88, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0003_auto__add_field_flag_note__add_field_switch_note__add_field_sample_not"}}, {"pk": 89, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0004_auto__add_field_flag_testing"}}, {"pk": 90, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0005_auto__add_field_flag_created__add_field_flag_modified"}}, {"pk": 91, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0006_auto__add_field_switch_created__add_field_switch_modified__add_field_s"}}, {"pk": 92, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0007_auto__chg_field_flag_created__chg_field_flag_modified__chg_field_switc"}}, {"pk": 93, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:40Z", "app_name": "waffle", "migration": "0008_auto__add_field_flag_languages"}}, {"pk": 94, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:41Z", "app_name": "django_comment_client", "migration": "0001_initial"}}, {"pk": 95, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:41Z", "app_name": "django_comment_common", "migration": "0001_initial"}}, {"pk": 96, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:41Z", "app_name": "notes", "migration": "0001_initial"}}, {"pk": 97, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:41Z", "app_name": "user_api", "migration": "0001_initial"}}, {"pk": 98, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "course_modes", "migration": "0001_initial"}}, {"pk": 99, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "course_modes", "migration": "0002_auto__add_field_coursemode_currency"}}, {"pk": 100, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "course_modes", "migration": "0003_auto__add_unique_coursemode_course_id_currency_mode_slug"}}, {"pk": 101, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "course_modes", "migration": "0004_auto__add_field_coursemode_expiration_date"}}, {"pk": 102, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "course_modes", "migration": "0005_auto__add_field_coursemode_expiration_datetime"}}, {"pk": 103, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "course_modes", "migration": "0006_expiration_date_to_datetime"}}, {"pk": 104, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "verify_student", "migration": "0001_initial"}}, {"pk": 105, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "linkedin", "migration": "0001_initial"}}, {"pk": 106, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "django_extensions", "migration": "0001_empty"}}, {"pk": 107, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:42Z", "app_name": "shoppingcart", "migration": "0001_initial"}}, {"pk": 108, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:43Z", "app_name": "shoppingcart", "migration": "0002_auto__add_field_paidcourseregistration_mode"}}, {"pk": 109, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:43Z", "app_name": "shoppingcart", "migration": "0003_auto__del_field_orderitem_line_cost"}}, {"pk": 110, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:43Z", "app_name": "shoppingcart", "migration": "0004_auto__add_field_orderitem_fulfilled_time"}}, {"pk": 111, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:43Z", "app_name": "shoppingcart", "migration": "0005_auto__add_paidcourseregistrationannotation__add_field_orderitem_report"}}, {"pk": 112, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:43Z", "app_name": "shoppingcart", "migration": "0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques"}}, {"pk": 113, "model": "south.migrationhistory", "fields": {"applied": "2014-01-25T15:57:43Z", "app_name": "shoppingcart", "migration": "0007_auto__add_field_orderitem_service_fee"}}, {"pk": 1, "model": "bulk_email.courseemailtemplate", "fields": {"plain_template": "{course_title}\n\n{{message_body}}\r\n----\r\nCopyright 2013 edX, All rights reserved.\r\n----\r\nConnect with edX:\r\nFacebook (http://facebook.com/edxonline)\r\nTwitter (http://twitter.com/edxonline)\r\nGoogle+ (https://plus.google.com/108235383044095082735)\r\nMeetup (http://www.meetup.com/edX-Communities/)\r\n----\r\nThis email was automatically sent from {platform_name}.\r\nYou are receiving this email at address {email} because you are enrolled in {course_title}\r\n(URL: {course_url} ).\r\nTo stop receiving email like this, update your account settings at {account_settings_url}.\r\n", "html_template": " Update from {course_title}

edX
Connect with edX:        

{course_title}


{{message_body}}
       
Copyright \u00a9 2013 edX, All rights reserved.


Our mailing address is:
edX
11 Cambridge Center, Suite 101
Cambridge, MA, USA 02142


This email was automatically sent from {platform_name}.
You are receiving this email at address {email} because you are enrolled in {course_title}.
To stop receiving email like this, update your course email settings here.
"}}, {"pk": 64, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 22}}, {"pk": 65, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 22}}, {"pk": 66, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 22}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 2}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 2}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 2}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 1}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 1}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 1}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 3}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 3}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 3}}, {"pk": 142, "model": "auth.permission", "fields": {"codename": "add_courseauthorization", "name": "Can add course authorization", "content_type": 48}}, {"pk": 143, "model": "auth.permission", "fields": {"codename": "change_courseauthorization", "name": "Can change course authorization", "content_type": 48}}, {"pk": 144, "model": "auth.permission", "fields": {"codename": "delete_courseauthorization", "name": "Can delete course authorization", "content_type": 48}}, {"pk": 133, "model": "auth.permission", "fields": {"codename": "add_courseemail", "name": "Can add course email", "content_type": 45}}, {"pk": 134, "model": "auth.permission", "fields": {"codename": "change_courseemail", "name": "Can change course email", "content_type": 45}}, {"pk": 135, "model": "auth.permission", "fields": {"codename": "delete_courseemail", "name": "Can delete course email", "content_type": 45}}, {"pk": 139, "model": "auth.permission", "fields": {"codename": "add_courseemailtemplate", "name": "Can add course email template", "content_type": 47}}, {"pk": 140, "model": "auth.permission", "fields": {"codename": "change_courseemailtemplate", "name": "Can change course email template", "content_type": 47}}, {"pk": 141, "model": "auth.permission", "fields": {"codename": "delete_courseemailtemplate", "name": "Can delete course email template", "content_type": 47}}, {"pk": 136, "model": "auth.permission", "fields": {"codename": "add_optout", "name": "Can add optout", "content_type": 46}}, {"pk": 137, "model": "auth.permission", "fields": {"codename": "change_optout", "name": "Can change optout", "content_type": 46}}, {"pk": 138, "model": "auth.permission", "fields": {"codename": "delete_optout", "name": "Can delete optout", "content_type": 46}}, {"pk": 118, "model": "auth.permission", "fields": {"codename": "add_certificatewhitelist", "name": "Can add certificate whitelist", "content_type": 40}}, {"pk": 119, "model": "auth.permission", "fields": {"codename": "change_certificatewhitelist", "name": "Can change certificate whitelist", "content_type": 40}}, {"pk": 120, "model": "auth.permission", "fields": {"codename": "delete_certificatewhitelist", "name": "Can delete certificate whitelist", "content_type": 40}}, {"pk": 121, "model": "auth.permission", "fields": {"codename": "add_generatedcertificate", "name": "Can add generated certificate", "content_type": 41}}, {"pk": 122, "model": "auth.permission", "fields": {"codename": "change_generatedcertificate", "name": "Can change generated certificate", "content_type": 41}}, {"pk": 123, "model": "auth.permission", "fields": {"codename": "delete_generatedcertificate", "name": "Can delete generated certificate", "content_type": 41}}, {"pk": 46, "model": "auth.permission", "fields": {"codename": "add_servercircuit", "name": "Can add server circuit", "content_type": 16}}, {"pk": 47, "model": "auth.permission", "fields": {"codename": "change_servercircuit", "name": "Can change server circuit", "content_type": 16}}, {"pk": 48, "model": "auth.permission", "fields": {"codename": "delete_servercircuit", "name": "Can delete server circuit", "content_type": 16}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 4}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 4}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 4}}, {"pk": 82, "model": "auth.permission", "fields": {"codename": "add_offlinecomputedgrade", "name": "Can add offline computed grade", "content_type": 28}}, {"pk": 83, "model": "auth.permission", "fields": {"codename": "change_offlinecomputedgrade", "name": "Can change offline computed grade", "content_type": 28}}, {"pk": 84, "model": "auth.permission", "fields": {"codename": "delete_offlinecomputedgrade", "name": "Can delete offline computed grade", "content_type": 28}}, {"pk": 85, "model": "auth.permission", "fields": {"codename": "add_offlinecomputedgradelog", "name": "Can add offline computed grade log", "content_type": 29}}, {"pk": 86, "model": "auth.permission", "fields": {"codename": "change_offlinecomputedgradelog", "name": "Can change offline computed grade log", "content_type": 29}}, {"pk": 87, "model": "auth.permission", "fields": {"codename": "delete_offlinecomputedgradelog", "name": "Can delete offline computed grade log", "content_type": 29}}, {"pk": 67, "model": "auth.permission", "fields": {"codename": "add_studentmodule", "name": "Can add student module", "content_type": 23}}, {"pk": 68, "model": "auth.permission", "fields": {"codename": "change_studentmodule", "name": "Can change student module", "content_type": 23}}, {"pk": 69, "model": "auth.permission", "fields": {"codename": "delete_studentmodule", "name": "Can delete student module", "content_type": 23}}, {"pk": 70, "model": "auth.permission", "fields": {"codename": "add_studentmodulehistory", "name": "Can add student module history", "content_type": 24}}, {"pk": 71, "model": "auth.permission", "fields": {"codename": "change_studentmodulehistory", "name": "Can change student module history", "content_type": 24}}, {"pk": 72, "model": "auth.permission", "fields": {"codename": "delete_studentmodulehistory", "name": "Can delete student module history", "content_type": 24}}, {"pk": 79, "model": "auth.permission", "fields": {"codename": "add_xmodulestudentinfofield", "name": "Can add x module student info field", "content_type": 27}}, {"pk": 80, "model": "auth.permission", "fields": {"codename": "change_xmodulestudentinfofield", "name": "Can change x module student info field", "content_type": 27}}, {"pk": 81, "model": "auth.permission", "fields": {"codename": "delete_xmodulestudentinfofield", "name": "Can delete x module student info field", "content_type": 27}}, {"pk": 76, "model": "auth.permission", "fields": {"codename": "add_xmodulestudentprefsfield", "name": "Can add x module student prefs field", "content_type": 26}}, {"pk": 77, "model": "auth.permission", "fields": {"codename": "change_xmodulestudentprefsfield", "name": "Can change x module student prefs field", "content_type": 26}}, {"pk": 78, "model": "auth.permission", "fields": {"codename": "delete_xmodulestudentprefsfield", "name": "Can delete x module student prefs field", "content_type": 26}}, {"pk": 73, "model": "auth.permission", "fields": {"codename": "add_xmoduleuserstatesummaryfield", "name": "Can add x module user state summary field", "content_type": 25}}, {"pk": 74, "model": "auth.permission", "fields": {"codename": "change_xmoduleuserstatesummaryfield", "name": "Can change x module user state summary field", "content_type": 25}}, {"pk": 75, "model": "auth.permission", "fields": {"codename": "delete_xmoduleuserstatesummaryfield", "name": "Can delete x module user state summary field", "content_type": 25}}, {"pk": 52, "model": "auth.permission", "fields": {"codename": "add_courseusergroup", "name": "Can add course user group", "content_type": 18}}, {"pk": 53, "model": "auth.permission", "fields": {"codename": "change_courseusergroup", "name": "Can change course user group", "content_type": 18}}, {"pk": 54, "model": "auth.permission", "fields": {"codename": "delete_courseusergroup", "name": "Can delete course user group", "content_type": 18}}, {"pk": 214, "model": "auth.permission", "fields": {"codename": "add_coursemode", "name": "Can add course mode", "content_type": 71}}, {"pk": 215, "model": "auth.permission", "fields": {"codename": "change_coursemode", "name": "Can change course mode", "content_type": 71}}, {"pk": 216, "model": "auth.permission", "fields": {"codename": "delete_coursemode", "name": "Can delete course mode", "content_type": 71}}, {"pk": 190, "model": "auth.permission", "fields": {"codename": "add_notification", "name": "Can add notification", "content_type": 63}}, {"pk": 191, "model": "auth.permission", "fields": {"codename": "change_notification", "name": "Can change notification", "content_type": 63}}, {"pk": 192, "model": "auth.permission", "fields": {"codename": "delete_notification", "name": "Can delete notification", "content_type": 63}}, {"pk": 181, "model": "auth.permission", "fields": {"codename": "add_notificationtype", "name": "Can add type", "content_type": 60}}, {"pk": 182, "model": "auth.permission", "fields": {"codename": "change_notificationtype", "name": "Can change type", "content_type": 60}}, {"pk": 183, "model": "auth.permission", "fields": {"codename": "delete_notificationtype", "name": "Can delete type", "content_type": 60}}, {"pk": 184, "model": "auth.permission", "fields": {"codename": "add_settings", "name": "Can add settings", "content_type": 61}}, {"pk": 185, "model": "auth.permission", "fields": {"codename": "change_settings", "name": "Can change settings", "content_type": 61}}, {"pk": 186, "model": "auth.permission", "fields": {"codename": "delete_settings", "name": "Can delete settings", "content_type": 61}}, {"pk": 187, "model": "auth.permission", "fields": {"codename": "add_subscription", "name": "Can add subscription", "content_type": 62}}, {"pk": 188, "model": "auth.permission", "fields": {"codename": "change_subscription", "name": "Can change subscription", "content_type": 62}}, {"pk": 189, "model": "auth.permission", "fields": {"codename": "delete_subscription", "name": "Can delete subscription", "content_type": 62}}, {"pk": 58, "model": "auth.permission", "fields": {"codename": "add_association", "name": "Can add association", "content_type": 20}}, {"pk": 59, "model": "auth.permission", "fields": {"codename": "change_association", "name": "Can change association", "content_type": 20}}, {"pk": 60, "model": "auth.permission", "fields": {"codename": "delete_association", "name": "Can delete association", "content_type": 20}}, {"pk": 55, "model": "auth.permission", "fields": {"codename": "add_nonce", "name": "Can add nonce", "content_type": 19}}, {"pk": 56, "model": "auth.permission", "fields": {"codename": "change_nonce", "name": "Can change nonce", "content_type": 19}}, {"pk": 57, "model": "auth.permission", "fields": {"codename": "delete_nonce", "name": "Can delete nonce", "content_type": 19}}, {"pk": 61, "model": "auth.permission", "fields": {"codename": "add_useropenid", "name": "Can add user open id", "content_type": 21}}, {"pk": 62, "model": "auth.permission", "fields": {"codename": "change_useropenid", "name": "Can change user open id", "content_type": 21}}, {"pk": 63, "model": "auth.permission", "fields": {"codename": "delete_useropenid", "name": "Can delete user open id", "content_type": 21}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_crontabschedule", "name": "Can add crontab", "content_type": 10}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_crontabschedule", "name": "Can change crontab", "content_type": 10}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_crontabschedule", "name": "Can delete crontab", "content_type": 10}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_intervalschedule", "name": "Can add interval", "content_type": 9}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_intervalschedule", "name": "Can change interval", "content_type": 9}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_intervalschedule", "name": "Can delete interval", "content_type": 9}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_periodictask", "name": "Can add periodic task", "content_type": 12}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_periodictask", "name": "Can change periodic task", "content_type": 12}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_periodictask", "name": "Can delete periodic task", "content_type": 12}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_periodictasks", "name": "Can add periodic tasks", "content_type": 11}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_periodictasks", "name": "Can change periodic tasks", "content_type": 11}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_periodictasks", "name": "Can delete periodic tasks", "content_type": 11}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_taskmeta", "name": "Can add task state", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_taskmeta", "name": "Can change task state", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_taskmeta", "name": "Can delete task state", "content_type": 7}}, {"pk": 22, "model": "auth.permission", "fields": {"codename": "add_tasksetmeta", "name": "Can add saved group result", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_tasksetmeta", "name": "Can change saved group result", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_tasksetmeta", "name": "Can delete saved group result", "content_type": 8}}, {"pk": 40, "model": "auth.permission", "fields": {"codename": "add_taskstate", "name": "Can add task", "content_type": 14}}, {"pk": 41, "model": "auth.permission", "fields": {"codename": "change_taskstate", "name": "Can change task", "content_type": 14}}, {"pk": 42, "model": "auth.permission", "fields": {"codename": "delete_taskstate", "name": "Can delete task", "content_type": 14}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_workerstate", "name": "Can add worker", "content_type": 13}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_workerstate", "name": "Can change worker", "content_type": 13}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_workerstate", "name": "Can delete worker", "content_type": 13}}, {"pk": 145, "model": "auth.permission", "fields": {"codename": "add_externalauthmap", "name": "Can add external auth map", "content_type": 49}}, {"pk": 146, "model": "auth.permission", "fields": {"codename": "change_externalauthmap", "name": "Can change external auth map", "content_type": 49}}, {"pk": 147, "model": "auth.permission", "fields": {"codename": "delete_externalauthmap", "name": "Can delete external auth map", "content_type": 49}}, {"pk": 196, "model": "auth.permission", "fields": {"codename": "add_puzzlecomplete", "name": "Can add puzzle complete", "content_type": 65}}, {"pk": 197, "model": "auth.permission", "fields": {"codename": "change_puzzlecomplete", "name": "Can change puzzle complete", "content_type": 65}}, {"pk": 198, "model": "auth.permission", "fields": {"codename": "delete_puzzlecomplete", "name": "Can delete puzzle complete", "content_type": 65}}, {"pk": 193, "model": "auth.permission", "fields": {"codename": "add_score", "name": "Can add score", "content_type": 64}}, {"pk": 194, "model": "auth.permission", "fields": {"codename": "change_score", "name": "Can change score", "content_type": 64}}, {"pk": 195, "model": "auth.permission", "fields": {"codename": "delete_score", "name": "Can delete score", "content_type": 64}}, {"pk": 124, "model": "auth.permission", "fields": {"codename": "add_instructortask", "name": "Can add instructor task", "content_type": 42}}, {"pk": 125, "model": "auth.permission", "fields": {"codename": "change_instructortask", "name": "Can change instructor task", "content_type": 42}}, {"pk": 126, "model": "auth.permission", "fields": {"codename": "delete_instructortask", "name": "Can delete instructor task", "content_type": 42}}, {"pk": 127, "model": "auth.permission", "fields": {"codename": "add_coursesoftware", "name": "Can add course software", "content_type": 43}}, {"pk": 128, "model": "auth.permission", "fields": {"codename": "change_coursesoftware", "name": "Can change course software", "content_type": 43}}, {"pk": 129, "model": "auth.permission", "fields": {"codename": "delete_coursesoftware", "name": "Can delete course software", "content_type": 43}}, {"pk": 130, "model": "auth.permission", "fields": {"codename": "add_userlicense", "name": "Can add user license", "content_type": 44}}, {"pk": 131, "model": "auth.permission", "fields": {"codename": "change_userlicense", "name": "Can change user license", "content_type": 44}}, {"pk": 132, "model": "auth.permission", "fields": {"codename": "delete_userlicense", "name": "Can delete user license", "content_type": 44}}, {"pk": 220, "model": "auth.permission", "fields": {"codename": "add_linkedin", "name": "Can add linked in", "content_type": 73}}, {"pk": 221, "model": "auth.permission", "fields": {"codename": "change_linkedin", "name": "Can change linked in", "content_type": 73}}, {"pk": 222, "model": "auth.permission", "fields": {"codename": "delete_linkedin", "name": "Can delete linked in", "content_type": 73}}, {"pk": 208, "model": "auth.permission", "fields": {"codename": "add_note", "name": "Can add note", "content_type": 69}}, {"pk": 209, "model": "auth.permission", "fields": {"codename": "change_note", "name": "Can change note", "content_type": 69}}, {"pk": 210, "model": "auth.permission", "fields": {"codename": "delete_note", "name": "Can delete note", "content_type": 69}}, {"pk": 49, "model": "auth.permission", "fields": {"codename": "add_psychometricdata", "name": "Can add psychometric data", "content_type": 17}}, {"pk": 50, "model": "auth.permission", "fields": {"codename": "change_psychometricdata", "name": "Can change psychometric data", "content_type": 17}}, {"pk": 51, "model": "auth.permission", "fields": {"codename": "delete_psychometricdata", "name": "Can delete psychometric data", "content_type": 17}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 5}}, {"pk": 235, "model": "auth.permission", "fields": {"codename": "add_certificateitem", "name": "Can add certificate item", "content_type": 78}}, {"pk": 236, "model": "auth.permission", "fields": {"codename": "change_certificateitem", "name": "Can change certificate item", "content_type": 78}}, {"pk": 237, "model": "auth.permission", "fields": {"codename": "delete_certificateitem", "name": "Can delete certificate item", "content_type": 78}}, {"pk": 223, "model": "auth.permission", "fields": {"codename": "add_order", "name": "Can add order", "content_type": 74}}, {"pk": 224, "model": "auth.permission", "fields": {"codename": "change_order", "name": "Can change order", "content_type": 74}}, {"pk": 225, "model": "auth.permission", "fields": {"codename": "delete_order", "name": "Can delete order", "content_type": 74}}, {"pk": 226, "model": "auth.permission", "fields": {"codename": "add_orderitem", "name": "Can add order item", "content_type": 75}}, {"pk": 227, "model": "auth.permission", "fields": {"codename": "change_orderitem", "name": "Can change order item", "content_type": 75}}, {"pk": 228, "model": "auth.permission", "fields": {"codename": "delete_orderitem", "name": "Can delete order item", "content_type": 75}}, {"pk": 229, "model": "auth.permission", "fields": {"codename": "add_paidcourseregistration", "name": "Can add paid course registration", "content_type": 76}}, {"pk": 230, "model": "auth.permission", "fields": {"codename": "change_paidcourseregistration", "name": "Can change paid course registration", "content_type": 76}}, {"pk": 231, "model": "auth.permission", "fields": {"codename": "delete_paidcourseregistration", "name": "Can delete paid course registration", "content_type": 76}}, {"pk": 232, "model": "auth.permission", "fields": {"codename": "add_paidcourseregistrationannotation", "name": "Can add paid course registration annotation", "content_type": 77}}, {"pk": 233, "model": "auth.permission", "fields": {"codename": "change_paidcourseregistrationannotation", "name": "Can change paid course registration annotation", "content_type": 77}}, {"pk": 234, "model": "auth.permission", "fields": {"codename": "delete_paidcourseregistrationannotation", "name": "Can delete paid course registration annotation", "content_type": 77}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_site", "name": "Can add site", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_site", "name": "Can change site", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 6}}, {"pk": 43, "model": "auth.permission", "fields": {"codename": "add_migrationhistory", "name": "Can add migration history", "content_type": 15}}, {"pk": 44, "model": "auth.permission", "fields": {"codename": "change_migrationhistory", "name": "Can change migration history", "content_type": 15}}, {"pk": 45, "model": "auth.permission", "fields": {"codename": "delete_migrationhistory", "name": "Can delete migration history", "content_type": 15}}, {"pk": 88, "model": "auth.permission", "fields": {"codename": "add_anonymoususerid", "name": "Can add anonymous user id", "content_type": 30}}, {"pk": 89, "model": "auth.permission", "fields": {"codename": "change_anonymoususerid", "name": "Can change anonymous user id", "content_type": 30}}, {"pk": 90, "model": "auth.permission", "fields": {"codename": "delete_anonymoususerid", "name": "Can delete anonymous user id", "content_type": 30}}, {"pk": 109, "model": "auth.permission", "fields": {"codename": "add_courseenrollment", "name": "Can add course enrollment", "content_type": 37}}, {"pk": 110, "model": "auth.permission", "fields": {"codename": "change_courseenrollment", "name": "Can change course enrollment", "content_type": 37}}, {"pk": 111, "model": "auth.permission", "fields": {"codename": "delete_courseenrollment", "name": "Can delete course enrollment", "content_type": 37}}, {"pk": 112, "model": "auth.permission", "fields": {"codename": "add_courseenrollmentallowed", "name": "Can add course enrollment allowed", "content_type": 38}}, {"pk": 113, "model": "auth.permission", "fields": {"codename": "change_courseenrollmentallowed", "name": "Can change course enrollment allowed", "content_type": 38}}, {"pk": 114, "model": "auth.permission", "fields": {"codename": "delete_courseenrollmentallowed", "name": "Can delete course enrollment allowed", "content_type": 38}}, {"pk": 106, "model": "auth.permission", "fields": {"codename": "add_pendingemailchange", "name": "Can add pending email change", "content_type": 36}}, {"pk": 107, "model": "auth.permission", "fields": {"codename": "change_pendingemailchange", "name": "Can change pending email change", "content_type": 36}}, {"pk": 108, "model": "auth.permission", "fields": {"codename": "delete_pendingemailchange", "name": "Can delete pending email change", "content_type": 36}}, {"pk": 103, "model": "auth.permission", "fields": {"codename": "add_pendingnamechange", "name": "Can add pending name change", "content_type": 35}}, {"pk": 104, "model": "auth.permission", "fields": {"codename": "change_pendingnamechange", "name": "Can change pending name change", "content_type": 35}}, {"pk": 105, "model": "auth.permission", "fields": {"codename": "delete_pendingnamechange", "name": "Can delete pending name change", "content_type": 35}}, {"pk": 100, "model": "auth.permission", "fields": {"codename": "add_registration", "name": "Can add registration", "content_type": 34}}, {"pk": 101, "model": "auth.permission", "fields": {"codename": "change_registration", "name": "Can change registration", "content_type": 34}}, {"pk": 102, "model": "auth.permission", "fields": {"codename": "delete_registration", "name": "Can delete registration", "content_type": 34}}, {"pk": 94, "model": "auth.permission", "fields": {"codename": "add_userprofile", "name": "Can add user profile", "content_type": 32}}, {"pk": 95, "model": "auth.permission", "fields": {"codename": "change_userprofile", "name": "Can change user profile", "content_type": 32}}, {"pk": 96, "model": "auth.permission", "fields": {"codename": "delete_userprofile", "name": "Can delete user profile", "content_type": 32}}, {"pk": 91, "model": "auth.permission", "fields": {"codename": "add_userstanding", "name": "Can add user standing", "content_type": 31}}, {"pk": 92, "model": "auth.permission", "fields": {"codename": "change_userstanding", "name": "Can change user standing", "content_type": 31}}, {"pk": 93, "model": "auth.permission", "fields": {"codename": "delete_userstanding", "name": "Can delete user standing", "content_type": 31}}, {"pk": 97, "model": "auth.permission", "fields": {"codename": "add_usertestgroup", "name": "Can add user test group", "content_type": 33}}, {"pk": 98, "model": "auth.permission", "fields": {"codename": "change_usertestgroup", "name": "Can change user test group", "content_type": 33}}, {"pk": 99, "model": "auth.permission", "fields": {"codename": "delete_usertestgroup", "name": "Can delete user test group", "content_type": 33}}, {"pk": 115, "model": "auth.permission", "fields": {"codename": "add_trackinglog", "name": "Can add tracking log", "content_type": 39}}, {"pk": 116, "model": "auth.permission", "fields": {"codename": "change_trackinglog", "name": "Can change tracking log", "content_type": 39}}, {"pk": 117, "model": "auth.permission", "fields": {"codename": "delete_trackinglog", "name": "Can delete tracking log", "content_type": 39}}, {"pk": 211, "model": "auth.permission", "fields": {"codename": "add_userpreference", "name": "Can add user preference", "content_type": 70}}, {"pk": 212, "model": "auth.permission", "fields": {"codename": "change_userpreference", "name": "Can change user preference", "content_type": 70}}, {"pk": 213, "model": "auth.permission", "fields": {"codename": "delete_userpreference", "name": "Can delete user preference", "content_type": 70}}, {"pk": 217, "model": "auth.permission", "fields": {"codename": "add_softwaresecurephotoverification", "name": "Can add software secure photo verification", "content_type": 72}}, {"pk": 218, "model": "auth.permission", "fields": {"codename": "change_softwaresecurephotoverification", "name": "Can change software secure photo verification", "content_type": 72}}, {"pk": 219, "model": "auth.permission", "fields": {"codename": "delete_softwaresecurephotoverification", "name": "Can delete software secure photo verification", "content_type": 72}}, {"pk": 199, "model": "auth.permission", "fields": {"codename": "add_flag", "name": "Can add flag", "content_type": 66}}, {"pk": 200, "model": "auth.permission", "fields": {"codename": "change_flag", "name": "Can change flag", "content_type": 66}}, {"pk": 201, "model": "auth.permission", "fields": {"codename": "delete_flag", "name": "Can delete flag", "content_type": 66}}, {"pk": 205, "model": "auth.permission", "fields": {"codename": "add_sample", "name": "Can add sample", "content_type": 68}}, {"pk": 206, "model": "auth.permission", "fields": {"codename": "change_sample", "name": "Can change sample", "content_type": 68}}, {"pk": 207, "model": "auth.permission", "fields": {"codename": "delete_sample", "name": "Can delete sample", "content_type": 68}}, {"pk": 202, "model": "auth.permission", "fields": {"codename": "add_switch", "name": "Can add switch", "content_type": 67}}, {"pk": 203, "model": "auth.permission", "fields": {"codename": "change_switch", "name": "Can change switch", "content_type": 67}}, {"pk": 204, "model": "auth.permission", "fields": {"codename": "delete_switch", "name": "Can delete switch", "content_type": 67}}, {"pk": 148, "model": "auth.permission", "fields": {"codename": "add_article", "name": "Can add article", "content_type": 50}}, {"pk": 152, "model": "auth.permission", "fields": {"codename": "assign", "name": "Can change ownership of any article", "content_type": 50}}, {"pk": 149, "model": "auth.permission", "fields": {"codename": "change_article", "name": "Can change article", "content_type": 50}}, {"pk": 150, "model": "auth.permission", "fields": {"codename": "delete_article", "name": "Can delete article", "content_type": 50}}, {"pk": 153, "model": "auth.permission", "fields": {"codename": "grant", "name": "Can assign permissions to other users", "content_type": 50}}, {"pk": 151, "model": "auth.permission", "fields": {"codename": "moderate", "name": "Can edit all articles and lock/unlock/restore", "content_type": 50}}, {"pk": 154, "model": "auth.permission", "fields": {"codename": "add_articleforobject", "name": "Can add Article for object", "content_type": 51}}, {"pk": 155, "model": "auth.permission", "fields": {"codename": "change_articleforobject", "name": "Can change Article for object", "content_type": 51}}, {"pk": 156, "model": "auth.permission", "fields": {"codename": "delete_articleforobject", "name": "Can delete Article for object", "content_type": 51}}, {"pk": 163, "model": "auth.permission", "fields": {"codename": "add_articleplugin", "name": "Can add article plugin", "content_type": 54}}, {"pk": 164, "model": "auth.permission", "fields": {"codename": "change_articleplugin", "name": "Can change article plugin", "content_type": 54}}, {"pk": 165, "model": "auth.permission", "fields": {"codename": "delete_articleplugin", "name": "Can delete article plugin", "content_type": 54}}, {"pk": 157, "model": "auth.permission", "fields": {"codename": "add_articlerevision", "name": "Can add article revision", "content_type": 52}}, {"pk": 158, "model": "auth.permission", "fields": {"codename": "change_articlerevision", "name": "Can change article revision", "content_type": 52}}, {"pk": 159, "model": "auth.permission", "fields": {"codename": "delete_articlerevision", "name": "Can delete article revision", "content_type": 52}}, {"pk": 178, "model": "auth.permission", "fields": {"codename": "add_articlesubscription", "name": "Can add article subscription", "content_type": 59}}, {"pk": 179, "model": "auth.permission", "fields": {"codename": "change_articlesubscription", "name": "Can change article subscription", "content_type": 59}}, {"pk": 180, "model": "auth.permission", "fields": {"codename": "delete_articlesubscription", "name": "Can delete article subscription", "content_type": 59}}, {"pk": 166, "model": "auth.permission", "fields": {"codename": "add_reusableplugin", "name": "Can add reusable plugin", "content_type": 55}}, {"pk": 167, "model": "auth.permission", "fields": {"codename": "change_reusableplugin", "name": "Can change reusable plugin", "content_type": 55}}, {"pk": 168, "model": "auth.permission", "fields": {"codename": "delete_reusableplugin", "name": "Can delete reusable plugin", "content_type": 55}}, {"pk": 172, "model": "auth.permission", "fields": {"codename": "add_revisionplugin", "name": "Can add revision plugin", "content_type": 57}}, {"pk": 173, "model": "auth.permission", "fields": {"codename": "change_revisionplugin", "name": "Can change revision plugin", "content_type": 57}}, {"pk": 174, "model": "auth.permission", "fields": {"codename": "delete_revisionplugin", "name": "Can delete revision plugin", "content_type": 57}}, {"pk": 175, "model": "auth.permission", "fields": {"codename": "add_revisionpluginrevision", "name": "Can add revision plugin revision", "content_type": 58}}, {"pk": 176, "model": "auth.permission", "fields": {"codename": "change_revisionpluginrevision", "name": "Can change revision plugin revision", "content_type": 58}}, {"pk": 177, "model": "auth.permission", "fields": {"codename": "delete_revisionpluginrevision", "name": "Can delete revision plugin revision", "content_type": 58}}, {"pk": 169, "model": "auth.permission", "fields": {"codename": "add_simpleplugin", "name": "Can add simple plugin", "content_type": 56}}, {"pk": 170, "model": "auth.permission", "fields": {"codename": "change_simpleplugin", "name": "Can change simple plugin", "content_type": 56}}, {"pk": 171, "model": "auth.permission", "fields": {"codename": "delete_simpleplugin", "name": "Can delete simple plugin", "content_type": 56}}, {"pk": 160, "model": "auth.permission", "fields": {"codename": "add_urlpath", "name": "Can add URL path", "content_type": 53}}, {"pk": 161, "model": "auth.permission", "fields": {"codename": "change_urlpath", "name": "Can change URL path", "content_type": 53}}, {"pk": 162, "model": "auth.permission", "fields": {"codename": "delete_urlpath", "name": "Can delete URL path", "content_type": 53}}] \ No newline at end of file diff --git a/common/test/db_cache/bok_choy_schema.sql b/common/test/db_cache/bok_choy_schema.sql new file mode 100644 index 0000000000..276ebdf778 --- /dev/null +++ b/common/test/db_cache/bok_choy_schema.sql @@ -0,0 +1,1568 @@ + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `auth_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_group` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(80) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_group_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_group_permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `group_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `group_id` (`group_id`,`permission_id`), + KEY `auth_group_permissions_bda51c3c` (`group_id`), + KEY `auth_group_permissions_1e014c8f` (`permission_id`), + CONSTRAINT `group_id_refs_id_3cea63fe` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `permission_id_refs_id_a7792de1` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `content_type_id` int(11) NOT NULL, + `codename` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `content_type_id` (`content_type_id`,`codename`), + KEY `auth_permission_e4470c6e` (`content_type_id`), + CONSTRAINT `content_type_id_refs_id_728de91f` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=238 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_registration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_registration` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `activation_key` varchar(32) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + UNIQUE KEY `activation_key` (`activation_key`), + CONSTRAINT `user_id_refs_id_3fe8066a03e5b0b5` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(30) NOT NULL, + `first_name` varchar(30) NOT NULL, + `last_name` varchar(30) NOT NULL, + `email` varchar(75) NOT NULL, + `password` varchar(128) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `is_superuser` tinyint(1) NOT NULL, + `last_login` datetime NOT NULL, + `date_joined` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`), + UNIQUE KEY `email` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_user_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user_groups` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`,`group_id`), + KEY `auth_user_groups_fbfc09f1` (`user_id`), + KEY `auth_user_groups_bda51c3c` (`group_id`), + CONSTRAINT `user_id_refs_id_831107f1` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `group_id_refs_id_f0ee9890` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_user_user_permissions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_user_user_permissions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`,`permission_id`), + KEY `auth_user_user_permissions_fbfc09f1` (`user_id`), + KEY `auth_user_user_permissions_1e014c8f` (`permission_id`), + CONSTRAINT `user_id_refs_id_f2045483` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `permission_id_refs_id_67e79cb` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `auth_userprofile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `auth_userprofile` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `language` varchar(255) NOT NULL, + `location` varchar(255) NOT NULL, + `meta` longtext NOT NULL, + `courseware` varchar(255) NOT NULL, + `gender` varchar(6) DEFAULT NULL, + `mailing_address` longtext, + `year_of_birth` int(11) DEFAULT NULL, + `level_of_education` varchar(6) DEFAULT NULL, + `goals` longtext, + `allow_certificate` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + KEY `auth_userprofile_52094d6e` (`name`), + KEY `auth_userprofile_8a7ac9ab` (`language`), + KEY `auth_userprofile_b54954de` (`location`), + KEY `auth_userprofile_fca3d292` (`gender`), + KEY `auth_userprofile_d85587` (`year_of_birth`), + KEY `auth_userprofile_551e365c` (`level_of_education`), + CONSTRAINT `user_id_refs_id_3daaa960628b4c11` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_courseauthorization`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_courseauthorization` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `email_enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `bulk_email_courseauthorization_ff48d8e5` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_courseemail`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_courseemail` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `sender_id` int(11) DEFAULT NULL, + `slug` varchar(128) NOT NULL, + `subject` varchar(128) NOT NULL, + `html_message` longtext, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + `course_id` varchar(255) NOT NULL, + `to_option` varchar(64) NOT NULL, + `text_message` longtext, + PRIMARY KEY (`id`), + KEY `bulk_email_courseemail_901f59e9` (`sender_id`), + KEY `bulk_email_courseemail_36af87d1` (`slug`), + KEY `bulk_email_courseemail_ff48d8e5` (`course_id`), + CONSTRAINT `sender_id_refs_id_5e8b8f9870ed6279` FOREIGN KEY (`sender_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_courseemailtemplate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_courseemailtemplate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `html_template` longtext, + `plain_template` longtext, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `bulk_email_optout`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bulk_email_optout` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `user_id` int(11) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `bulk_email_optout_course_id_368f7519b2997e1a_uniq` (`course_id`,`user_id`), + KEY `bulk_email_optout_ff48d8e5` (`course_id`), + KEY `bulk_email_optout_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_fc2bac99e68e67c` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `celery_taskmeta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `celery_taskmeta` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `task_id` varchar(255) NOT NULL, + `status` varchar(50) NOT NULL, + `result` longtext, + `date_done` datetime NOT NULL, + `traceback` longtext, + `hidden` tinyint(1) NOT NULL, + `meta` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `task_id` (`task_id`), + KEY `celery_taskmeta_c91f1bf` (`hidden`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `celery_tasksetmeta`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `celery_tasksetmeta` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `taskset_id` varchar(255) NOT NULL, + `result` longtext NOT NULL, + `date_done` datetime NOT NULL, + `hidden` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `taskset_id` (`taskset_id`), + KEY `celery_tasksetmeta_c91f1bf` (`hidden`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_certificatewhitelist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_certificatewhitelist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `course_id` varchar(255) NOT NULL, + `whitelist` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `certificates_certificatewhitelist_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_517c1c6aa7ba9306` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `certificates_generatedcertificate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `certificates_generatedcertificate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `download_url` varchar(128) NOT NULL, + `grade` varchar(5) NOT NULL, + `course_id` varchar(255) NOT NULL, + `key` varchar(32) NOT NULL, + `distinction` tinyint(1) NOT NULL, + `status` varchar(32) NOT NULL, + `verify_uuid` varchar(32) NOT NULL, + `download_uuid` varchar(32) NOT NULL, + `name` varchar(255) NOT NULL, + `created_date` datetime NOT NULL, + `modified_date` datetime NOT NULL, + `error_reason` varchar(512) NOT NULL, + `mode` varchar(32) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `certificates_generatedcertifica_course_id_1389f6b2d72f5e78_uniq` (`course_id`,`user_id`), + KEY `certificates_generatedcertificate_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_6c4fb3478e23bfe2` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `circuit_servercircuit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `circuit_servercircuit` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `schematic` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_courseusergroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_courseusergroup` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `group_type` varchar(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`,`course_id`), + KEY `course_groups_courseusergroup_ff48d8e5` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_groups_courseusergroup_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_groups_courseusergroup_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `courseusergroup_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseusergroup_id` (`courseusergroup_id`,`user_id`), + KEY `course_groups_courseusergroup_users_caee1c64` (`courseusergroup_id`), + KEY `course_groups_courseusergroup_users_fbfc09f1` (`user_id`), + CONSTRAINT `courseusergroup_id_refs_id_d26180aa` FOREIGN KEY (`courseusergroup_id`) REFERENCES `course_groups_courseusergroup` (`id`), + CONSTRAINT `user_id_refs_id_bf33b47a` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `course_modes_coursemode`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `course_modes_coursemode` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `mode_slug` varchar(100) NOT NULL, + `mode_display_name` varchar(255) NOT NULL, + `min_price` int(11) NOT NULL, + `suggested_prices` varchar(255) NOT NULL, + `currency` varchar(8) NOT NULL, + `expiration_date` date DEFAULT NULL, + `expiration_datetime` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `course_modes_coursemode_course_id_69505c92fc09856_uniq` (`course_id`,`currency`,`mode_slug`), + KEY `course_modes_coursemode_ff48d8e5` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_offlinecomputedgrade`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_offlinecomputedgrade` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `course_id` varchar(255) NOT NULL, + `created` datetime DEFAULT NULL, + `updated` datetime NOT NULL, + `gradeset` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_offlinecomputedgrade_user_id_46133bbd0926078f_uniq` (`user_id`,`course_id`), + KEY `courseware_offlinecomputedgrade_fbfc09f1` (`user_id`), + KEY `courseware_offlinecomputedgrade_ff48d8e5` (`course_id`), + KEY `courseware_offlinecomputedgrade_3216ff68` (`created`), + KEY `courseware_offlinecomputedgrade_8aac229` (`updated`), + CONSTRAINT `user_id_refs_id_7b3221f638cf339d` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_offlinecomputedgradelog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_offlinecomputedgradelog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(255) NOT NULL, + `created` datetime DEFAULT NULL, + `seconds` int(11) NOT NULL, + `nstudents` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `courseware_offlinecomputedgradelog_ff48d8e5` (`course_id`), + KEY `courseware_offlinecomputedgradelog_3216ff68` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_studentmodule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_studentmodule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `module_type` varchar(32) NOT NULL, + `module_id` varchar(255) NOT NULL, + `student_id` int(11) NOT NULL, + `state` longtext, + `grade` double DEFAULT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + `max_grade` double DEFAULT NULL, + `done` varchar(8) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_studentmodule_student_id_635d77aea1256de5_uniq` (`student_id`,`module_id`,`course_id`), + KEY `courseware_studentmodule_42ff452e` (`student_id`), + KEY `courseware_studentmodule_3216ff68` (`created`), + KEY `courseware_studentmodule_6dff86b5` (`grade`), + KEY `courseware_studentmodule_5436e97a` (`modified`), + KEY `courseware_studentmodule_2d8768ff` (`module_type`), + KEY `courseware_studentmodule_f53ed95e` (`module_id`), + KEY `courseware_studentmodule_1923c03f` (`done`), + KEY `courseware_studentmodule_ff48d8e5` (`course_id`), + CONSTRAINT `student_id_refs_id_51af713179ba2570` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_studentmodulehistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_studentmodulehistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `student_module_id` int(11) NOT NULL, + `version` varchar(255) DEFAULT NULL, + `created` datetime NOT NULL, + `state` longtext, + `grade` double DEFAULT NULL, + `max_grade` double DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `courseware_studentmodulehistory_5656f5fe` (`student_module_id`), + KEY `courseware_studentmodulehistory_659105e4` (`version`), + KEY `courseware_studentmodulehistory_3216ff68` (`created`), + CONSTRAINT `student_module_id_refs_id_51904344e48636f4` FOREIGN KEY (`student_module_id`) REFERENCES `courseware_studentmodule` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_xmodulestudentinfofield`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_xmodulestudentinfofield` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_name` varchar(64) NOT NULL, + `value` longtext NOT NULL, + `student_id` int(11) NOT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_xmodulestudentinfof_student_id_33f2f772c49db067_uniq` (`student_id`,`field_name`), + KEY `courseware_xmodulestudentinfofield_7e1499` (`field_name`), + KEY `courseware_xmodulestudentinfofield_42ff452e` (`student_id`), + KEY `courseware_xmodulestudentinfofield_3216ff68` (`created`), + KEY `courseware_xmodulestudentinfofield_5436e97a` (`modified`), + CONSTRAINT `student_id_refs_id_66e06928bfcfbe68` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_xmodulestudentprefsfield`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_xmodulestudentprefsfield` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_name` varchar(64) NOT NULL, + `module_type` varchar(64) NOT NULL, + `value` longtext NOT NULL, + `student_id` int(11) NOT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_xmodulestudentprefs_student_id_2a5d275498b7a407_uniq` (`student_id`,`module_type`,`field_name`), + KEY `courseware_xmodulestudentprefsfield_7e1499` (`field_name`), + KEY `courseware_xmodulestudentprefsfield_2d8768ff` (`module_type`), + KEY `courseware_xmodulestudentprefsfield_42ff452e` (`student_id`), + KEY `courseware_xmodulestudentprefsfield_3216ff68` (`created`), + KEY `courseware_xmodulestudentprefsfield_5436e97a` (`modified`), + CONSTRAINT `student_id_refs_id_32bbaa45d7b9940b` FOREIGN KEY (`student_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `courseware_xmoduleuserstatesummaryfield`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `courseware_xmoduleuserstatesummaryfield` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `field_name` varchar(64) NOT NULL, + `usage_id` varchar(255) NOT NULL, + `value` longtext NOT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `courseware_xmodulecontentfi_definition_id_50fa4fd570cf2f4a_uniq` (`usage_id`,`field_name`), + KEY `courseware_xmodulecontentfield_7e1499` (`field_name`), + KEY `courseware_xmodulecontentfield_1d304ded` (`usage_id`), + KEY `courseware_xmodulecontentfield_3216ff68` (`created`), + KEY `courseware_xmodulecontentfield_5436e97a` (`modified`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_admin_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `action_time` datetime NOT NULL, + `user_id` int(11) NOT NULL, + `content_type_id` int(11) DEFAULT NULL, + `object_id` longtext, + `object_repr` varchar(200) NOT NULL, + `action_flag` smallint(5) unsigned NOT NULL, + `change_message` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `django_admin_log_fbfc09f1` (`user_id`), + KEY `django_admin_log_e4470c6e` (`content_type_id`), + CONSTRAINT `content_type_id_refs_id_288599e6` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `user_id_refs_id_c8665aa` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_permission`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_permission` ( + `name` varchar(30) NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_permission_roles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_permission_roles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `permission_id` varchar(30) NOT NULL, + `role_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `django_comment_client_permi_permission_id_7a766da089425952_uniq` (`permission_id`,`role_id`), + KEY `django_comment_client_permission_roles_1e014c8f` (`permission_id`), + KEY `django_comment_client_permission_roles_bf07f040` (`role_id`), + CONSTRAINT `role_id_refs_id_6ccffe4ec1b5c854` FOREIGN KEY (`role_id`) REFERENCES `django_comment_client_role` (`id`), + CONSTRAINT `permission_id_refs_name_63b5ab82b6302d27` FOREIGN KEY (`permission_id`) REFERENCES `django_comment_client_permission` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_role`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_role` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(30) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `django_comment_client_role_ff48d8e5` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_comment_client_role_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_comment_client_role_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `role_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `django_comment_client_role_users_role_id_78e483f531943614_uniq` (`role_id`,`user_id`), + KEY `django_comment_client_role_users_bf07f040` (`role_id`), + KEY `django_comment_client_role_users_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_60d02531441b79e7` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `role_id_refs_id_282d08d1ab82c838` FOREIGN KEY (`role_id`) REFERENCES `django_comment_client_role` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_content_type`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_content_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `app_label` (`app_label`,`model`) +) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_openid_auth_association`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_openid_auth_association` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `server_url` longtext NOT NULL, + `handle` varchar(255) NOT NULL, + `secret` longtext NOT NULL, + `issued` int(11) NOT NULL, + `lifetime` int(11) NOT NULL, + `assoc_type` longtext NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_openid_auth_nonce`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_openid_auth_nonce` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `server_url` varchar(2047) NOT NULL, + `timestamp` int(11) NOT NULL, + `salt` varchar(40) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_openid_auth_useropenid`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_openid_auth_useropenid` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `claimed_id` longtext NOT NULL, + `display_id` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `django_openid_auth_useropenid_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_be7162f0` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_session` ( + `session_key` varchar(40) NOT NULL, + `session_data` longtext NOT NULL, + `expire_date` datetime NOT NULL, + PRIMARY KEY (`session_key`), + KEY `django_session_c25c2c28` (`expire_date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `django_site`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `django_site` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `domain` varchar(100) NOT NULL, + `name` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_crontabschedule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_crontabschedule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `minute` varchar(64) NOT NULL, + `hour` varchar(64) NOT NULL, + `day_of_week` varchar(64) NOT NULL, + `day_of_month` varchar(64) NOT NULL, + `month_of_year` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_intervalschedule`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_intervalschedule` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `every` int(11) NOT NULL, + `period` varchar(24) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_periodictask`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_periodictask` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(200) NOT NULL, + `task` varchar(200) NOT NULL, + `interval_id` int(11) DEFAULT NULL, + `crontab_id` int(11) DEFAULT NULL, + `args` longtext NOT NULL, + `kwargs` longtext NOT NULL, + `queue` varchar(200) DEFAULT NULL, + `exchange` varchar(200) DEFAULT NULL, + `routing_key` varchar(200) DEFAULT NULL, + `expires` datetime DEFAULT NULL, + `enabled` tinyint(1) NOT NULL, + `last_run_at` datetime DEFAULT NULL, + `total_run_count` int(10) unsigned NOT NULL, + `date_changed` datetime NOT NULL, + `description` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `djcelery_periodictask_17d2d99d` (`interval_id`), + KEY `djcelery_periodictask_7aa5fda` (`crontab_id`), + CONSTRAINT `interval_id_refs_id_f2054349` FOREIGN KEY (`interval_id`) REFERENCES `djcelery_intervalschedule` (`id`), + CONSTRAINT `crontab_id_refs_id_ebff5e74` FOREIGN KEY (`crontab_id`) REFERENCES `djcelery_crontabschedule` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_periodictasks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_periodictasks` ( + `ident` smallint(6) NOT NULL, + `last_update` datetime NOT NULL, + PRIMARY KEY (`ident`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_taskstate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_taskstate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `state` varchar(64) NOT NULL, + `task_id` varchar(36) NOT NULL, + `name` varchar(200) DEFAULT NULL, + `tstamp` datetime NOT NULL, + `args` longtext, + `kwargs` longtext, + `eta` datetime DEFAULT NULL, + `expires` datetime DEFAULT NULL, + `result` longtext, + `traceback` longtext, + `runtime` double DEFAULT NULL, + `retries` int(11) NOT NULL, + `worker_id` int(11) DEFAULT NULL, + `hidden` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `task_id` (`task_id`), + KEY `djcelery_taskstate_355bfc27` (`state`), + KEY `djcelery_taskstate_52094d6e` (`name`), + KEY `djcelery_taskstate_f0ba6500` (`tstamp`), + KEY `djcelery_taskstate_20fc5b84` (`worker_id`), + KEY `djcelery_taskstate_c91f1bf` (`hidden`), + CONSTRAINT `worker_id_refs_id_4e3453a` FOREIGN KEY (`worker_id`) REFERENCES `djcelery_workerstate` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `djcelery_workerstate`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `djcelery_workerstate` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `hostname` varchar(255) NOT NULL, + `last_heartbeat` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `hostname` (`hostname`), + KEY `djcelery_workerstate_eb8ac7e4` (`last_heartbeat`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `external_auth_externalauthmap`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `external_auth_externalauthmap` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `external_id` varchar(255) NOT NULL, + `external_domain` varchar(255) NOT NULL, + `external_credentials` longtext NOT NULL, + `external_email` varchar(255) NOT NULL, + `external_name` varchar(255) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `internal_password` varchar(31) NOT NULL, + `dtcreated` datetime NOT NULL, + `dtsignup` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `external_auth_externalauthmap_external_id_7f035ef8bc4d313e_uniq` (`external_id`,`external_domain`), + UNIQUE KEY `user_id` (`user_id`), + KEY `external_auth_externalauthmap_d5e787` (`external_id`), + KEY `external_auth_externalauthmap_a570024c` (`external_domain`), + KEY `external_auth_externalauthmap_a142061d` (`external_email`), + KEY `external_auth_externalauthmap_c1a016f` (`external_name`), + CONSTRAINT `user_id_refs_id_39c4e675f8635f67` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `foldit_puzzlecomplete`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `foldit_puzzlecomplete` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `unique_user_id` varchar(50) NOT NULL, + `puzzle_id` int(11) NOT NULL, + `puzzle_set` int(11) NOT NULL, + `puzzle_subset` int(11) NOT NULL, + `created` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `foldit_puzzlecomplete_user_id_4c63656af6674331_uniq` (`user_id`,`puzzle_id`,`puzzle_set`,`puzzle_subset`), + KEY `foldit_puzzlecomplete_fbfc09f1` (`user_id`), + KEY `foldit_puzzlecomplete_8027477e` (`unique_user_id`), + KEY `foldit_puzzlecomplete_4798a2b8` (`puzzle_set`), + KEY `foldit_puzzlecomplete_59f06bcd` (`puzzle_subset`), + CONSTRAINT `user_id_refs_id_23bb09ab37e9437b` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `foldit_score`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `foldit_score` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `unique_user_id` varchar(50) NOT NULL, + `puzzle_id` int(11) NOT NULL, + `best_score` double NOT NULL, + `current_score` double NOT NULL, + `score_version` int(11) NOT NULL, + `created` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `foldit_score_fbfc09f1` (`user_id`), + KEY `foldit_score_8027477e` (`unique_user_id`), + KEY `foldit_score_3624c060` (`best_score`), + KEY `foldit_score_b4627792` (`current_score`), + CONSTRAINT `user_id_refs_id_44efb56f4c07957f` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `instructor_task_instructortask`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `instructor_task_instructortask` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `task_type` varchar(50) NOT NULL, + `course_id` varchar(255) NOT NULL, + `task_key` varchar(255) NOT NULL, + `task_input` varchar(255) NOT NULL, + `task_id` varchar(255) NOT NULL, + `task_state` varchar(50) DEFAULT NULL, + `task_output` varchar(1024) DEFAULT NULL, + `requester_id` int(11) NOT NULL, + `created` datetime DEFAULT NULL, + `updated` datetime NOT NULL, + `subtasks` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `instructor_task_instructortask_8ae638b4` (`task_type`), + KEY `instructor_task_instructortask_ff48d8e5` (`course_id`), + KEY `instructor_task_instructortask_cfc55170` (`task_key`), + KEY `instructor_task_instructortask_c00fe455` (`task_id`), + KEY `instructor_task_instructortask_731e67a4` (`task_state`), + KEY `instructor_task_instructortask_b8ca8b9f` (`requester_id`), + CONSTRAINT `requester_id_refs_id_4d6b69c6a97278e6` FOREIGN KEY (`requester_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `licenses_coursesoftware`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `licenses_coursesoftware` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `full_name` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `licenses_userlicense`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `licenses_userlicense` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `software_id` int(11) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `serial` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `licenses_userlicense_4c6ed3c1` (`software_id`), + KEY `licenses_userlicense_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_26345de02f3a1cb3` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `software_id_refs_id_78738fcdf9e27be8` FOREIGN KEY (`software_id`) REFERENCES `licenses_coursesoftware` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `linkedin_linkedin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `linkedin_linkedin` ( + `user_id` int(11) NOT NULL, + `has_linkedin_account` tinyint(1) DEFAULT NULL, + `emailed_courses` longtext NOT NULL, + PRIMARY KEY (`user_id`), + CONSTRAINT `user_id_refs_id_7b29e97d72e31bb2` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notes_note`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notes_note` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `course_id` varchar(255) NOT NULL, + `uri` varchar(255) NOT NULL, + `text` longtext NOT NULL, + `quote` longtext NOT NULL, + `range_start` varchar(2048) NOT NULL, + `range_start_offset` int(11) NOT NULL, + `range_end` varchar(2048) NOT NULL, + `range_end_offset` int(11) NOT NULL, + `tags` longtext NOT NULL, + `created` datetime DEFAULT NULL, + `updated` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `notes_note_fbfc09f1` (`user_id`), + KEY `notes_note_ff48d8e5` (`course_id`), + KEY `notes_note_a9794fa` (`uri`), + KEY `notes_note_3216ff68` (`created`), + KEY `notes_note_8aac229` (`updated`), + CONSTRAINT `user_id_refs_id_380a4734360715cc` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notifications_articlesubscription`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notifications_articlesubscription` ( + `subscription_ptr_id` int(11) NOT NULL, + `articleplugin_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + UNIQUE KEY `subscription_ptr_id` (`subscription_ptr_id`), + CONSTRAINT `articleplugin_ptr_id_refs_id_1bd08ac071ed584a` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`), + CONSTRAINT `subscription_ptr_id_refs_id_18f7bae575c0b518` FOREIGN KEY (`subscription_ptr_id`) REFERENCES `notify_subscription` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_notification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_notification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `subscription_id` int(11) DEFAULT NULL, + `message` longtext NOT NULL, + `url` varchar(200) DEFAULT NULL, + `is_viewed` tinyint(1) NOT NULL, + `is_emailed` tinyint(1) NOT NULL, + `created` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `notify_notification_104f5ac1` (`subscription_id`), + CONSTRAINT `subscription_id_refs_id_7a99ebc5baf93d4f` FOREIGN KEY (`subscription_id`) REFERENCES `notify_subscription` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_notificationtype`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_notificationtype` ( + `key` varchar(128) NOT NULL, + `label` varchar(128) DEFAULT NULL, + `content_type_id` int(11) DEFAULT NULL, + PRIMARY KEY (`key`), + KEY `notify_notificationtype_e4470c6e` (`content_type_id`), + CONSTRAINT `content_type_id_refs_id_4919de6f2478378` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `interval` smallint(6) NOT NULL, + PRIMARY KEY (`id`), + KEY `notify_settings_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_2e6a6a1d9a2911e6` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `notify_subscription`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notify_subscription` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `settings_id` int(11) NOT NULL, + `notification_type_id` varchar(128) NOT NULL, + `object_id` varchar(64) DEFAULT NULL, + `send_emails` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `notify_subscription_83326d99` (`settings_id`), + KEY `notify_subscription_9955f091` (`notification_type_id`), + CONSTRAINT `notification_type_id_refs_key_25426c9bbaa41a19` FOREIGN KEY (`notification_type_id`) REFERENCES `notify_notificationtype` (`key`), + CONSTRAINT `settings_id_refs_id_2b8d6d653b7225d5` FOREIGN KEY (`settings_id`) REFERENCES `notify_settings` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `psychometrics_psychometricdata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `psychometrics_psychometricdata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `studentmodule_id` int(11) NOT NULL, + `done` tinyint(1) NOT NULL, + `attempts` int(11) NOT NULL, + `checktimes` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `studentmodule_id` (`studentmodule_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_certificateitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_certificateitem` ( + `orderitem_ptr_id` int(11) NOT NULL, + `course_id` varchar(128) NOT NULL, + `course_enrollment_id` int(11) NOT NULL, + `mode` varchar(50) NOT NULL, + PRIMARY KEY (`orderitem_ptr_id`), + KEY `shoppingcart_certificateitem_ff48d8e5` (`course_id`), + KEY `shoppingcart_certificateitem_9e513f0b` (`course_enrollment_id`), + KEY `shoppingcart_certificateitem_4160619e` (`mode`), + CONSTRAINT `course_enrollment_id_refs_id_259181e58048c435` FOREIGN KEY (`course_enrollment_id`) REFERENCES `student_courseenrollment` (`id`), + CONSTRAINT `orderitem_ptr_id_refs_id_4d598262d3ebc4d0` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_order`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_order` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `currency` varchar(8) NOT NULL, + `status` varchar(32) NOT NULL, + `purchase_time` datetime DEFAULT NULL, + `bill_to_first` varchar(64) NOT NULL, + `bill_to_last` varchar(64) NOT NULL, + `bill_to_street1` varchar(128) NOT NULL, + `bill_to_street2` varchar(128) NOT NULL, + `bill_to_city` varchar(64) NOT NULL, + `bill_to_state` varchar(8) NOT NULL, + `bill_to_postalcode` varchar(16) NOT NULL, + `bill_to_country` varchar(64) NOT NULL, + `bill_to_ccnum` varchar(8) NOT NULL, + `bill_to_cardtype` varchar(32) NOT NULL, + `processor_reply_dump` longtext NOT NULL, + `refunded_time` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_order_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_a4b0342e1195673` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_orderitem`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_orderitem` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `status` varchar(32) NOT NULL, + `qty` int(11) NOT NULL, + `unit_cost` decimal(30,2) NOT NULL, + `line_desc` varchar(1024) NOT NULL, + `currency` varchar(8) NOT NULL, + `fulfilled_time` datetime DEFAULT NULL, + `report_comments` longtext NOT NULL, + `refund_requested_time` datetime DEFAULT NULL, + `service_fee` decimal(30,2) NOT NULL, + PRIMARY KEY (`id`), + KEY `shoppingcart_orderitem_8337030b` (`order_id`), + KEY `shoppingcart_orderitem_fbfc09f1` (`user_id`), + KEY `shoppingcart_orderitem_c9ad71dd` (`status`), + KEY `shoppingcart_orderitem_8457f26a` (`fulfilled_time`), + KEY `shoppingcart_orderitem_416112c1` (`refund_requested_time`), + CONSTRAINT `order_id_refs_id_4fad6e867c77b3f0` FOREIGN KEY (`order_id`) REFERENCES `shoppingcart_order` (`id`), + CONSTRAINT `user_id_refs_id_608b9042d92ae410` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_paidcourseregistration`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_paidcourseregistration` ( + `orderitem_ptr_id` int(11) NOT NULL, + `course_id` varchar(128) NOT NULL, + `mode` varchar(50) NOT NULL, + PRIMARY KEY (`orderitem_ptr_id`), + KEY `shoppingcart_paidcourseregistration_ff48d8e5` (`course_id`), + KEY `shoppingcart_paidcourseregistration_4160619e` (`mode`), + CONSTRAINT `orderitem_ptr_id_refs_id_c5c6141d8709d99` FOREIGN KEY (`orderitem_ptr_id`) REFERENCES `shoppingcart_orderitem` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `shoppingcart_paidcourseregistrationannotation`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `shoppingcart_paidcourseregistrationannotation` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `course_id` varchar(128) NOT NULL, + `annotation` longtext, + PRIMARY KEY (`id`), + UNIQUE KEY `course_id` (`course_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `south_migrationhistory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `south_migrationhistory` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `app_name` varchar(255) NOT NULL, + `migration` varchar(255) NOT NULL, + `applied` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_anonymoususerid`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_anonymoususerid` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `anonymous_user_id` varchar(32) NOT NULL, + `course_id` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `anonymous_user_id` (`anonymous_user_id`), + KEY `student_anonymoususerid_fbfc09f1` (`user_id`), + KEY `student_anonymoususerid_ff48d8e5` (`course_id`), + CONSTRAINT `user_id_refs_id_23effb36c38f7a2a` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_courseenrollment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_courseenrollment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `course_id` varchar(255) NOT NULL, + `created` datetime DEFAULT NULL, + `is_active` tinyint(1) NOT NULL, + `mode` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_courseenrollment_user_id_2d2a572f07dd8e37_uniq` (`user_id`,`course_id`), + KEY `student_courseenrollment_fbfc09f1` (`user_id`), + KEY `student_courseenrollment_ff48d8e5` (`course_id`), + KEY `student_courseenrollment_3216ff68` (`created`), + CONSTRAINT `user_id_refs_id_45948fcded37bc9d` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_courseenrollmentallowed`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_courseenrollmentallowed` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `email` varchar(255) NOT NULL, + `course_id` varchar(255) NOT NULL, + `created` datetime DEFAULT NULL, + `auto_enroll` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_courseenrollmentallowed_email_6f3eafd4a6c58591_uniq` (`email`,`course_id`), + KEY `student_courseenrollmentallowed_3904588a` (`email`), + KEY `student_courseenrollmentallowed_ff48d8e5` (`course_id`), + KEY `student_courseenrollmentallowed_3216ff68` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_pendingemailchange`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_pendingemailchange` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `new_email` varchar(255) NOT NULL, + `activation_key` varchar(32) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + UNIQUE KEY `activation_key` (`activation_key`), + KEY `student_pendingemailchange_856c86d7` (`new_email`), + CONSTRAINT `user_id_refs_id_24fa3bcda525fa67` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_pendingnamechange`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_pendingnamechange` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `new_name` varchar(255) NOT NULL, + `rationale` varchar(1024) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + CONSTRAINT `user_id_refs_id_24e959cdd9359b27` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_userstanding`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_userstanding` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `account_status` varchar(31) NOT NULL, + `changed_by_id` int(11) NOT NULL, + `standing_last_changed_at` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_id` (`user_id`), + KEY `student_userstanding_16905482` (`changed_by_id`), + CONSTRAINT `changed_by_id_refs_id_5ec33b2b0450a33b` FOREIGN KEY (`changed_by_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `user_id_refs_id_5ec33b2b0450a33b` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_usertestgroup`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_usertestgroup` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(32) NOT NULL, + `description` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `student_usertestgroup_52094d6e` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `student_usertestgroup_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `student_usertestgroup_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `usertestgroup_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `student_usertestgroup_us_usertestgroup_id_63c588e0372991b0_uniq` (`usertestgroup_id`,`user_id`), + KEY `student_usertestgroup_users_44f27cdf` (`usertestgroup_id`), + KEY `student_usertestgroup_users_fbfc09f1` (`user_id`), + CONSTRAINT `usertestgroup_id_refs_id_78e186d36d724f9e` FOREIGN KEY (`usertestgroup_id`) REFERENCES `student_usertestgroup` (`id`), + CONSTRAINT `user_id_refs_id_412b14bf8947584c` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `track_trackinglog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `track_trackinglog` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `dtcreated` datetime NOT NULL, + `username` varchar(32) NOT NULL, + `ip` varchar(32) NOT NULL, + `event_source` varchar(32) NOT NULL, + `event_type` varchar(512) NOT NULL, + `event` longtext NOT NULL, + `agent` varchar(256) NOT NULL, + `page` varchar(512) DEFAULT NULL, + `time` datetime NOT NULL, + `host` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `user_api_userpreference`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `user_api_userpreference` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_id` int(11) NOT NULL, + `key` varchar(255) NOT NULL, + `value` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_api_userpreference_user_id_4e4942d73f760072_uniq` (`user_id`,`key`), + KEY `user_api_userpreference_fbfc09f1` (`user_id`), + KEY `user_api_userpreference_45544485` (`key`), + CONSTRAINT `user_id_refs_id_2839c1f4f3473b9e` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `verify_student_softwaresecurephotoverification`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `verify_student_softwaresecurephotoverification` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `status` varchar(100) NOT NULL, + `status_changed` datetime NOT NULL, + `user_id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `face_image_url` varchar(255) NOT NULL, + `photo_id_image_url` varchar(255) NOT NULL, + `receipt_id` varchar(255) NOT NULL, + `created_at` datetime NOT NULL, + `updated_at` datetime NOT NULL, + `submitted_at` datetime DEFAULT NULL, + `reviewing_user_id` int(11) DEFAULT NULL, + `reviewing_service` varchar(255) NOT NULL, + `error_msg` longtext NOT NULL, + `error_code` varchar(50) NOT NULL, + `photo_id_key` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `verify_student_softwaresecurephotoverification_fbfc09f1` (`user_id`), + KEY `verify_student_softwaresecurephotoverification_8713c555` (`receipt_id`), + KEY `verify_student_softwaresecurephotoverification_3b1c9c31` (`created_at`), + KEY `verify_student_softwaresecurephotoverification_f84f7de6` (`updated_at`), + KEY `verify_student_softwaresecurephotoverification_4452d192` (`submitted_at`), + KEY `verify_student_softwaresecurephotoverification_b2c165b4` (`reviewing_user_id`), + CONSTRAINT `reviewing_user_id_refs_id_5b90d52ad6ea4207` FOREIGN KEY (`reviewing_user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `user_id_refs_id_5b90d52ad6ea4207` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `waffle_flag`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `waffle_flag` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `everyone` tinyint(1) DEFAULT NULL, + `percent` decimal(3,1) DEFAULT NULL, + `superusers` tinyint(1) NOT NULL, + `staff` tinyint(1) NOT NULL, + `authenticated` tinyint(1) NOT NULL, + `rollout` tinyint(1) NOT NULL, + `note` longtext NOT NULL, + `testing` tinyint(1) NOT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + `languages` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `waffle_flag_3216ff68` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `waffle_flag_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `waffle_flag_groups` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `flag_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `waffle_flag_groups_flag_id_582896076571ab8b_uniq` (`flag_id`,`group_id`), + KEY `waffle_flag_groups_9bca17e2` (`flag_id`), + KEY `waffle_flag_groups_bda51c3c` (`group_id`), + CONSTRAINT `group_id_refs_id_66545bd34ea49f34` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `flag_id_refs_id_6f1b152a8e6a807d` FOREIGN KEY (`flag_id`) REFERENCES `waffle_flag` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `waffle_flag_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `waffle_flag_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `flag_id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `waffle_flag_users_flag_id_3bb77386107938a3_uniq` (`flag_id`,`user_id`), + KEY `waffle_flag_users_9bca17e2` (`flag_id`), + KEY `waffle_flag_users_fbfc09f1` (`user_id`), + CONSTRAINT `user_id_refs_id_1fe1cfb8bae2dfc2` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`), + CONSTRAINT `flag_id_refs_id_5034023d8fef0c12` FOREIGN KEY (`flag_id`) REFERENCES `waffle_flag` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `waffle_sample`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `waffle_sample` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `percent` decimal(4,1) NOT NULL, + `note` longtext NOT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `waffle_sample_3216ff68` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `waffle_switch`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `waffle_switch` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `active` tinyint(1) NOT NULL, + `note` longtext NOT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`), + KEY `waffle_switch_3216ff68` (`created`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_article`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_article` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `current_revision_id` int(11) DEFAULT NULL, + `created` datetime NOT NULL, + `modified` datetime NOT NULL, + `owner_id` int(11) DEFAULT NULL, + `group_id` int(11) DEFAULT NULL, + `group_read` tinyint(1) NOT NULL, + `group_write` tinyint(1) NOT NULL, + `other_read` tinyint(1) NOT NULL, + `other_write` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `current_revision_id` (`current_revision_id`), + KEY `wiki_article_5d52dd10` (`owner_id`), + KEY `wiki_article_bda51c3c` (`group_id`), + CONSTRAINT `group_id_refs_id_10e2d3dd108bfee4` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`), + CONSTRAINT `current_revision_id_refs_id_1d8d320ebafac304` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_articlerevision` (`id`), + CONSTRAINT `owner_id_refs_id_18073b359e14b583` FOREIGN KEY (`owner_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articleforobject`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articleforobject` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `article_id` int(11) NOT NULL, + `content_type_id` int(11) NOT NULL, + `object_id` int(10) unsigned NOT NULL, + `is_mptt` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_articleforobject_content_type_id_27c4cce189b3bcab_uniq` (`content_type_id`,`object_id`), + KEY `wiki_articleforobject_30525a19` (`article_id`), + KEY `wiki_articleforobject_e4470c6e` (`content_type_id`), + CONSTRAINT `content_type_id_refs_id_6b30567037828764` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`), + CONSTRAINT `article_id_refs_id_1698e37305099436` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articleplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articleplugin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `article_id` int(11) NOT NULL, + `deleted` tinyint(1) NOT NULL, + `created` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `wiki_articleplugin_30525a19` (`article_id`), + CONSTRAINT `article_id_refs_id_64fa106f92c648ca` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articlerevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articlerevision` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_number` int(11) NOT NULL, + `user_message` longtext NOT NULL, + `automatic_log` longtext NOT NULL, + `ip_address` char(15) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `modified` datetime NOT NULL, + `created` datetime NOT NULL, + `previous_revision_id` int(11) DEFAULT NULL, + `deleted` tinyint(1) NOT NULL, + `locked` tinyint(1) NOT NULL, + `article_id` int(11) NOT NULL, + `content` longtext NOT NULL, + `title` varchar(512) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_articlerevision_article_id_4b4e7910c8e7b2d0_uniq` (`article_id`,`revision_number`), + KEY `wiki_articlerevision_fbfc09f1` (`user_id`), + KEY `wiki_articlerevision_49bc38cc` (`previous_revision_id`), + KEY `wiki_articlerevision_30525a19` (`article_id`), + CONSTRAINT `article_id_refs_id_5a3b45ce5c88570a` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), + CONSTRAINT `previous_revision_id_refs_id_7c6fe338a951e36b` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_articlerevision` (`id`), + CONSTRAINT `user_id_refs_id_672c6e4dfbb26714` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_articlesubscription`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_articlesubscription` ( + `subscription_ptr_id` int(11) NOT NULL, + `articleplugin_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + UNIQUE KEY `subscription_ptr_id` (`subscription_ptr_id`), + CONSTRAINT `articleplugin_ptr_id_refs_id_7b2f9df4cbce00e3` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`), + CONSTRAINT `subscription_ptr_id_refs_id_4ec3f6dbae89f475` FOREIGN KEY (`subscription_ptr_id`) REFERENCES `notify_subscription` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_attachment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_attachment` ( + `reusableplugin_ptr_id` int(11) NOT NULL, + `current_revision_id` int(11) DEFAULT NULL, + `original_filename` varchar(256) DEFAULT NULL, + PRIMARY KEY (`reusableplugin_ptr_id`), + UNIQUE KEY `current_revision_id` (`current_revision_id`), + CONSTRAINT `current_revision_id_refs_id_66561e6e2198feb4` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_attachmentrevision` (`id`), + CONSTRAINT `reusableplugin_ptr_id_refs_articleplugin_ptr_id_79d179a16644e87a` FOREIGN KEY (`reusableplugin_ptr_id`) REFERENCES `wiki_reusableplugin` (`articleplugin_ptr_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_attachmentrevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_attachmentrevision` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_number` int(11) NOT NULL, + `user_message` longtext NOT NULL, + `automatic_log` longtext NOT NULL, + `ip_address` char(15) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `modified` datetime NOT NULL, + `created` datetime NOT NULL, + `previous_revision_id` int(11) DEFAULT NULL, + `deleted` tinyint(1) NOT NULL, + `locked` tinyint(1) NOT NULL, + `attachment_id` int(11) NOT NULL, + `file` varchar(100) NOT NULL, + `description` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `wiki_attachmentrevision_fbfc09f1` (`user_id`), + KEY `wiki_attachmentrevision_49bc38cc` (`previous_revision_id`), + KEY `wiki_attachmentrevision_edee6011` (`attachment_id`), + CONSTRAINT `attachment_id_refs_reusableplugin_ptr_id_33d8cf1f640583da` FOREIGN KEY (`attachment_id`) REFERENCES `wiki_attachment` (`reusableplugin_ptr_id`), + CONSTRAINT `previous_revision_id_refs_id_5521ecec0041bbf5` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_attachmentrevision` (`id`), + CONSTRAINT `user_id_refs_id_2822eb682eaca84c` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_image`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_image` ( + `revisionplugin_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`revisionplugin_ptr_id`), + CONSTRAINT `revisionplugin_ptr_id_refs_articleplugin_ptr_id_1a20f885fc42a0b1` FOREIGN KEY (`revisionplugin_ptr_id`) REFERENCES `wiki_revisionplugin` (`articleplugin_ptr_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_imagerevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_imagerevision` ( + `revisionpluginrevision_ptr_id` int(11) NOT NULL, + `image` varchar(2000) DEFAULT NULL, + `width` smallint(6) DEFAULT NULL, + `height` smallint(6) DEFAULT NULL, + PRIMARY KEY (`revisionpluginrevision_ptr_id`), + CONSTRAINT `revisionpluginrevision_ptr_id_refs_id_5da3ee545b9fc791` FOREIGN KEY (`revisionpluginrevision_ptr_id`) REFERENCES `wiki_revisionpluginrevision` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_reusableplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_reusableplugin` ( + `articleplugin_ptr_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + CONSTRAINT `articleplugin_ptr_id_refs_id_2a5c48de4ca661fd` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_reusableplugin_articles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_reusableplugin_articles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `reusableplugin_id` int(11) NOT NULL, + `article_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_reusableplugin_art_reusableplugin_id_6e34ac94afa8f9f2_uniq` (`reusableplugin_id`,`article_id`), + KEY `wiki_reusableplugin_articles_28b0b358` (`reusableplugin_id`), + KEY `wiki_reusableplugin_articles_30525a19` (`article_id`), + CONSTRAINT `article_id_refs_id_854477c2f51faad` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), + CONSTRAINT `reusableplugin_id_refs_articleplugin_ptr_id_496cabe744b45e30` FOREIGN KEY (`reusableplugin_id`) REFERENCES `wiki_reusableplugin` (`articleplugin_ptr_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_revisionplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_revisionplugin` ( + `articleplugin_ptr_id` int(11) NOT NULL, + `current_revision_id` int(11) DEFAULT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + UNIQUE KEY `current_revision_id` (`current_revision_id`), + CONSTRAINT `current_revision_id_refs_id_2732d4b244938e26` FOREIGN KEY (`current_revision_id`) REFERENCES `wiki_revisionpluginrevision` (`id`), + CONSTRAINT `articleplugin_ptr_id_refs_id_2b8f815fcac31401` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_revisionpluginrevision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_revisionpluginrevision` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `revision_number` int(11) NOT NULL, + `user_message` longtext NOT NULL, + `automatic_log` longtext NOT NULL, + `ip_address` char(15) DEFAULT NULL, + `user_id` int(11) DEFAULT NULL, + `modified` datetime NOT NULL, + `created` datetime NOT NULL, + `previous_revision_id` int(11) DEFAULT NULL, + `deleted` tinyint(1) NOT NULL, + `locked` tinyint(1) NOT NULL, + `plugin_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `wiki_revisionpluginrevision_fbfc09f1` (`user_id`), + KEY `wiki_revisionpluginrevision_49bc38cc` (`previous_revision_id`), + KEY `wiki_revisionpluginrevision_2857ccbf` (`plugin_id`), + CONSTRAINT `plugin_id_refs_articleplugin_ptr_id_3e044eb541bbc69c` FOREIGN KEY (`plugin_id`) REFERENCES `wiki_revisionplugin` (`articleplugin_ptr_id`), + CONSTRAINT `previous_revision_id_refs_id_3348918678fffe43` FOREIGN KEY (`previous_revision_id`) REFERENCES `wiki_revisionpluginrevision` (`id`), + CONSTRAINT `user_id_refs_id_21540d2c32d8f395` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_simpleplugin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_simpleplugin` ( + `articleplugin_ptr_id` int(11) NOT NULL, + `article_revision_id` int(11) NOT NULL, + PRIMARY KEY (`articleplugin_ptr_id`), + KEY `wiki_simpleplugin_b3dc49fe` (`article_revision_id`), + CONSTRAINT `article_revision_id_refs_id_2252033b6df37b12` FOREIGN KEY (`article_revision_id`) REFERENCES `wiki_articlerevision` (`id`), + CONSTRAINT `articleplugin_ptr_id_refs_id_6704e8c7a25cbfd2` FOREIGN KEY (`articleplugin_ptr_id`) REFERENCES `wiki_articleplugin` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `wiki_urlpath`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `wiki_urlpath` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `slug` varchar(50) DEFAULT NULL, + `site_id` int(11) NOT NULL, + `parent_id` int(11) DEFAULT NULL, + `lft` int(10) unsigned NOT NULL, + `rght` int(10) unsigned NOT NULL, + `tree_id` int(10) unsigned NOT NULL, + `level` int(10) unsigned NOT NULL, + `article_id` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `wiki_urlpath_site_id_124f6aa7b2cc9b82_uniq` (`site_id`,`parent_id`,`slug`), + KEY `wiki_urlpath_a951d5d6` (`slug`), + KEY `wiki_urlpath_6223029` (`site_id`), + KEY `wiki_urlpath_63f17a16` (`parent_id`), + KEY `wiki_urlpath_42b06ff6` (`lft`), + KEY `wiki_urlpath_91543e5a` (`rght`), + KEY `wiki_urlpath_efd07f28` (`tree_id`), + KEY `wiki_urlpath_2a8f42e8` (`level`), + KEY `wiki_urlpath_30525a19` (`article_id`), + CONSTRAINT `article_id_refs_id_23bd80e7971759c9` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`), + CONSTRAINT `parent_id_refs_id_62afe7c752d1e703` FOREIGN KEY (`parent_id`) REFERENCES `wiki_urlpath` (`id`), + CONSTRAINT `site_id_refs_id_462d2bc7f4bbaaa2` FOREIGN KEY (`site_id`) REFERENCES `django_site` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + diff --git a/common/test/db_cache/lettuce.db b/common/test/db_cache/lettuce.db new file mode 100644 index 0000000000..9d6cb8dc47 Binary files /dev/null and b/common/test/db_cache/lettuce.db differ diff --git a/rakelib/acceptance_test.rake b/rakelib/acceptance_test.rake index f6fdfd9ad6..47d36ca38b 100644 --- a/rakelib/acceptance_test.rake +++ b/rakelib/acceptance_test.rake @@ -1,4 +1,5 @@ -ACCEPTANCE_DB = 'test_root/db/test_edx.db' +ACCEPTANCE_DB = File.join(REPO_ROOT, 'test_root/db/test_edx.db') +ACCEPTANCE_DB_CACHE = File.join(REPO_ROOT, 'common/test/db_cache/lettuce.db') ACCEPTANCE_REPORT_DIR = report_dir_path('acceptance') directory ACCEPTANCE_REPORT_DIR @@ -21,12 +22,31 @@ task :setup_acceptance_db do # migrations from the upgrade tables in the DB. # But for now for either system (lms or cms), use the lms # definitions to sync and migrate. + + # Since we are using SQLLite, we can reset the database by deleting it on disk. if File.exists?(ACCEPTANCE_DB) File.delete(ACCEPTANCE_DB) end - sh(django_admin('lms', 'acceptance', 'syncdb', '--noinput')) - sh(django_admin('lms', 'acceptance', 'migrate', '--noinput')) + # To speed up migrations, we check for a cached database file and start from that. + # The cached database file should be checked into the repo + if File.exists?(ACCEPTANCE_DB_CACHE) + + # Copy the cached database to the test root directory + sh("cp #{ACCEPTANCE_DB_CACHE} #{ACCEPTANCE_DB}") + + # Run migrations to update the db, starting from its cached state + sh(django_admin('lms', 'acceptance', 'migrate', '--noinput')) + + # If no cached database exists, syncdb before migrating, then create the cache + else + sh(django_admin('lms', 'acceptance', 'syncdb', '--noinput')) + sh(django_admin('lms', 'acceptance', 'migrate', '--noinput')) + + # Create the cache if it doesn't already exist + sh("cp #{ACCEPTANCE_DB} #{ACCEPTANCE_DB_CACHE}") + end + end task :prep_for_acceptance_tests => [ diff --git a/rakelib/bok_choy.rake b/rakelib/bok_choy.rake index bd64e36173..5735155b40 100644 --- a/rakelib/bok_choy.rake +++ b/rakelib/bok_choy.rake @@ -150,17 +150,8 @@ namespace :'test:bok_choy' do # Invalidate the cache BOK_CHOY_CACHE.flush() - # HACK: Since the CMS depends on the existence of some database tables - # that are now in common but used to be in LMS (Role/Permissions for Forums) - # we need to create/migrate the database tables defined in the LMS. - # We might be able to address this by moving out the migrations from - # lms/django_comment_client, but then we'd have to repair all the existing - # migrations from the upgrade tables in the DB. - # But for now for either system (lms or cms), use the lms - # definitions to sync and migrate. - sh(django_admin('lms', 'bok_choy', 'reset_db', '--noinput')) - sh(django_admin('lms', 'bok_choy', 'syncdb', '--noinput')) - sh(django_admin('lms', 'bok_choy', 'migrate', '--noinput')) + # Reset the database + sh("#{REPO_ROOT}/scripts/reset-test-db.sh") # Collect static assets Rake::Task["gather_assets"].invoke('lms', 'bok_choy') diff --git a/scripts/reset-test-db.sh b/scripts/reset-test-db.sh new file mode 100755 index 0000000000..a0808c208a --- /dev/null +++ b/scripts/reset-test-db.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +############################################################################ +# +# reset-test-db.sh +# +# Resets the MySQL test database for the bok-choy acceptance tests. +# +# If it finds a cached schema and migration history, it will start +# from the cached version to speed up migrations. +# +# If no cached database exists, it will create one. This can be +# checked into the repo to speed up future tests. +# +# Note that we do NOT want to re-use the cache between test runs! +# A newer commit could introduce migrations that do not exist +# in other commits, which could cause migrations to fail in the other +# commits. +# +# For this reason, we always use a cache that was committed to master +# at the time the branch was created. +# +############################################################################ + +DB_CACHE_DIR="common/test/db_cache" + +# Clear out the test database +./manage.py lms --settings bok_choy reset_db --traceback --noinput + +# If there are cached database schemas/data, load them +if [[ -f $DB_CACHE_DIR/bok_choy_schema.sql && -f $DB_CACHE_DIR/bok_choy_data.json ]]; then + + # Load the schema, then the data (including the migration history) + mysql -u root test < $DB_CACHE_DIR/bok_choy_schema.sql + ./manage.py lms --settings bok_choy loaddata $DB_CACHE_DIR/bok_choy_data.json + + # Re-run migrations to ensure we are up-to-date + ./manage.py lms --settings bok_choy migrate --traceback --noinput + +# Otherwise, update the test database and update the cache +else + + # Clean the cache directory + rm -rf $DB_CACHE_DIR && mkdir -p $DB_CACHE_DIR + + # Re-run migrations on the test database + ./manage.py lms --settings bok_choy syncdb --traceback --noinput + ./manage.py lms --settings bok_choy migrate --traceback --noinput + + # Dump the schema and data to the cache + ./manage.py lms --settings bok_choy dumpdata > $DB_CACHE_DIR/bok_choy_data.json + mysqldump -u root --no-data --skip-comments --skip-dump-date test > $DB_CACHE_DIR/bok_choy_schema.sql +fi +