canvas_sync 0.22.8 → 0.22.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/canvas_sync/concerns/auto_relations.rb +11 -0
  3. data/lib/canvas_sync/concerns/live_event_sync.rb +2 -2
  4. data/lib/canvas_sync/concerns/user/sharded.rb +18 -0
  5. data/lib/canvas_sync/generators/templates/migrations/create_assignment_overrides.rb +25 -0
  6. data/lib/canvas_sync/generators/templates/models/assignment_override.rb +28 -0
  7. data/lib/canvas_sync/jobs/sync_assignment_overrides_job.rb +20 -0
  8. data/lib/canvas_sync/processors/assignment_overrides_processor.rb +41 -0
  9. data/lib/canvas_sync/processors/model_mappings.yml +43 -0
  10. data/lib/canvas_sync/version.rb +1 -1
  11. data/lib/canvas_sync.rb +4 -0
  12. data/spec/canvas_sync/processors/assignment_overrides_processor_spec.rb +45 -0
  13. data/spec/dummy/app/models/assignment_override.rb +34 -0
  14. data/spec/dummy/app/models/learning_outcome_result.rb +4 -4
  15. data/spec/dummy/app/models/rubric.rb +4 -4
  16. data/spec/dummy/app/models/rubric_assessment.rb +1 -0
  17. data/spec/dummy/app/models/rubric_association.rb +3 -3
  18. data/spec/dummy/app/models/user.rb +1 -0
  19. data/spec/dummy/config/application.rb +2 -0
  20. data/spec/dummy/db/migrate/20241223080202_create_assignment_overrides.rb +25 -0
  21. data/spec/dummy/db/migrate/{20240408223326_create_course_nicknames.rb → 20250319194134_create_course_nicknames.rb} +1 -1
  22. data/spec/dummy/db/migrate/{20240509105100_create_rubrics.rb → 20250319194135_create_rubrics.rb} +4 -4
  23. data/spec/dummy/db/schema.rb +191 -178
  24. data/spec/dummy/tmp/local_secret.txt +1 -0
  25. data/spec/factories/assignment_override_factory.rb +10 -0
  26. data/spec/spec_helper.rb +2 -1
  27. data/spec/support/fixtures/reports/assignment_overrides.csv +3 -0
  28. data/spec/support/fixtures/reports/assignment_overrides_conflict.csv +2 -0
  29. metadata +26 -6
@@ -2,16 +2,15 @@
2
2
  # of editing this file, please use the migrations feature of Active Record to
3
3
  # incrementally modify your database, and then regenerate this schema definition.
4
4
  #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
5
+ # This file is the source Rails uses to define your schema when running `bin/rails
6
+ # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2024_05_23_101010) do
14
-
13
+ ActiveRecord::Schema[7.1].define(version: 2025_03_19_194135) do
15
14
  # These are extensions that must be enabled in order to support this database
16
15
  enable_extension "plpgsql"
17
16
 
@@ -22,8 +21,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
22
21
  t.string "sis_parent_account_id"
23
22
  t.string "name"
24
23
  t.string "workflow_state"
25
- t.datetime "created_at", null: false
26
- t.datetime "updated_at", null: false
24
+ t.datetime "created_at", precision: nil, null: false
25
+ t.datetime "updated_at", precision: nil, null: false
27
26
  t.index ["canvas_id"], name: "index_accounts_on_canvas_id", unique: true
28
27
  end
29
28
 
@@ -34,8 +33,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
34
33
  t.bigint "canvas_role_id"
35
34
  t.bigint "canvas_user_id"
36
35
  t.string "workflow_state"
37
- t.datetime "created_at", null: false
38
- t.datetime "updated_at", null: false
36
+ t.datetime "created_at", precision: nil, null: false
37
+ t.datetime "updated_at", precision: nil, null: false
39
38
  t.index ["canvas_account_id"], name: "index_admins_on_canvas_account_id"
40
39
  t.index ["canvas_id"], name: "index_admins_on_canvas_id", unique: true
41
40
  t.index ["canvas_role_id"], name: "index_admins_on_canvas_role_id"
@@ -50,21 +49,42 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
50
49
  t.integer "position"
51
50
  t.float "group_weight"
52
51
  t.string "workflow_state"
53
- t.datetime "canvas_created_at"
54
- t.datetime "canvas_updated_at"
55
- t.datetime "created_at", null: false
56
- t.datetime "updated_at", null: false
52
+ t.datetime "canvas_created_at", precision: nil
53
+ t.datetime "canvas_updated_at", precision: nil
54
+ t.datetime "created_at", precision: nil, null: false
55
+ t.datetime "updated_at", precision: nil, null: false
57
56
  t.index ["canvas_course_id"], name: "index_assignment_groups_on_canvas_course_id"
58
57
  t.index ["canvas_id"], name: "index_assignment_groups_on_canvas_id", unique: true
59
58
  end
60
59
 
60
+ create_table "assignment_overrides", force: :cascade do |t|
61
+ t.bigint "canvas_id", null: false
62
+ t.bigint "canvas_assignment_id"
63
+ t.bigint "canvas_group_id"
64
+ t.bigint "canvas_course_id"
65
+ t.bigint "canvas_section_id"
66
+ t.bigint "student_ids", array: true
67
+ t.datetime "due_at", precision: nil
68
+ t.boolean "all_day"
69
+ t.datetime "all_day_date", precision: nil
70
+ t.datetime "unlock_at", precision: nil
71
+ t.datetime "lock_at", precision: nil
72
+ t.string "title"
73
+ t.string "workflow_state"
74
+ t.datetime "created_at", precision: nil, null: false
75
+ t.datetime "updated_at", precision: nil, null: false
76
+ t.index ["canvas_assignment_id"], name: "index_assignment_overrides_on_canvas_assignment_id"
77
+ t.index ["canvas_course_id"], name: "index_assignment_overrides_on_canvas_course_id"
78
+ t.index ["canvas_id"], name: "index_assignment_overrides_on_canvas_id", unique: true
79
+ end
80
+
61
81
  create_table "assignments", force: :cascade do |t|
62
82
  t.bigint "canvas_id", null: false
63
83
  t.string "title"
64
84
  t.text "description"
65
- t.datetime "due_at"
66
- t.datetime "unlock_at"
67
- t.datetime "lock_at"
85
+ t.datetime "due_at", precision: nil
86
+ t.datetime "unlock_at", precision: nil
87
+ t.datetime "lock_at", precision: nil
68
88
  t.float "points_possible"
69
89
  t.float "min_score"
70
90
  t.float "max_score"
@@ -77,34 +97,34 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
77
97
  t.integer "canvas_assignment_group_id"
78
98
  t.integer "canvas_grading_scheme_id"
79
99
  t.integer "canvas_grading_standard_id"
80
- t.datetime "created_at", null: false
81
- t.datetime "updated_at", null: false
100
+ t.datetime "created_at", precision: nil, null: false
101
+ t.datetime "updated_at", precision: nil, null: false
82
102
  t.index ["canvas_context_id", "canvas_context_type"], name: "index_assignments_on_canvas_context_id_and_canvas_context_type"
83
103
  t.index ["canvas_id"], name: "index_assignments_on_canvas_id", unique: true
84
104
  end
85
105
 
86
106
  create_table "canvas_sync_job_logs", id: :serial, force: :cascade do |t|
87
- t.datetime "started_at"
88
- t.datetime "completed_at"
107
+ t.datetime "started_at", precision: nil
108
+ t.datetime "completed_at", precision: nil
89
109
  t.string "exception"
90
110
  t.text "backtrace"
91
111
  t.string "job_class"
92
112
  t.string "status"
93
113
  t.text "metadata"
94
114
  t.text "job_arguments"
95
- t.datetime "created_at"
96
- t.datetime "updated_at"
115
+ t.datetime "created_at", precision: nil
116
+ t.datetime "updated_at", precision: nil
97
117
  t.string "job_id"
98
118
  t.integer "fork_count"
99
119
  t.index ["job_id"], name: "index_canvas_sync_job_logs_on_job_id"
100
120
  end
101
121
 
102
122
  create_table "canvas_sync_sync_batches", id: :serial, force: :cascade do |t|
103
- t.datetime "started_at"
104
- t.datetime "completed_at"
123
+ t.datetime "started_at", precision: nil
124
+ t.datetime "completed_at", precision: nil
105
125
  t.string "status"
106
- t.datetime "created_at"
107
- t.datetime "updated_at"
126
+ t.datetime "created_at", precision: nil
127
+ t.datetime "updated_at", precision: nil
108
128
  t.boolean "full_sync", default: false
109
129
  t.string "batch_genre"
110
130
  t.string "batch_bid"
@@ -116,15 +136,15 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
116
136
  t.string "canvas_context_type"
117
137
  t.string "workflow_state"
118
138
  t.text "migration_settings"
119
- t.datetime "started_at"
120
- t.datetime "finished_at"
139
+ t.datetime "started_at", precision: nil
140
+ t.datetime "finished_at", precision: nil
121
141
  t.float "progress"
122
142
  t.bigint "canvas_source_course_id"
123
143
  t.string "migration_type"
124
144
  t.bigint "canvas_child_subscription_id"
125
145
  t.bigint "canvas_root_account_id"
126
- t.datetime "created_at", null: false
127
- t.datetime "updated_at", null: false
146
+ t.datetime "created_at", precision: nil, null: false
147
+ t.datetime "updated_at", precision: nil, null: false
128
148
  t.index ["canvas_id"], name: "index_content_migrations_on_canvas_id", unique: true
129
149
  end
130
150
 
@@ -136,8 +156,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
136
156
  t.string "canvas_content_type"
137
157
  t.bigint "canvas_assignment_id"
138
158
  t.string "workflow_state"
139
- t.datetime "created_at", null: false
140
- t.datetime "updated_at", null: false
159
+ t.datetime "created_at", precision: nil, null: false
160
+ t.datetime "updated_at", precision: nil, null: false
141
161
  t.index ["canvas_context_module_id"], name: "index_context_module_items_on_canvas_context_module_id"
142
162
  t.index ["canvas_id"], name: "index_context_module_items_on_canvas_id", unique: true
143
163
  end
@@ -149,23 +169,23 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
149
169
  t.integer "position"
150
170
  t.string "name"
151
171
  t.string "workflow_state"
152
- t.datetime "deleted_at"
153
- t.datetime "unlock_at"
154
- t.datetime "created_at", null: false
155
- t.datetime "updated_at", null: false
172
+ t.datetime "deleted_at", precision: nil
173
+ t.datetime "unlock_at", precision: nil
156
174
  t.text "completion_requirements"
157
175
  t.text "prerequisites"
176
+ t.datetime "created_at", precision: nil, null: false
177
+ t.datetime "updated_at", precision: nil, null: false
158
178
  t.index ["canvas_context_id", "canvas_context_type"], name: "index_context_modules_on_context"
159
179
  t.index ["canvas_id"], name: "index_context_modules_on_canvas_id", unique: true
160
180
  end
161
181
 
162
182
  create_table "course_nicknames", force: :cascade do |t|
163
- t.bigint "canvas_user_preference_value_id", null: false
183
+ t.bigint "canvas_user_preference_value_id"
164
184
  t.integer "canvas_user_id"
165
185
  t.integer "canvas_course_id"
166
186
  t.string "nickname"
167
- t.datetime "created_at", null: false
168
- t.datetime "updated_at", null: false
187
+ t.datetime "created_at", precision: nil, null: false
188
+ t.datetime "updated_at", precision: nil, null: false
169
189
  t.index ["canvas_course_id", "canvas_user_id"], name: "index_course_nicknames_on_canvas_course_id_and_canvas_user_id", unique: true
170
190
  t.index ["canvas_user_preference_value_id"], name: "index_course_nicknames_on_canvas_user_preference_value_id", unique: true
171
191
  end
@@ -175,12 +195,12 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
175
195
  t.bigint "canvas_user_id", null: false
176
196
  t.integer "requirement_count"
177
197
  t.integer "requirement_completed_count"
178
- t.datetime "completion_date"
179
- t.datetime "created_at", null: false
180
- t.datetime "updated_at", null: false
181
- t.index ["canvas_user_id"], name: "index_course_progresses_on_canvas_user_id"
198
+ t.datetime "completion_date", precision: nil
199
+ t.datetime "created_at", precision: nil, null: false
200
+ t.datetime "updated_at", precision: nil, null: false
182
201
  t.index ["canvas_course_id"], name: "index_course_progresses_on_canvas_course_id"
183
202
  t.index ["canvas_user_id", "canvas_course_id"], name: "index_course_progresses_on_canvas_user_id_and_canvas_course_id", unique: true
203
+ t.index ["canvas_user_id"], name: "index_course_progresses_on_canvas_user_id"
184
204
  end
185
205
 
186
206
  create_table "courses", force: :cascade do |t|
@@ -191,11 +211,11 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
191
211
  t.string "workflow_state"
192
212
  t.integer "canvas_account_id"
193
213
  t.integer "canvas_term_id"
194
- t.datetime "start_at"
195
- t.datetime "end_at"
214
+ t.datetime "start_at", precision: nil
215
+ t.datetime "end_at", precision: nil
196
216
  t.bigint "grading_standard_id"
197
- t.datetime "created_at", null: false
198
- t.datetime "updated_at", null: false
217
+ t.datetime "created_at", precision: nil, null: false
218
+ t.datetime "updated_at", precision: nil, null: false
199
219
  t.index ["canvas_id"], name: "index_courses_on_canvas_id", unique: true
200
220
  end
201
221
 
@@ -210,9 +230,9 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
210
230
  t.bigint "canvas_section_id"
211
231
  t.string "workflow_state"
212
232
  t.string "base_role_type"
213
- t.datetime "completed_at"
214
- t.datetime "created_at", null: false
215
- t.datetime "updated_at", null: false
233
+ t.datetime "completed_at", precision: nil
234
+ t.datetime "created_at", precision: nil, null: false
235
+ t.datetime "updated_at", precision: nil, null: false
216
236
  t.index ["canvas_course_id"], name: "index_enrollments_on_canvas_course_id"
217
237
  t.index ["canvas_id"], name: "index_enrollments_on_canvas_id", unique: true
218
238
  t.index ["canvas_user_id"], name: "index_enrollments_on_canvas_user_id"
@@ -224,8 +244,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
224
244
  t.boolean "weighted"
225
245
  t.boolean "display_totals_for_all_grading_periods"
226
246
  t.string "workflow_state"
227
- t.datetime "created_at", null: false
228
- t.datetime "updated_at", null: false
247
+ t.datetime "created_at", precision: nil, null: false
248
+ t.datetime "updated_at", precision: nil, null: false
229
249
  t.index ["canvas_id"], name: "index_grading_period_groups_on_canvas_id", unique: true
230
250
  end
231
251
 
@@ -233,13 +253,13 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
233
253
  t.bigint "canvas_id", null: false
234
254
  t.string "title"
235
255
  t.float "weight"
236
- t.datetime "start_date"
237
- t.datetime "end_date"
238
- t.datetime "close_date"
256
+ t.datetime "start_date", precision: nil
257
+ t.datetime "end_date", precision: nil
258
+ t.datetime "close_date", precision: nil
239
259
  t.bigint "canvas_grading_period_group_id"
240
260
  t.string "workflow_state"
241
- t.datetime "created_at", null: false
242
- t.datetime "updated_at", null: false
261
+ t.datetime "created_at", precision: nil, null: false
262
+ t.datetime "updated_at", precision: nil, null: false
243
263
  t.index ["canvas_grading_period_group_id"], name: "index_grading_periods_on_canvas_grading_period_group_id"
244
264
  t.index ["canvas_id"], name: "index_grading_periods_on_canvas_id", unique: true
245
265
  end
@@ -251,8 +271,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
251
271
  t.string "group_sis_id"
252
272
  t.string "user_sis_id"
253
273
  t.string "workflow_state"
254
- t.datetime "created_at", null: false
255
- t.datetime "updated_at", null: false
274
+ t.datetime "created_at", precision: nil, null: false
275
+ t.datetime "updated_at", precision: nil, null: false
256
276
  t.index ["canvas_id"], name: "index_group_memberships_on_canvas_id", unique: true
257
277
  end
258
278
 
@@ -268,37 +288,13 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
268
288
  t.bigint "context_id"
269
289
  t.string "context_type"
270
290
  t.integer "max_membership"
271
- t.datetime "created_at", null: false
272
- t.datetime "updated_at", null: false
291
+ t.datetime "created_at", precision: nil, null: false
292
+ t.datetime "updated_at", precision: nil, null: false
273
293
  t.index ["canvas_id"], name: "index_groups_on_canvas_id", unique: true
274
294
  end
275
295
 
276
- create_table "learning_outcomes", force: :cascade do |t|
277
- t.bigint "canvas_id", null: false
278
- t.integer "canvas_context_id"
279
- t.string "canvas_context_type"
280
- t.string "name"
281
- t.string "friendly_name"
282
- t.string "workflow_state"
283
- t.datetime "canvas_created_at"
284
- t.datetime "canvas_updated_at"
285
- t.string "migration_id"
286
- t.string "vendor_guid"
287
- t.string "low_grade"
288
- t.string "high_grade"
289
- t.string "calculation_method"
290
- t.string "calculation_int"
291
- t.integer "outcome_import_id"
292
- t.integer "root_account_ids", default: [], array: true
293
- t.text "description"
294
- t.datetime "created_at", null: false
295
- t.datetime "updated_at", null: false
296
- t.index ["canvas_context_id", "canvas_context_type"], name: "index_learning_outcomes_on_context"
297
- t.index ["canvas_id"], name: "index_learning_outcomes_on_canvas_id", unique: true
298
- end
299
-
300
296
  create_table "learning_outcome_results", force: :cascade do |t|
301
- t.bigint "canvas_id", null: false
297
+ t.bigint "canvas_id", null: false
302
298
  t.bigint "canvas_context_id"
303
299
  t.string "canvas_context_type"
304
300
  t.bigint "canvas_association_id"
@@ -310,7 +306,7 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
310
306
  t.boolean "original_mastery"
311
307
  t.bigint "canvas_artifact_id"
312
308
  t.string "canvas_artifact_type"
313
- t.datetime "assessed_at"
309
+ t.datetime "assessed_at", precision: nil
314
310
  t.string "title"
315
311
  t.float "percent"
316
312
  t.bigint "canvas_associated_asset_id"
@@ -321,20 +317,37 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
321
317
  t.float "original_score"
322
318
  t.float "original_possible"
323
319
  t.string "workflow_state"
324
- t.datetime "created_at", null: false
325
- t.datetime "updated_at", null: false
326
- t.index "canvas_id", unique: true
327
- t.index [
328
- "canvas_user_id",
329
- "canvas_content_tag_id",
330
- "canvas_association_id",
331
- "canvas_association_type",
332
- "canvas_associated_asset_id",
333
- "canvas_associated_asset_type"
334
- ], unique: true, name: 'index_learning_outcome_results_association'
335
- t.index "canvas_content_tag_id"
336
- t.index "canvas_learning_outcome_id"
320
+ t.datetime "created_at", precision: nil, null: false
321
+ t.datetime "updated_at", precision: nil, null: false
337
322
  t.index ["canvas_artifact_id", "canvas_artifact_type"], name: "index_learning_outcome_results_on_canvas_arid_and_artype"
323
+ t.index ["canvas_content_tag_id"], name: "index_learning_outcome_results_on_canvas_content_tag_id"
324
+ t.index ["canvas_id"], name: "index_learning_outcome_results_on_canvas_id", unique: true
325
+ t.index ["canvas_learning_outcome_id"], name: "index_learning_outcome_results_on_canvas_learning_outcome_id"
326
+ t.index ["canvas_user_id", "canvas_content_tag_id", "canvas_association_id", "canvas_association_type", "canvas_associated_asset_id", "canvas_associated_asset_type"], name: "index_learning_outcome_results_association", unique: true
327
+ end
328
+
329
+ create_table "learning_outcomes", force: :cascade do |t|
330
+ t.bigint "canvas_id", null: false
331
+ t.integer "canvas_context_id"
332
+ t.string "canvas_context_type"
333
+ t.string "name"
334
+ t.string "friendly_name"
335
+ t.string "workflow_state"
336
+ t.datetime "canvas_created_at", precision: nil
337
+ t.datetime "canvas_updated_at", precision: nil
338
+ t.string "migration_id"
339
+ t.string "vendor_guid"
340
+ t.string "low_grade"
341
+ t.string "high_grade"
342
+ t.string "calculation_method"
343
+ t.string "calculation_int"
344
+ t.integer "outcome_import_id"
345
+ t.integer "root_account_ids", default: [], array: true
346
+ t.text "description"
347
+ t.datetime "created_at", precision: nil, null: false
348
+ t.datetime "updated_at", precision: nil, null: false
349
+ t.index ["canvas_context_id", "canvas_context_type"], name: "index_learning_outcomes_on_context"
350
+ t.index ["canvas_id"], name: "index_learning_outcomes_on_canvas_id", unique: true
338
351
  end
339
352
 
340
353
  create_table "pseudonyms", force: :cascade do |t|
@@ -343,8 +356,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
343
356
  t.string "sis_id"
344
357
  t.string "unique_id"
345
358
  t.string "workflow_state"
346
- t.datetime "created_at", null: false
347
- t.datetime "updated_at", null: false
359
+ t.datetime "created_at", precision: nil, null: false
360
+ t.datetime "updated_at", precision: nil, null: false
348
361
  t.index ["canvas_id"], name: "index_pseudonyms_on_canvas_id", unique: true
349
362
  t.index ["canvas_user_id"], name: "index_pseudonyms_on_canvas_user_id"
350
363
  end
@@ -356,97 +369,97 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
356
369
  t.integer "canvas_account_id"
357
370
  t.string "workflow_state"
358
371
  t.json "permissions"
359
- t.datetime "created_at", null: false
360
- t.datetime "updated_at", null: false
372
+ t.datetime "created_at", precision: nil, null: false
373
+ t.datetime "updated_at", precision: nil, null: false
361
374
  t.index ["canvas_account_id"], name: "index_roles_on_canvas_account_id"
362
375
  t.index ["canvas_id"], name: "index_roles_on_canvas_id", unique: true
363
376
  end
364
377
 
365
- create_table "rubrics", force: :cascade do |t|
366
- t.bigint "canvas_id", null: false
378
+ create_table "rubric_assessments", force: :cascade do |t|
379
+ t.bigint "canvas_id"
367
380
  t.bigint "canvas_user_id"
368
381
  t.bigint "canvas_rubric_id"
369
- t.bigint "canvas_context_id"
370
- t.string "canvas_context_type"
382
+ t.bigint "canvas_rubric_association_id"
383
+ t.float "score"
371
384
  t.text "data"
372
- t.float "points_possible"
373
- t.string "title"
374
- t.text "description"
375
- t.boolean "reusable"
376
- t.boolean "public"
377
- t.boolean "read_only"
378
- t.integer "association_count"
379
- t.boolean "free_form_criterion_comments"
380
- t.string "context_code"
381
- t.string "migration_id"
382
- t.boolean "hide_score_total"
383
- t.string "workflow_state"
384
- t.bigint "canvas_root_account_id"
385
+ t.bigint "canvas_artifact_id"
386
+ t.string "canvas_artifact_type"
387
+ t.string "assessment_type"
388
+ t.bigint "canvas_assessor_id"
389
+ t.integer "artifact_attempt"
385
390
  t.boolean "hide_points"
386
- t.string "rating_order"
387
- t.string "button_display"
388
- t.datetime "created_at", null: false
389
- t.datetime "updated_at", null: false
390
- t.index "canvas_id", name: "index_rubrics_on_canvas_id", unique: true
391
- t.index ["canvas_context_id", "canvas_context_type"], name: "index_rubrics_on_canvas_context_id_and_canvas_context_type"
392
- t.index "canvas_rubric_id", name: "index_rubrics_on_canvas_rubric_id"
393
- t.index "canvas_user_id", name: "index_rubrics_on_canvas_user_id"
394
- t.index "canvas_root_account_id", name: "index_rubrics_on_canvas_root_account_id"
391
+ t.bigint "canvas_root_account_id"
392
+ t.datetime "created_at", precision: nil, null: false
393
+ t.datetime "updated_at", precision: nil, null: false
394
+ t.index ["canvas_artifact_id", "canvas_artifact_type"], name: "index_rubric_assessments_on_canvas_aid_and_canvas_atype"
395
+ t.index ["canvas_assessor_id"], name: "index_rubric_assessments_on_canvas_assessor_id"
396
+ t.index ["canvas_id"], name: "index_rubric_assessments_on_canvas_id", unique: true
397
+ t.index ["canvas_root_account_id"], name: "index_rubric_assessments_on_canvas_root_account_id"
398
+ t.index ["canvas_rubric_association_id"], name: "index_rubric_assessments_on_canvas_rubric_association_id"
399
+ t.index ["canvas_rubric_id"], name: "index_rubric_assessments_on_canvas_rubric_id"
400
+ t.index ["canvas_user_id"], name: "index_rubric_assessments_on_canvas_user_id"
395
401
  end
396
402
 
397
403
  create_table "rubric_associations", force: :cascade do |t|
398
- t.integer "canvas_id", null: false
399
- t.integer "canvas_rubric_id"
400
- t.integer "canvas_association_id"
404
+ t.bigint "canvas_id", null: false
405
+ t.bigint "canvas_rubric_id"
406
+ t.bigint "canvas_association_id"
401
407
  t.string "canvas_association_type"
402
408
  t.boolean "use_for_grading"
403
- t.datetime "created_at"
404
- t.datetime "updated_at"
405
409
  t.string "title"
406
410
  t.text "description"
407
411
  t.text "summary_data"
408
412
  t.string "purpose"
409
413
  t.string "url"
410
- t.integer "canvas_context_id"
414
+ t.bigint "canvas_context_id"
411
415
  t.string "canvas_context_type"
412
416
  t.boolean "hide_score_total"
413
- t.string "context_code"
414
417
  t.boolean "bookmarked"
418
+ t.string "context_code"
415
419
  t.boolean "hide_points"
416
420
  t.boolean "hide_outcome_results"
417
421
  t.bigint "canvas_root_account_id"
418
422
  t.string "workflow_state"
419
- t.index ["canvas_id"], name: "index_rubric_associations_on_canvas_id", unique: true
423
+ t.datetime "created_at", precision: nil, null: false
424
+ t.datetime "updated_at", precision: nil, null: false
420
425
  t.index ["canvas_association_id", "canvas_association_type"], name: "index_rubric_associations_on_canvas_aid_and_canvas_atype"
421
- t.index ["context_code"], name: "index_rubric_associations_on_context_code"
422
426
  t.index ["canvas_context_id", "canvas_context_type"], name: "index_rubric_associations_on_canvas_cid_and_canvas_ctype"
423
- t.index ["canvas_rubric_id"], name: "index_rubric_associations_on_canvas_rubric_id"
427
+ t.index ["canvas_id"], name: "index_rubric_associations_on_canvas_id", unique: true
424
428
  t.index ["canvas_root_account_id"], name: "index_rubric_associations_on_canvas_root_account_id"
429
+ t.index ["canvas_rubric_id"], name: "index_rubric_associations_on_canvas_rubric_id"
430
+ t.index ["context_code"], name: "index_rubric_associations_on_context_code"
425
431
  end
426
432
 
427
- create_table "rubric_assessments", force: :cascade do |t|
428
- t.bigint "canvas_id"
433
+ create_table "rubrics", force: :cascade do |t|
434
+ t.bigint "canvas_id", null: false
429
435
  t.bigint "canvas_user_id"
430
436
  t.bigint "canvas_rubric_id"
431
- t.bigint "canvas_rubric_association_id"
432
- t.float "score"
437
+ t.bigint "canvas_context_id"
438
+ t.string "canvas_context_type"
433
439
  t.text "data"
434
- t.datetime "created_at"
435
- t.datetime "updated_at"
436
- t.bigint "canvas_artifact_id"
437
- t.string "canvas_artifact_type"
438
- t.string "assessment_type"
439
- t.bigint "canvas_assessor_id"
440
- t.integer "artifact_attempt"
441
- t.boolean "hide_points"
440
+ t.float "points_possible"
441
+ t.string "title"
442
+ t.text "description"
443
+ t.boolean "reusable"
444
+ t.boolean "public"
445
+ t.boolean "read_only"
446
+ t.integer "association_count"
447
+ t.boolean "free_form_criterion_comments"
448
+ t.string "context_code"
449
+ t.string "migration_id"
450
+ t.boolean "hide_score_total"
451
+ t.string "workflow_state"
442
452
  t.bigint "canvas_root_account_id"
443
- t.index ["canvas_id"], name: "index_rubric_assessments_on_canvas_id", unique: true
444
- t.index ["canvas_artifact_id", "canvas_artifact_type"], name: "index_rubric_assessments_on_canvas_aid_and_canvas_atype"
445
- t.index ["canvas_assessor_id"], name: "index_rubric_assessments_on_canvas_assessor_id"
446
- t.index ["canvas_rubric_association_id"], name: "index_rubric_assessments_on_canvas_rubric_association_id"
447
- t.index ["canvas_rubric_id"], name: "index_rubric_assessments_on_canvas_rubric_id"
448
- t.index ["canvas_user_id"], name: "index_rubric_assessments_on_canvas_user_id"
449
- t.index ["canvas_root_account_id"], name: "index_rubric_assessments_on_canvas_root_account_id"
453
+ t.boolean "hide_points"
454
+ t.string "rating_order"
455
+ t.string "button_display"
456
+ t.datetime "created_at", precision: nil, null: false
457
+ t.datetime "updated_at", precision: nil, null: false
458
+ t.index ["canvas_context_id", "canvas_context_type"], name: "index_rubrics_on_canvas_context_id_and_canvas_context_type"
459
+ t.index ["canvas_id"], name: "index_rubrics_on_canvas_id", unique: true
460
+ t.index ["canvas_root_account_id"], name: "index_rubrics_on_canvas_root_account_id"
461
+ t.index ["canvas_rubric_id"], name: "index_rubrics_on_canvas_rubric_id"
462
+ t.index ["canvas_user_id"], name: "index_rubrics_on_canvas_user_id"
450
463
  end
451
464
 
452
465
  create_table "sections", force: :cascade do |t|
@@ -456,10 +469,10 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
456
469
  t.bigint "canvas_nonxlist_course_id"
457
470
  t.string "name"
458
471
  t.string "workflow_state"
459
- t.datetime "start_at"
460
- t.datetime "end_at"
461
- t.datetime "created_at", null: false
462
- t.datetime "updated_at", null: false
472
+ t.datetime "start_at", precision: nil
473
+ t.datetime "end_at", precision: nil
474
+ t.datetime "created_at", precision: nil, null: false
475
+ t.datetime "updated_at", precision: nil, null: false
463
476
  t.index ["canvas_course_id"], name: "index_sections_on_canvas_course_id"
464
477
  t.index ["canvas_id"], name: "index_sections_on_canvas_id", unique: true
465
478
  end
@@ -469,15 +482,15 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
469
482
  t.bigint "canvas_course_id"
470
483
  t.bigint "canvas_assignment_id"
471
484
  t.bigint "canvas_user_id"
472
- t.datetime "submitted_at"
473
- t.datetime "due_at"
474
- t.datetime "graded_at"
485
+ t.datetime "submitted_at", precision: nil
486
+ t.datetime "due_at", precision: nil
487
+ t.datetime "graded_at", precision: nil
475
488
  t.float "score"
476
489
  t.float "points_possible"
477
490
  t.boolean "excused"
478
491
  t.string "workflow_state"
479
- t.datetime "created_at", null: false
480
- t.datetime "updated_at", null: false
492
+ t.datetime "created_at", precision: nil, null: false
493
+ t.datetime "updated_at", precision: nil, null: false
481
494
  t.index ["canvas_assignment_id"], name: "index_submissions_on_canvas_assignment_id"
482
495
  t.index ["canvas_course_id"], name: "index_submissions_on_canvas_course_id"
483
496
  t.index ["canvas_id"], name: "index_submissions_on_canvas_id", unique: true
@@ -487,13 +500,13 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
487
500
  create_table "terms", force: :cascade do |t|
488
501
  t.integer "canvas_id", null: false
489
502
  t.string "name"
490
- t.datetime "start_at"
491
- t.datetime "end_at"
503
+ t.datetime "start_at", precision: nil
504
+ t.datetime "end_at", precision: nil
492
505
  t.string "workflow_state"
493
506
  t.integer "grading_period_group_id"
494
507
  t.string "sis_id"
495
- t.datetime "created_at", null: false
496
- t.datetime "updated_at", null: false
508
+ t.datetime "created_at", precision: nil, null: false
509
+ t.datetime "updated_at", precision: nil, null: false
497
510
  t.index ["canvas_id"], name: "index_terms_on_canvas_id", unique: true
498
511
  end
499
512
 
@@ -501,8 +514,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
501
514
  t.bigint "observing_user_id"
502
515
  t.bigint "observed_user_id"
503
516
  t.string "workflow_state"
504
- t.datetime "created_at", null: false
505
- t.datetime "updated_at", null: false
517
+ t.datetime "created_at", precision: nil, null: false
518
+ t.datetime "updated_at", precision: nil, null: false
506
519
  t.index ["observed_user_id", "observing_user_id"], name: "index_user_observers_on_observed_user_id_and_observing_user_id", unique: true
507
520
  t.index ["observed_user_id"], name: "index_user_observers_on_observed_user_id"
508
521
  t.index ["observing_user_id"], name: "index_user_observers_on_observing_user_id"
@@ -517,8 +530,8 @@ ActiveRecord::Schema.define(version: 2024_05_23_101010) do
517
530
  t.string "login_id"
518
531
  t.string "name"
519
532
  t.string "sortable_name"
520
- t.datetime "created_at", null: false
521
- t.datetime "updated_at", null: false
533
+ t.datetime "created_at", precision: nil, null: false
534
+ t.datetime "updated_at", precision: nil, null: false
522
535
  t.index ["canvas_id"], name: "index_users_on_canvas_id", unique: true
523
536
  end
524
537
 
@@ -0,0 +1 @@
1
+ 851f946ee3fdb7c1b6265a8445cdcc0071988f43898ec1099500a655f28484d45fa06dd9628496983d323a058d72b6282782401cabcb8856c09378199ca2ab38
@@ -0,0 +1,10 @@
1
+ FactoryBot.define do
2
+ factory :assignment_override do
3
+ sequence(:canvas_id) { |n| n }
4
+ sequence(:title) { |n| "Override #{n}" }
5
+ workflow_state { 'active' }
6
+
7
+ association :assignment
8
+ association :course
9
+ end
10
+ end