coalescing_panda 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/coalescing_panda/assignment.rb +3 -0
- data/app/models/coalescing_panda/course.rb +3 -0
- data/app/models/coalescing_panda/enrollment.rb +4 -0
- data/app/models/coalescing_panda/lti_account.rb +2 -0
- data/app/models/coalescing_panda/section.rb +3 -0
- data/app/models/coalescing_panda/submission.rb +4 -0
- data/app/models/coalescing_panda/term.rb +2 -0
- data/app/models/coalescing_panda/user.rb +3 -0
- data/app/models/coalescing_panda/workers/course_miner.rb +1 -0
- data/db/migrate/20131118211442_create_coalescing_panda_lti_accounts.rb +2 -0
- data/db/migrate/20141119225319_create_coalescing_panda_terms.rb +3 -3
- data/db/migrate/20141119225721_create_coalescing_panda_courses.rb +4 -5
- data/db/migrate/20141120151432_create_coalescing_panda_sections.rb +3 -4
- data/db/migrate/20141120151940_create_coalescing_panda_assignments.rb +3 -6
- data/db/migrate/20141120152458_create_coalescing_panda_users.rb +3 -4
- data/db/migrate/20141120152546_create_coalescing_panda_submissions.rb +4 -4
- data/db/migrate/20141120153135_create_coalescing_panda_enrollments.rb +5 -5
- data/lib/coalescing_panda/version.rb +1 -1
- data/spec/dummy/app/models/account.rb +7 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +28 -35
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +513 -92
- data/spec/dummy/log/test.log +62415 -0
- data/spec/factories/accounts.rb +5 -0
- data/spec/factories/courses.rb +5 -1
- data/spec/factories/enrollments.rb +5 -2
- data/spec/factories/sections.rb +4 -1
- data/spec/factories/submissions.rb +3 -2
- data/spec/factories/terms.rb +9 -0
- data/spec/factories/users.rb +1 -0
- data/spec/helpers/coalescing_panda/canvas_batches_helper_spec.rb +17 -0
- data/spec/models/coalescing_panda/assignment_spec.rb +20 -0
- data/spec/models/coalescing_panda/course_spec.rb +26 -0
- data/spec/models/coalescing_panda/enrollment_spec.rb +32 -0
- data/spec/models/coalescing_panda/lti_account_spec.rb +6 -0
- data/spec/models/coalescing_panda/section_spec.rb +20 -0
- data/spec/models/coalescing_panda/submission_spec.rb +31 -0
- data/spec/models/coalescing_panda/term_spec.rb +12 -0
- data/spec/models/coalescing_panda/user_spec.rb +20 -0
- data/spec/models/coalescing_panda/workers/course_miner_spec.rb +7 -2
- metadata +11 -5
- data/db/migrate/20140722210735_add_settings_to_coalescing_panda_lti_account.rb +0 -5
- data/db/migrate/20141120205729_add_canvas_account_id_to_lti_account.rb +0 -5
- data/db/migrate/20141125185516_add_type_to_enrollments.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9c022228a8c58d846f1f26d4dbf45ae01304489
|
4
|
+
data.tar.gz: cda8d6e744fbf39460a5a385f2cf8d4c704f2604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45729e76b2685b919295954f10a0d0963ed85ae3d694df9e7e0e254ed6616919012c4e3595c2485545292f594bc09bd699608dfa3ab8acfbc2b9a252084adf4d
|
7
|
+
data.tar.gz: 6c2756e80ab8232506cc9dfb4268674d81acb9e4bba6c1f4d8e406088a40ac15742f4445ec020fe94836f399b1555d33cef10358e764825f011d0a01480290c2
|
@@ -4,5 +4,8 @@ module CoalescingPanda
|
|
4
4
|
has_many :submissions, foreign_key: :coalescing_panda_assignment_id, class_name: 'CoalescingPanda::Submission'
|
5
5
|
|
6
6
|
delegate :account, to: :course
|
7
|
+
|
8
|
+
validates :coalescing_panda_course_id, presence: true
|
9
|
+
validates :canvas_assignment_id, presence: true
|
7
10
|
end
|
8
11
|
end
|
@@ -7,5 +7,8 @@ module CoalescingPanda
|
|
7
7
|
has_many :assignments, foreign_key: :coalescing_panda_course_id, class_name: 'CoalescingPanda::Assignment'
|
8
8
|
has_many :submissions, through: :assignments
|
9
9
|
has_many :users, through: :sections, source: :users, class_name: 'CoalescingPanda::User'
|
10
|
+
|
11
|
+
validates :coalescing_panda_lti_account_id, presence: true
|
12
|
+
validates :canvas_course_id, presence: true
|
10
13
|
end
|
11
14
|
end
|
@@ -4,5 +4,9 @@ module CoalescingPanda
|
|
4
4
|
belongs_to :section, foreign_key: :coalescing_panda_section_id, class_name: 'CoalescingPanda::Section'
|
5
5
|
|
6
6
|
delegate :account, to: :section
|
7
|
+
|
8
|
+
validates :coalescing_panda_user_id, presence: true
|
9
|
+
validates :coalescing_panda_section_id, presence: true
|
10
|
+
validates :canvas_enrollment_id, presence: true
|
7
11
|
end
|
8
12
|
end
|
@@ -4,5 +4,9 @@ module CoalescingPanda
|
|
4
4
|
belongs_to :assignment, foreign_key: :coalescing_panda_assignment_id, class_name: 'CoalescingPanda::Assignment'
|
5
5
|
|
6
6
|
delegate :account, to: :assignment
|
7
|
+
|
8
|
+
validates :coalescing_panda_user_id, presence: true
|
9
|
+
validates :coalescing_panda_assignment_id, presence: true
|
10
|
+
validates :canvas_submission_id, presence: true
|
7
11
|
end
|
8
12
|
end
|
@@ -2,5 +2,7 @@ module CoalescingPanda
|
|
2
2
|
class Term < ActiveRecord::Base
|
3
3
|
belongs_to :account, foreign_key: :coalescing_panda_lti_account_id, class_name: 'CoalescingPanda::LtiAccount'
|
4
4
|
has_many :courses, foreign_key: :coalescing_panda_term_id, class_name: 'CoalescingPanda::Course'
|
5
|
+
|
6
|
+
validates :coalescing_panda_lti_account_id, presence: true
|
5
7
|
end
|
6
8
|
end
|
@@ -68,6 +68,7 @@ class CoalescingPanda::Workers::CourseMiner
|
|
68
68
|
canvas_id_key = "canvas_#{model_key.to_s.singularize}_id"
|
69
69
|
values[canvas_id_key] = values["id"]
|
70
70
|
values['workflow_state'] = values["enrollment_state"] if values.has_key?('enrollment_state')
|
71
|
+
values['enrollment_type'] = values['type'] if model_key == :enrollments
|
71
72
|
if model_key == :users
|
72
73
|
record = account.send(model_key).where("#{canvas_id_key} = ?", values['id'].to_s).first_or_initialize
|
73
74
|
else
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class CreateCoalescingPandaTerms < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_terms do |t|
|
4
|
-
t.belongs_to :coalescing_panda_lti_account
|
4
|
+
t.belongs_to :coalescing_panda_lti_account, null: false
|
5
5
|
t.string :name
|
6
6
|
t.string :code
|
7
7
|
t.string :sis_id
|
8
|
-
t.string :canvas_term_id
|
8
|
+
t.string :canvas_term_id, null: false
|
9
9
|
t.datetime :start_at
|
10
10
|
t.datetime :end_at
|
11
11
|
t.string :workflow_state
|
@@ -13,7 +13,7 @@ class CreateCoalescingPandaTerms < ActiveRecord::Migration
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
15
15
|
|
16
|
-
add_index :coalescing_panda_terms, :canvas_term_id
|
16
|
+
add_index :coalescing_panda_terms, [:canvas_term_id, :coalescing_panda_lti_account_id], name: :index_terms_account, unique: true
|
17
17
|
add_index :coalescing_panda_terms, :sis_id
|
18
18
|
end
|
19
19
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class CreateCoalescingPandaCourses < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_courses do |t|
|
4
|
-
t.belongs_to :coalescing_panda_lti_account
|
4
|
+
t.belongs_to :coalescing_panda_lti_account, null: false
|
5
5
|
t.belongs_to :coalescing_panda_term
|
6
6
|
t.string :name
|
7
|
-
t.string :canvas_course_id
|
7
|
+
t.string :canvas_course_id, null: false
|
8
8
|
t.string :sis_id
|
9
9
|
t.datetime :start_at
|
10
10
|
t.datetime :conclude_at
|
@@ -14,9 +14,8 @@ class CreateCoalescingPandaCourses < ActiveRecord::Migration
|
|
14
14
|
t.timestamps
|
15
15
|
end
|
16
16
|
|
17
|
-
add_index :coalescing_panda_courses, :coalescing_panda_lti_account_id, name: :index_courses_account
|
18
|
-
add_index :coalescing_panda_courses, :coalescing_panda_term_id, name: :index_courses_term
|
19
|
-
add_index :coalescing_panda_courses, :canvas_course_id
|
17
|
+
add_index :coalescing_panda_courses, [:coalescing_panda_lti_account_id, :canvas_course_id], name: :index_courses_account, unique: true
|
18
|
+
add_index :coalescing_panda_courses, [:coalescing_panda_term_id, :canvas_course_id], name: :index_courses_term, unique: true
|
20
19
|
add_index :coalescing_panda_courses, :sis_id
|
21
20
|
end
|
22
21
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class CreateCoalescingPandaSections < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_sections do |t|
|
4
|
-
t.belongs_to :coalescing_panda_course
|
4
|
+
t.belongs_to :coalescing_panda_course, null: false
|
5
5
|
t.string :name
|
6
|
-
t.string :canvas_section_id
|
6
|
+
t.string :canvas_section_id, null: false
|
7
7
|
t.string :sis_id
|
8
8
|
t.string :workflow_state
|
9
9
|
t.datetime :start_at
|
@@ -12,8 +12,7 @@ class CreateCoalescingPandaSections < ActiveRecord::Migration
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :coalescing_panda_sections, :coalescing_panda_course_id
|
16
|
-
add_index :coalescing_panda_sections, :canvas_section_id
|
15
|
+
add_index :coalescing_panda_sections, [:coalescing_panda_course_id, :canvas_section_id], name: :index_sections_course, unique: true
|
17
16
|
add_index :coalescing_panda_sections, :sis_id
|
18
17
|
end
|
19
18
|
end
|
@@ -1,11 +1,10 @@
|
|
1
1
|
class CreateCoalescingPandaAssignments < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_assignments do |t|
|
4
|
-
t.belongs_to :coalescing_panda_course
|
4
|
+
t.belongs_to :coalescing_panda_course, null: false
|
5
5
|
t.string :name
|
6
6
|
t.string :description
|
7
|
-
t.string :canvas_assignment_id
|
8
|
-
t.string :sis_id
|
7
|
+
t.string :canvas_assignment_id, null: false
|
9
8
|
t.string :workflow_state
|
10
9
|
t.float :points_possible
|
11
10
|
t.datetime :due_at
|
@@ -15,8 +14,6 @@ class CreateCoalescingPandaAssignments < ActiveRecord::Migration
|
|
15
14
|
t.timestamps
|
16
15
|
end
|
17
16
|
|
18
|
-
add_index :coalescing_panda_assignments, :coalescing_panda_course_id, name: :index_assignments_course
|
19
|
-
add_index :coalescing_panda_assignments, :canvas_assignment_id
|
20
|
-
add_index :coalescing_panda_assignments, :sis_id
|
17
|
+
add_index :coalescing_panda_assignments, [:coalescing_panda_course_id, :canvas_assignment_id], name: :index_assignments_course, unique: true
|
21
18
|
end
|
22
19
|
end
|
@@ -1,19 +1,18 @@
|
|
1
1
|
class CreateCoalescingPandaUsers < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_users do |t|
|
4
|
-
t.belongs_to :coalescing_panda_lti_account
|
4
|
+
t.belongs_to :coalescing_panda_lti_account, null: false
|
5
5
|
t.string :name
|
6
6
|
t.string :email
|
7
7
|
t.string :roles
|
8
8
|
t.string :workflow_state
|
9
9
|
t.string :sis_id
|
10
|
-
t.string :canvas_user_id
|
10
|
+
t.string :canvas_user_id, null: false
|
11
11
|
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :coalescing_panda_users, :coalescing_panda_lti_account_id, name: :index_users_account
|
16
|
-
add_index :coalescing_panda_users, :canvas_user_id
|
15
|
+
add_index :coalescing_panda_users, [:coalescing_panda_lti_account_id, :canvas_user_id], name: :index_users_account, unique: true
|
17
16
|
add_index :coalescing_panda_users, :sis_id
|
18
17
|
end
|
19
18
|
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
class CreateCoalescingPandaSubmissions < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_submissions do |t|
|
4
|
-
t.belongs_to :coalescing_panda_user
|
5
|
-
t.belongs_to :coalescing_panda_assignment
|
4
|
+
t.belongs_to :coalescing_panda_user, null: false
|
5
|
+
t.belongs_to :coalescing_panda_assignment, null: false
|
6
6
|
t.string :url
|
7
7
|
t.string :grade
|
8
8
|
t.string :score
|
9
9
|
t.datetime :submitted_at
|
10
10
|
t.string :workflow_state
|
11
|
-
t.string :canvas_submission_id
|
11
|
+
t.string :canvas_submission_id, null: false
|
12
12
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
15
15
|
|
16
|
-
add_index :coalescing_panda_submissions, [:coalescing_panda_user_id, :coalescing_panda_assignment_id], name: :index_submissions_user_and_assignment
|
16
|
+
add_index :coalescing_panda_submissions, [:coalescing_panda_user_id, :coalescing_panda_assignment_id, :canvas_submission_id], name: :index_submissions_user_and_assignment, unique: true
|
17
17
|
add_index :coalescing_panda_submissions, :canvas_submission_id
|
18
18
|
end
|
19
19
|
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
class CreateCoalescingPandaEnrollments < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :coalescing_panda_enrollments do |t|
|
4
|
-
t.belongs_to :coalescing_panda_user
|
5
|
-
t.belongs_to :coalescing_panda_section
|
4
|
+
t.belongs_to :coalescing_panda_user, null: false
|
5
|
+
t.belongs_to :coalescing_panda_section, null: false
|
6
6
|
t.string :workflow_state
|
7
7
|
t.string :sis_id
|
8
|
-
t.string :canvas_enrollment_id
|
8
|
+
t.string :canvas_enrollment_id, null: false
|
9
|
+
t.string :enrollment_type
|
9
10
|
t.datetime :start_at
|
10
11
|
t.datetime :end_at
|
11
12
|
|
12
13
|
t.timestamps
|
13
14
|
end
|
14
15
|
|
15
|
-
add_index :coalescing_panda_enrollments, [:coalescing_panda_user_id, :coalescing_panda_section_id], name: :index_enrollments_user_and_assignment
|
16
|
-
add_index :coalescing_panda_enrollments, :canvas_enrollment_id
|
16
|
+
add_index :coalescing_panda_enrollments, [:coalescing_panda_user_id, :coalescing_panda_section_id, :enrollment_type], name: :index_enrollments_user_and_assignment, unique: true
|
17
17
|
add_index :coalescing_panda_enrollments, :sis_id
|
18
18
|
end
|
19
19
|
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
class Account < CoalescingPanda::LtiAccount
|
3
|
+
has_many :terms, foreign_key: :coalescing_panda_lti_account_id, class_name: 'Term'
|
4
|
+
has_many :courses, foreign_key: :coalescing_panda_lti_account_id, class_name: 'Course'
|
5
|
+
has_many :users, foreign_key: :coalescing_panda_lti_account_id, class_name: 'User'
|
6
|
+
end
|
7
|
+
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,14 +11,13 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20141124160857) do
|
15
15
|
|
16
16
|
create_table "coalescing_panda_assignments", force: true do |t|
|
17
|
-
t.integer "coalescing_panda_course_id"
|
17
|
+
t.integer "coalescing_panda_course_id", null: false
|
18
18
|
t.string "name"
|
19
19
|
t.string "description"
|
20
|
-
t.string "canvas_assignment_id"
|
21
|
-
t.string "sis_id"
|
20
|
+
t.string "canvas_assignment_id", null: false
|
22
21
|
t.string "workflow_state"
|
23
22
|
t.float "points_possible"
|
24
23
|
t.datetime "due_at"
|
@@ -28,9 +27,7 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
28
27
|
t.datetime "updated_at"
|
29
28
|
end
|
30
29
|
|
31
|
-
add_index "coalescing_panda_assignments", ["canvas_assignment_id"], name: "
|
32
|
-
add_index "coalescing_panda_assignments", ["coalescing_panda_course_id"], name: "index_assignments_course"
|
33
|
-
add_index "coalescing_panda_assignments", ["sis_id"], name: "index_coalescing_panda_assignments_on_sis_id"
|
30
|
+
add_index "coalescing_panda_assignments", ["coalescing_panda_course_id", "canvas_assignment_id"], name: "index_assignments_course", unique: true
|
34
31
|
|
35
32
|
create_table "coalescing_panda_canvas_api_auths", force: true do |t|
|
36
33
|
t.string "user_id"
|
@@ -49,10 +46,10 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
49
46
|
end
|
50
47
|
|
51
48
|
create_table "coalescing_panda_courses", force: true do |t|
|
52
|
-
t.integer "coalescing_panda_lti_account_id"
|
49
|
+
t.integer "coalescing_panda_lti_account_id", null: false
|
53
50
|
t.integer "coalescing_panda_term_id"
|
54
51
|
t.string "name"
|
55
|
-
t.string "canvas_course_id"
|
52
|
+
t.string "canvas_course_id", null: false
|
56
53
|
t.string "sis_id"
|
57
54
|
t.datetime "start_at"
|
58
55
|
t.datetime "conclude_at"
|
@@ -62,26 +59,24 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
62
59
|
t.datetime "updated_at"
|
63
60
|
end
|
64
61
|
|
65
|
-
add_index "coalescing_panda_courses", ["canvas_course_id"], name: "
|
66
|
-
add_index "coalescing_panda_courses", ["
|
67
|
-
add_index "coalescing_panda_courses", ["coalescing_panda_term_id"], name: "index_courses_term"
|
62
|
+
add_index "coalescing_panda_courses", ["coalescing_panda_lti_account_id", "canvas_course_id"], name: "index_courses_account", unique: true
|
63
|
+
add_index "coalescing_panda_courses", ["coalescing_panda_term_id", "canvas_course_id"], name: "index_courses_term", unique: true
|
68
64
|
add_index "coalescing_panda_courses", ["sis_id"], name: "index_coalescing_panda_courses_on_sis_id"
|
69
65
|
|
70
66
|
create_table "coalescing_panda_enrollments", force: true do |t|
|
71
|
-
t.integer "coalescing_panda_user_id"
|
72
|
-
t.integer "coalescing_panda_section_id"
|
67
|
+
t.integer "coalescing_panda_user_id", null: false
|
68
|
+
t.integer "coalescing_panda_section_id", null: false
|
73
69
|
t.string "workflow_state"
|
74
70
|
t.string "sis_id"
|
75
|
-
t.string "canvas_enrollment_id"
|
71
|
+
t.string "canvas_enrollment_id", null: false
|
72
|
+
t.string "enrollment_type"
|
76
73
|
t.datetime "start_at"
|
77
74
|
t.datetime "end_at"
|
78
75
|
t.datetime "created_at"
|
79
76
|
t.datetime "updated_at"
|
80
|
-
t.string "type"
|
81
77
|
end
|
82
78
|
|
83
|
-
add_index "coalescing_panda_enrollments", ["
|
84
|
-
add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id"], name: "index_enrollments_user_and_assignment"
|
79
|
+
add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id", "enrollment_type"], name: "index_enrollments_user_and_assignment", unique: true
|
85
80
|
add_index "coalescing_panda_enrollments", ["sis_id"], name: "index_coalescing_panda_enrollments_on_sis_id"
|
86
81
|
|
87
82
|
create_table "coalescing_panda_lti_accounts", force: true do |t|
|
@@ -90,10 +85,10 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
90
85
|
t.string "secret"
|
91
86
|
t.string "oauth2_client_id"
|
92
87
|
t.string "oauth2_client_key"
|
88
|
+
t.string "canvas_account_id"
|
89
|
+
t.text "settings"
|
93
90
|
t.datetime "created_at"
|
94
91
|
t.datetime "updated_at"
|
95
|
-
t.text "settings"
|
96
|
-
t.string "canvas_account_id"
|
97
92
|
end
|
98
93
|
|
99
94
|
create_table "coalescing_panda_lti_nonces", force: true do |t|
|
@@ -103,9 +98,9 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
103
98
|
end
|
104
99
|
|
105
100
|
create_table "coalescing_panda_sections", force: true do |t|
|
106
|
-
t.integer "coalescing_panda_course_id"
|
101
|
+
t.integer "coalescing_panda_course_id", null: false
|
107
102
|
t.string "name"
|
108
|
-
t.string "canvas_section_id"
|
103
|
+
t.string "canvas_section_id", null: false
|
109
104
|
t.string "sis_id"
|
110
105
|
t.string "workflow_state"
|
111
106
|
t.datetime "start_at"
|
@@ -114,8 +109,7 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
114
109
|
t.datetime "updated_at"
|
115
110
|
end
|
116
111
|
|
117
|
-
add_index "coalescing_panda_sections", ["canvas_section_id"], name: "
|
118
|
-
add_index "coalescing_panda_sections", ["coalescing_panda_course_id"], name: "index_coalescing_panda_sections_on_coalescing_panda_course_id"
|
112
|
+
add_index "coalescing_panda_sections", ["coalescing_panda_course_id", "canvas_section_id"], name: "index_sections_course", unique: true
|
119
113
|
add_index "coalescing_panda_sections", ["sis_id"], name: "index_coalescing_panda_sections_on_sis_id"
|
120
114
|
|
121
115
|
create_table "coalescing_panda_sessions", force: true do |t|
|
@@ -126,27 +120,27 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
126
120
|
end
|
127
121
|
|
128
122
|
create_table "coalescing_panda_submissions", force: true do |t|
|
129
|
-
t.integer "coalescing_panda_user_id"
|
130
|
-
t.integer "coalescing_panda_assignment_id"
|
123
|
+
t.integer "coalescing_panda_user_id", null: false
|
124
|
+
t.integer "coalescing_panda_assignment_id", null: false
|
131
125
|
t.string "url"
|
132
126
|
t.string "grade"
|
133
127
|
t.string "score"
|
134
128
|
t.datetime "submitted_at"
|
135
129
|
t.string "workflow_state"
|
136
|
-
t.string "canvas_submission_id"
|
130
|
+
t.string "canvas_submission_id", null: false
|
137
131
|
t.datetime "created_at"
|
138
132
|
t.datetime "updated_at"
|
139
133
|
end
|
140
134
|
|
141
135
|
add_index "coalescing_panda_submissions", ["canvas_submission_id"], name: "index_coalescing_panda_submissions_on_canvas_submission_id"
|
142
|
-
add_index "coalescing_panda_submissions", ["coalescing_panda_user_id", "coalescing_panda_assignment_id"], name: "index_submissions_user_and_assignment"
|
136
|
+
add_index "coalescing_panda_submissions", ["coalescing_panda_user_id", "coalescing_panda_assignment_id", "canvas_submission_id"], name: "index_submissions_user_and_assignment", unique: true
|
143
137
|
|
144
138
|
create_table "coalescing_panda_terms", force: true do |t|
|
145
|
-
t.integer "coalescing_panda_lti_account_id"
|
139
|
+
t.integer "coalescing_panda_lti_account_id", null: false
|
146
140
|
t.string "name"
|
147
141
|
t.string "code"
|
148
142
|
t.string "sis_id"
|
149
|
-
t.string "canvas_term_id"
|
143
|
+
t.string "canvas_term_id", null: false
|
150
144
|
t.datetime "start_at"
|
151
145
|
t.datetime "end_at"
|
152
146
|
t.string "workflow_state"
|
@@ -154,23 +148,22 @@ ActiveRecord::Schema.define(version: 20141125185516) do
|
|
154
148
|
t.datetime "updated_at"
|
155
149
|
end
|
156
150
|
|
157
|
-
add_index "coalescing_panda_terms", ["canvas_term_id"], name: "
|
151
|
+
add_index "coalescing_panda_terms", ["canvas_term_id", "coalescing_panda_lti_account_id"], name: "index_terms_account", unique: true
|
158
152
|
add_index "coalescing_panda_terms", ["sis_id"], name: "index_coalescing_panda_terms_on_sis_id"
|
159
153
|
|
160
154
|
create_table "coalescing_panda_users", force: true do |t|
|
161
|
-
t.integer "coalescing_panda_lti_account_id"
|
155
|
+
t.integer "coalescing_panda_lti_account_id", null: false
|
162
156
|
t.string "name"
|
163
157
|
t.string "email"
|
164
158
|
t.string "roles"
|
165
159
|
t.string "workflow_state"
|
166
160
|
t.string "sis_id"
|
167
|
-
t.string "canvas_user_id"
|
161
|
+
t.string "canvas_user_id", null: false
|
168
162
|
t.datetime "created_at"
|
169
163
|
t.datetime "updated_at"
|
170
164
|
end
|
171
165
|
|
172
|
-
add_index "coalescing_panda_users", ["canvas_user_id"], name: "
|
173
|
-
add_index "coalescing_panda_users", ["coalescing_panda_lti_account_id"], name: "index_users_account"
|
166
|
+
add_index "coalescing_panda_users", ["coalescing_panda_lti_account_id", "canvas_user_id"], name: "index_users_account", unique: true
|
174
167
|
add_index "coalescing_panda_users", ["sis_id"], name: "index_coalescing_panda_users_on_sis_id"
|
175
168
|
|
176
169
|
create_table "delayed_jobs", force: true do |t|
|