canvas_sync 0.3.23 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -0
  3. data/lib/canvas_sync.rb +11 -1
  4. data/lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_created_event.rb +5 -4
  5. data/lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_event.rb +40 -49
  6. data/lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_updated_event.rb +5 -3
  7. data/lib/canvas_sync/generators/templates/services/live_events/base_event.rb +12 -19
  8. data/lib/canvas_sync/generators/templates/services/live_events/course/course_created_event.rb +5 -3
  9. data/lib/canvas_sync/generators/templates/services/live_events/course/course_event.rb +32 -38
  10. data/lib/canvas_sync/generators/templates/services/live_events/course/course_updated_event.rb +5 -3
  11. data/lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_created_event.rb +5 -3
  12. data/lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_event.rb +53 -56
  13. data/lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_updated_event.rb +5 -3
  14. data/lib/canvas_sync/generators/templates/services/live_events/grade/grade_changed_event.rb +5 -3
  15. data/lib/canvas_sync/generators/templates/services/live_events/grade/grade_event.rb +47 -48
  16. data/lib/canvas_sync/generators/templates/services/live_events/module/module_created_event.rb +6 -0
  17. data/lib/canvas_sync/generators/templates/services/live_events/module/module_event.rb +39 -0
  18. data/lib/canvas_sync/generators/templates/services/live_events/module/module_updated_event.rb +6 -0
  19. data/lib/canvas_sync/generators/templates/services/live_events/submission/submission_created_event.rb +5 -3
  20. data/lib/canvas_sync/generators/templates/services/live_events/submission/submission_event.rb +40 -45
  21. data/lib/canvas_sync/generators/templates/services/live_events/submission/submission_updated_event.rb +5 -3
  22. data/lib/canvas_sync/generators/templates/services/live_events/syllabus/syllabus_event.rb +29 -30
  23. data/lib/canvas_sync/generators/templates/services/live_events/syllabus/syllabus_updated_event.rb +4 -2
  24. data/lib/canvas_sync/generators/templates/services/live_events/user/user_created_event.rb +5 -3
  25. data/lib/canvas_sync/generators/templates/services/live_events/user/user_event.rb +5 -8
  26. data/lib/canvas_sync/generators/templates/services/live_events/user/user_updated_event.rb +5 -3
  27. data/lib/canvas_sync/version.rb +1 -1
  28. data/spec/canvas_sync/services/module_event_spec.rb +42 -0
  29. data/spec/dummy/app/services/live_events/assignment_created_event.rb +12 -0
  30. data/spec/dummy/app/services/live_events/assignment_event.rb +60 -0
  31. data/spec/dummy/app/services/live_events/assignment_updated_event.rb +12 -0
  32. data/spec/dummy/app/services/live_events/base_event.rb +22 -0
  33. data/spec/dummy/app/services/live_events/course_created_event.rb +12 -0
  34. data/spec/dummy/app/services/live_events/course_event.rb +42 -0
  35. data/spec/dummy/app/services/live_events/course_updated_event.rb +12 -0
  36. data/spec/dummy/app/services/live_events/enrollment_created_event.rb +12 -0
  37. data/spec/dummy/app/services/live_events/enrollment_event.rb +61 -0
  38. data/spec/dummy/app/services/live_events/enrollment_updated_event.rb +12 -0
  39. data/spec/dummy/app/services/live_events/grade_changed_event.rb +12 -0
  40. data/spec/dummy/app/services/live_events/grade_event.rb +61 -0
  41. data/spec/dummy/app/services/live_events/module_created_event.rb +12 -0
  42. data/spec/dummy/app/services/live_events/module_event.rb +45 -0
  43. data/spec/dummy/app/services/live_events/module_updated_event.rb +12 -0
  44. data/spec/dummy/app/services/live_events/submission_created_event.rb +12 -0
  45. data/spec/dummy/app/services/live_events/submission_event.rb +58 -0
  46. data/spec/dummy/app/services/live_events/submission_updated_event.rb +12 -0
  47. data/spec/dummy/app/services/live_events/syllabus_event.rb +40 -0
  48. data/spec/dummy/app/services/live_events/syllabus_updated_event.rb +12 -0
  49. data/spec/dummy/app/services/live_events/user_created_event.rb +12 -0
  50. data/spec/dummy/app/services/live_events/user_event.rb +38 -0
  51. data/spec/dummy/app/services/live_events/user_updated_event.rb +12 -0
  52. data/spec/dummy/log/development.log +666 -0
  53. data/spec/dummy/log/test.log +3758 -0
  54. data/spec/support/fake_canvas.rb +4 -0
  55. data/spec/support/fixtures/canvas_responses/module.json +12 -0
  56. metadata +57 -4
@@ -0,0 +1,12 @@
1
+ # #
2
+ # AUTO GENERATED LIVE EVENT
3
+ # This was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ module LiveEvents
10
+ class UserChangedEvent < LiveEvents::UserEvent
11
+ end
12
+ end
@@ -0,0 +1,38 @@
1
+ # #
2
+ # AUTO GENERATED LIVE EVENT
3
+ # This was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ module LiveEvents
10
+ class UserEvent < LiveEvents::BaseEvent
11
+ # The following is provided in the live events call:
12
+ # {
13
+ # user_id: user.global_id,
14
+ # uuid: user.uuid,
15
+ # name: user.name,
16
+ # short_name: user.short_name,
17
+ # workflow_state: user.workflow_state,
18
+ # created_at: user.created_at,
19
+ # updated_at: user.updated_at
20
+ # }
21
+
22
+ def perform(event_payload)
23
+ super
24
+ attrs = {
25
+ canvas_user_id: local_canvas_id(payload[:user_id]),
26
+ status: payload[:workflow_state],
27
+ }
28
+ create_or_update(attrs)
29
+ end
30
+
31
+ private
32
+
33
+ def create_or_update(attrs)
34
+ user = User.where(canvas_user_id: attrs[:canvas_user_id]).first_or_initialize
35
+ user.assign_attributes(attrs)
36
+ user.save!
37
+ end
38
+ end
@@ -0,0 +1,12 @@
1
+ # #
2
+ # AUTO GENERATED LIVE EVENT
3
+ # This was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ module LiveEvents
10
+ class UserUpdatedEvent < LiveEvents::UserEvent
11
+ end
12
+ end
@@ -2175,3 +2175,669 @@ Migrating to CreateContextModuleItems (20180411215633)
2175
2175
   (5.7ms) COMMIT
2176
2176
   (0.4ms) SELECT pg_advisory_unlock(1438354376499275445)
2177
2177
   (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2178
+  (3.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2179
+  (13.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2180
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2181
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2182
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2183
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2184
+  (218.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2185
+  (173.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2186
+  (16.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2187
+  (4.0ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2188
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
2189
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2190
+ Migrating to CreateEnrollments (20170905192509)
2191
+  (0.1ms) BEGIN
2192
+  (5.1ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2193
+  (1.5ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2194
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2195
+  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2196
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2197
+  (0.4ms) COMMIT
2198
+ Migrating to CreateTerms (20170906193506)
2199
+  (0.2ms) BEGIN
2200
+  (4.8ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2201
+  (1.5ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2202
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2203
+  (0.4ms) COMMIT
2204
+ Migrating to CreateCourses (20170914181345)
2205
+  (0.3ms) BEGIN
2206
+  (4.4ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2207
+  (1.6ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2208
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2209
+  (0.4ms) COMMIT
2210
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2211
+  (5.5ms) BEGIN
2212
+  (22.8ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2213
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2214
+  (0.5ms) COMMIT
2215
+ Migrating to CreateUsers (20170918221413)
2216
+  (0.2ms) BEGIN
2217
+  (6.1ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2218
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2219
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2220
+  (0.5ms) COMMIT
2221
+ Migrating to CreateSections (20171107213207)
2222
+  (0.2ms) BEGIN
2223
+  (4.4ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2224
+  (1.6ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2225
+  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2226
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2227
+  (0.4ms) COMMIT
2228
+ Migrating to CreateRoles (20180103162102)
2229
+  (0.2ms) BEGIN
2230
+  (4.7ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2231
+  (1.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2232
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2233
+  (0.4ms) COMMIT
2234
+ Migrating to CreateAdmins (20180109210452)
2235
+  (0.2ms) BEGIN
2236
+  (4.4ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2237
+  (1.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2238
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2239
+  (0.4ms) COMMIT
2240
+ Migrating to CreateAssignments (20180215214227)
2241
+  (0.2ms) BEGIN
2242
+  (5.4ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2243
+  (1.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2244
+  (1.6ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2245
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2246
+  (0.4ms) COMMIT
2247
+ Migrating to CreateSubmissions (20180216171618)
2248
+  (0.2ms) BEGIN
2249
+  (6.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2250
+  (1.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2251
+  (1.4ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2252
+  (1.6ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2253
+  (1.4ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2254
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2255
+  (0.4ms) COMMIT
2256
+ Migrating to CreateAccounts (20180220172559)
2257
+  (0.2ms) BEGIN
2258
+  (4.6ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2259
+  (1.4ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2260
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2261
+  (0.5ms) COMMIT
2262
+ Migrating to CreateAssignmentGroups (20180222163506)
2263
+  (0.2ms) BEGIN
2264
+  (5.2ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2265
+  (1.4ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2266
+  (1.4ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2267
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2268
+  (0.4ms) COMMIT
2269
+ Migrating to CreateContextModules (20180411215348)
2270
+  (0.2ms) BEGIN
2271
+  (5.1ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2272
+  (1.5ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2273
+  (1.5ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2274
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2275
+  (0.4ms) COMMIT
2276
+ Migrating to CreateContextModuleItems (20180411215633)
2277
+  (0.3ms) BEGIN
2278
+  (5.2ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2279
+  (1.4ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2280
+  (1.4ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2281
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2282
+  (0.5ms) COMMIT
2283
+ ActiveRecord::InternalMetadata Load (1.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2284
+  (0.1ms) BEGIN
2285
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-26 21:23:30.705216"], ["updated_at", "2018-04-26 21:23:30.705216"]]
2286
+  (0.4ms) COMMIT
2287
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
2288
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2289
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2290
+  (1.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2291
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2292
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2293
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2294
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2295
+  (195.4ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2296
+  (207.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2297
+  (25.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2298
+  (5.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2299
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
2300
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2301
+ Migrating to CreateEnrollments (20170905192509)
2302
+  (0.1ms) BEGIN
2303
+  (22.3ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2304
+  (2.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2305
+  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2306
+  (2.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2307
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2308
+  (0.4ms) COMMIT
2309
+ Migrating to CreateTerms (20170906193506)
2310
+  (0.2ms) BEGIN
2311
+  (5.7ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2312
+  (2.0ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2313
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2314
+  (0.4ms) COMMIT
2315
+ Migrating to CreateCourses (20170914181345)
2316
+  (0.2ms) BEGIN
2317
+  (5.6ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2318
+  (1.8ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2319
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2320
+  (0.4ms) COMMIT
2321
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2322
+  (6.0ms) BEGIN
2323
+  (17.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2324
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2325
+  (0.6ms) COMMIT
2326
+ Migrating to CreateUsers (20170918221413)
2327
+  (0.3ms) BEGIN
2328
+  (6.4ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2329
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2330
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2331
+  (0.4ms) COMMIT
2332
+ Migrating to CreateSections (20171107213207)
2333
+  (0.2ms) BEGIN
2334
+  (5.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2335
+  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2336
+  (1.9ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2337
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2338
+  (0.4ms) COMMIT
2339
+ Migrating to CreateRoles (20180103162102)
2340
+  (0.2ms) BEGIN
2341
+  (5.4ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2342
+  (1.5ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2343
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2344
+  (0.5ms) COMMIT
2345
+ Migrating to CreateAdmins (20180109210452)
2346
+  (0.3ms) BEGIN
2347
+  (6.2ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2348
+  (1.8ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2349
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2350
+  (0.4ms) COMMIT
2351
+ Migrating to CreateAssignments (20180215214227)
2352
+  (0.2ms) BEGIN
2353
+  (6.4ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2354
+  (1.9ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2355
+  (1.7ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2356
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2357
+  (0.5ms) COMMIT
2358
+ Migrating to CreateSubmissions (20180216171618)
2359
+  (0.2ms) BEGIN
2360
+  (5.7ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2361
+  (1.9ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2362
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2363
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2364
+  (2.3ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2365
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2366
+  (0.4ms) COMMIT
2367
+ Migrating to CreateAccounts (20180220172559)
2368
+  (0.2ms) BEGIN
2369
+  (5.4ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2370
+  (1.8ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2371
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2372
+  (0.4ms) COMMIT
2373
+ Migrating to CreateAssignmentGroups (20180222163506)
2374
+  (0.2ms) BEGIN
2375
+  (5.0ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2376
+  (1.7ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2377
+  (2.0ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2378
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2379
+  (0.5ms) COMMIT
2380
+ Migrating to CreateContextModules (20180411215348)
2381
+  (0.2ms) BEGIN
2382
+  (6.0ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2383
+  (1.7ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2384
+  (1.8ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2385
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2386
+  (0.5ms) COMMIT
2387
+ Migrating to CreateContextModuleItems (20180411215633)
2388
+  (0.3ms) BEGIN
2389
+  (6.4ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2390
+  (2.0ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2391
+  (1.9ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2392
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2393
+  (0.4ms) COMMIT
2394
+ ActiveRecord::InternalMetadata Load (1.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2395
+  (0.1ms) BEGIN
2396
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-26 21:24:07.044038"], ["updated_at", "2018-04-26 21:24:07.044038"]]
2397
+  (0.5ms) COMMIT
2398
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
2399
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2400
+  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2401
+  (1.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2402
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2403
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2404
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2405
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2406
+  (211.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2407
+  (192.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2408
+  (38.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2409
+  (26.7ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2410
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
2411
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2412
+ Migrating to CreateEnrollments (20170905192509)
2413
+  (0.2ms) BEGIN
2414
+  (23.2ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2415
+  (7.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2416
+  (9.0ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2417
+  (7.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2418
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2419
+  (11.2ms) COMMIT
2420
+ Migrating to CreateTerms (20170906193506)
2421
+  (5.9ms) BEGIN
2422
+  (16.2ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2423
+  (7.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2424
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2425
+  (5.0ms) COMMIT
2426
+ Migrating to CreateCourses (20170914181345)
2427
+  (0.3ms) BEGIN
2428
+  (4.7ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2429
+  (1.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2430
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2431
+  (0.4ms) COMMIT
2432
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2433
+  (0.2ms) BEGIN
2434
+  (4.7ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2435
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2436
+  (0.4ms) COMMIT
2437
+ Migrating to CreateUsers (20170918221413)
2438
+  (0.3ms) BEGIN
2439
+  (6.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2440
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2441
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2442
+  (0.5ms) COMMIT
2443
+ Migrating to CreateSections (20171107213207)
2444
+  (0.3ms) BEGIN
2445
+  (5.2ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2446
+  (2.3ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2447
+  (1.8ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2448
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2449
+  (0.4ms) COMMIT
2450
+ Migrating to CreateRoles (20180103162102)
2451
+  (0.2ms) BEGIN
2452
+  (4.6ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2453
+  (2.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2454
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2455
+  (0.5ms) COMMIT
2456
+ Migrating to CreateAdmins (20180109210452)
2457
+  (0.3ms) BEGIN
2458
+  (5.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2459
+  (2.0ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2460
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2461
+  (0.4ms) COMMIT
2462
+ Migrating to CreateAssignments (20180215214227)
2463
+  (0.3ms) BEGIN
2464
+  (6.1ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2465
+  (2.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2466
+  (1.8ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2467
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2468
+  (0.4ms) COMMIT
2469
+ Migrating to CreateSubmissions (20180216171618)
2470
+  (0.2ms) BEGIN
2471
+  (6.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2472
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2473
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2474
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2475
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2476
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2477
+  (0.4ms) COMMIT
2478
+ Migrating to CreateAccounts (20180220172559)
2479
+  (0.2ms) BEGIN
2480
+  (5.2ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2481
+  (2.3ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2482
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2483
+  (0.5ms) COMMIT
2484
+ Migrating to CreateAssignmentGroups (20180222163506)
2485
+  (0.3ms) BEGIN
2486
+  (6.6ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2487
+  (2.2ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2488
+  (1.9ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2489
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2490
+  (0.4ms) COMMIT
2491
+ Migrating to CreateContextModules (20180411215348)
2492
+  (0.3ms) BEGIN
2493
+  (5.0ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2494
+  (1.6ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2495
+  (1.7ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2496
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2497
+  (0.4ms) COMMIT
2498
+ Migrating to CreateContextModuleItems (20180411215633)
2499
+  (0.3ms) BEGIN
2500
+  (5.6ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2501
+  (1.8ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2502
+  (2.4ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2503
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2504
+  (0.5ms) COMMIT
2505
+ ActiveRecord::InternalMetadata Load (1.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2506
+  (0.2ms) BEGIN
2507
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-26 21:24:49.196244"], ["updated_at", "2018-04-26 21:24:49.196244"]]
2508
+  (0.4ms) COMMIT
2509
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
2510
+  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2511
+  (3.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2512
+  (7.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2513
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2514
+  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2515
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2516
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2517
+  (217.0ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2518
+  (203.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2519
+  (27.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2520
+  (5.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2521
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
2522
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2523
+ Migrating to CreateEnrollments (20170905192509)
2524
+  (0.1ms) BEGIN
2525
+  (7.8ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2526
+  (2.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2527
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2528
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2529
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2530
+  (0.6ms) COMMIT
2531
+ Migrating to CreateTerms (20170906193506)
2532
+  (0.3ms) BEGIN
2533
+  (5.6ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2534
+  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2535
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2536
+  (0.4ms) COMMIT
2537
+ Migrating to CreateCourses (20170914181345)
2538
+  (0.2ms) BEGIN
2539
+  (6.0ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2540
+  (2.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2541
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2542
+  (0.4ms) COMMIT
2543
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2544
+  (0.2ms) BEGIN
2545
+  (6.7ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2546
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2547
+  (0.4ms) COMMIT
2548
+ Migrating to CreateUsers (20170918221413)
2549
+  (0.3ms) BEGIN
2550
+  (7.2ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2551
+  (2.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2552
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2553
+  (0.6ms) COMMIT
2554
+ Migrating to CreateSections (20171107213207)
2555
+  (0.3ms) BEGIN
2556
+  (6.0ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2557
+  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2558
+  (1.9ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2559
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2560
+  (0.5ms) COMMIT
2561
+ Migrating to CreateRoles (20180103162102)
2562
+  (0.2ms) BEGIN
2563
+  (5.7ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2564
+  (1.7ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2565
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2566
+  (0.4ms) COMMIT
2567
+ Migrating to CreateAdmins (20180109210452)
2568
+  (0.2ms) BEGIN
2569
+  (5.2ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2570
+  (2.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2571
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2572
+  (0.5ms) COMMIT
2573
+ Migrating to CreateAssignments (20180215214227)
2574
+  (0.3ms) BEGIN
2575
+  (6.3ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2576
+  (2.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2577
+  (1.8ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2578
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2579
+  (0.4ms) COMMIT
2580
+ Migrating to CreateSubmissions (20180216171618)
2581
+  (0.4ms) BEGIN
2582
+  (5.7ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2583
+  (2.0ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2584
+  (2.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2585
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2586
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2587
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2588
+  (0.5ms) COMMIT
2589
+ Migrating to CreateAccounts (20180220172559)
2590
+  (0.3ms) BEGIN
2591
+  (6.4ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2592
+  (2.0ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2593
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2594
+  (0.4ms) COMMIT
2595
+ Migrating to CreateAssignmentGroups (20180222163506)
2596
+  (0.2ms) BEGIN
2597
+  (5.5ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2598
+  (1.7ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2599
+  (1.7ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2600
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2601
+  (0.4ms) COMMIT
2602
+ Migrating to CreateContextModules (20180411215348)
2603
+  (0.3ms) BEGIN
2604
+  (5.5ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2605
+  (1.8ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2606
+  (2.3ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2607
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2608
+  (0.5ms) COMMIT
2609
+ Migrating to CreateContextModuleItems (20180411215633)
2610
+  (0.4ms) BEGIN
2611
+  (17.3ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2612
+  (7.6ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2613
+  (13.4ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2614
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2615
+  (9.8ms) COMMIT
2616
+ ActiveRecord::InternalMetadata Load (1.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2617
+  (0.2ms) BEGIN
2618
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-27 17:15:31.363229"], ["updated_at", "2018-04-27 17:15:31.363229"]]
2619
+  (5.8ms) COMMIT
2620
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
2621
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2622
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2623
+  (2.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2624
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2625
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2626
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2627
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2628
+  (209.4ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2629
+  (193.2ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2630
+  (21.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2631
+  (4.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2632
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
2633
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2634
+ Migrating to CreateEnrollments (20170905192509)
2635
+  (0.2ms) BEGIN
2636
+  (6.6ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2637
+  (2.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2638
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2639
+  (2.0ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2640
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2641
+  (0.5ms) COMMIT
2642
+ Migrating to CreateTerms (20170906193506)
2643
+  (0.2ms) BEGIN
2644
+  (5.4ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2645
+  (1.7ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2646
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2647
+  (0.4ms) COMMIT
2648
+ Migrating to CreateCourses (20170914181345)
2649
+  (0.2ms) BEGIN
2650
+  (5.2ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2651
+  (1.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2652
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2653
+  (0.5ms) COMMIT
2654
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2655
+  (0.2ms) BEGIN
2656
+  (5.3ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2657
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2658
+  (0.4ms) COMMIT
2659
+ Migrating to CreateUsers (20170918221413)
2660
+  (0.2ms) BEGIN
2661
+  (5.2ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2662
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2663
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2664
+  (0.4ms) COMMIT
2665
+ Migrating to CreateSections (20171107213207)
2666
+  (0.2ms) BEGIN
2667
+  (5.2ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2668
+  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2669
+  (1.8ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2670
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2671
+  (0.4ms) COMMIT
2672
+ Migrating to CreateRoles (20180103162102)
2673
+  (0.2ms) BEGIN
2674
+  (5.2ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2675
+  (1.6ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2676
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2677
+  (0.4ms) COMMIT
2678
+ Migrating to CreateAdmins (20180109210452)
2679
+  (0.2ms) BEGIN
2680
+  (6.1ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2681
+  (2.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2682
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2683
+  (0.5ms) COMMIT
2684
+ Migrating to CreateAssignments (20180215214227)
2685
+  (0.2ms) BEGIN
2686
+  (6.0ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2687
+  (1.8ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2688
+  (1.8ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2689
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2690
+  (0.4ms) COMMIT
2691
+ Migrating to CreateSubmissions (20180216171618)
2692
+  (0.2ms) BEGIN
2693
+  (5.2ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2694
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2695
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2696
+  (1.5ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2697
+  (1.6ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2698
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2699
+  (0.5ms) COMMIT
2700
+ Migrating to CreateAccounts (20180220172559)
2701
+  (0.2ms) BEGIN
2702
+  (6.4ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2703
+  (1.8ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2704
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2705
+  (0.4ms) COMMIT
2706
+ Migrating to CreateAssignmentGroups (20180222163506)
2707
+  (0.2ms) BEGIN
2708
+  (5.6ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2709
+  (1.9ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2710
+  (2.0ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2711
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2712
+  (0.4ms) COMMIT
2713
+ Migrating to CreateContextModules (20180411215348)
2714
+  (0.3ms) BEGIN
2715
+  (6.0ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2716
+  (1.8ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2717
+  (1.7ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2718
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2719
+  (0.4ms) COMMIT
2720
+ Migrating to CreateContextModuleItems (20180411215633)
2721
+  (0.2ms) BEGIN
2722
+  (5.4ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2723
+  (1.7ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2724
+  (1.7ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2725
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2726
+  (0.3ms) COMMIT
2727
+ ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2728
+  (0.2ms) BEGIN
2729
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-27 17:16:23.236349"], ["updated_at", "2018-04-27 17:16:23.236349"]]
2730
+  (0.5ms) COMMIT
2731
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
2732
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2733
+  (6.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2734
+  (13.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2735
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2736
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2737
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2738
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2739
+  (205.3ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2740
+  (213.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2741
+  (20.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2742
+  (5.4ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2743
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
2744
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2745
+ Migrating to CreateEnrollments (20170905192509)
2746
+  (0.2ms) BEGIN
2747
+  (7.0ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2748
+  (1.8ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2749
+  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2750
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2751
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2752
+  (0.4ms) COMMIT
2753
+ Migrating to CreateTerms (20170906193506)
2754
+  (0.2ms) BEGIN
2755
+  (4.6ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2756
+  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2757
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2758
+  (0.4ms) COMMIT
2759
+ Migrating to CreateCourses (20170914181345)
2760
+  (0.2ms) BEGIN
2761
+  (4.2ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2762
+  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2763
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2764
+  (1.0ms) COMMIT
2765
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2766
+  (6.0ms) BEGIN
2767
+  (44.3ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2768
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2769
+  (0.5ms) COMMIT
2770
+ Migrating to CreateUsers (20170918221413)
2771
+  (0.3ms) BEGIN
2772
+  (5.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2773
+  (1.7ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2774
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2775
+  (1.2ms) COMMIT
2776
+ Migrating to CreateSections (20171107213207)
2777
+  (0.2ms) BEGIN
2778
+  (5.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2779
+  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2780
+  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2781
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2782
+  (0.4ms) COMMIT
2783
+ Migrating to CreateRoles (20180103162102)
2784
+  (0.2ms) BEGIN
2785
+  (5.3ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2786
+  (1.6ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2787
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2788
+  (0.4ms) COMMIT
2789
+ Migrating to CreateAdmins (20180109210452)
2790
+  (0.2ms) BEGIN
2791
+  (4.9ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2792
+  (1.6ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2793
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2794
+  (0.4ms) COMMIT
2795
+ Migrating to CreateAssignments (20180215214227)
2796
+  (0.2ms) BEGIN
2797
+  (5.2ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2798
+  (2.0ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2799
+  (1.7ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2800
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2801
+  (0.4ms) COMMIT
2802
+ Migrating to CreateSubmissions (20180216171618)
2803
+  (0.3ms) BEGIN
2804
+  (6.0ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2805
+  (2.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2806
+  (2.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2807
+  (2.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2808
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2809
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2810
+  (0.6ms) COMMIT
2811
+ Migrating to CreateAccounts (20180220172559)
2812
+  (0.2ms) BEGIN
2813
+  (5.0ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2814
+  (1.7ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2815
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2816
+  (0.4ms) COMMIT
2817
+ Migrating to CreateAssignmentGroups (20180222163506)
2818
+  (0.2ms) BEGIN
2819
+  (4.7ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2820
+  (1.6ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2821
+  (2.0ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2822
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2823
+  (0.4ms) COMMIT
2824
+ Migrating to CreateContextModules (20180411215348)
2825
+  (0.2ms) BEGIN
2826
+  (5.0ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2827
+  (1.7ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2828
+  (1.6ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2829
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2830
+  (0.5ms) COMMIT
2831
+ Migrating to CreateContextModuleItems (20180411215633)
2832
+  (0.2ms) BEGIN
2833
+  (4.9ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2834
+  (1.5ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2835
+  (1.7ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2836
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2837
+  (0.4ms) COMMIT
2838
+ ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2839
+  (0.1ms) BEGIN
2840
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-05-02 16:24:16.397078"], ["updated_at", "2018-05-02 16:24:16.397078"]]
2841
+  (0.5ms) COMMIT
2842
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
2843
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC