canvas_sync 0.4.1 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/canvas_sync.rb +1 -0
  3. data/lib/canvas_sync/generators/templates/models/context_module_item.rb +2 -2
  4. data/lib/canvas_sync/generators/templates/models/create_context_module_items.rb +1 -0
  5. data/lib/canvas_sync/generators/templates/models/create_users.rb +2 -0
  6. data/lib/canvas_sync/generators/templates/services/live_events/course/course_event.rb +1 -1
  7. data/lib/canvas_sync/generators/templates/services/live_events/course_section/course_section_created_event.rb +6 -0
  8. data/lib/canvas_sync/generators/templates/services/live_events/course_section/course_section_event.rb +48 -0
  9. data/lib/canvas_sync/generators/templates/services/live_events/course_section/course_section_updated_event.rb +6 -0
  10. data/lib/canvas_sync/generators/templates/services/live_events/user/user_created_event.rb +1 -1
  11. data/lib/canvas_sync/generators/templates/services/live_events/user/user_event.rb +25 -23
  12. data/lib/canvas_sync/processors/model_mappings.yml +9 -0
  13. data/lib/canvas_sync/version.rb +1 -1
  14. data/spec/dummy/app/models/context_module_item.rb +2 -2
  15. data/spec/dummy/app/services/live_events/course_event.rb +1 -1
  16. data/spec/dummy/app/services/live_events/course_section_created_event.rb +12 -0
  17. data/spec/dummy/app/services/live_events/course_section_event.rb +54 -0
  18. data/spec/dummy/app/services/live_events/course_section_updated_event.rb +12 -0
  19. data/spec/dummy/app/services/live_events/user_created_event.rb +1 -1
  20. data/spec/dummy/app/services/live_events/user_event.rb +25 -23
  21. data/spec/dummy/db/migrate/{20170918221413_create_users.rb → 20180509194201_create_users.rb} +2 -0
  22. data/spec/dummy/db/migrate/{20180411215633_create_context_module_items.rb → 20180605172338_create_context_module_items.rb} +1 -0
  23. data/spec/dummy/db/schema.rb +4 -1
  24. data/spec/dummy/log/development.log +777 -0
  25. data/spec/dummy/log/test.log +2358 -0
  26. data/spec/support/fixtures/reports/context_module_items.csv +3 -3
  27. metadata +15 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 911d67b330dfd137deb4a5bc9dc87ae99efcd2f4906d27925044985299d405ff
4
- data.tar.gz: e7ae278ea03a7cb0ef557af6b71f778b2754d0975e555c09894627b57c955c6f
3
+ metadata.gz: 4a82591fda24f7e0687a9715244bb6d91ef5bf1ddc2c17d8acf7b991b1fab03a
4
+ data.tar.gz: 405503169a3f899f7186cf13733941769e4f888e0b33568a11213bb2cffcecf0
5
5
  SHA512:
6
- metadata.gz: c3dc580b3581a1549b85816f46eaca388abbd2cb5ca7db44bc1fb96fc2d453ace537beb7d8ac31ad53b0ef8ac365b45f4a1eeed0772791ef6d957087c5367ee6
7
- data.tar.gz: e5785c8363ab10efafd1eee7798e1a5869067c65a998000cdac16418c194e50fca56e843f37c33449e456a80171d1f78ef6891377c66f53a188f4ecbbf63cd22
6
+ metadata.gz: 1ba3e405ad320537f29814933fb862f02999c0f106d04fa3cf07989a0cac32872c3d1ad0282203d39b077c62497dc8fad509dd6e30145f10a46a75bb604e2773
7
+ data.tar.gz: ba5a41419346b464bb2fe71997ce2cee4566a60152993b63d732895b4af134768e8c555bbabc1a290be4feecacd54aa72178f0b3c1c11eca53f43d862aea6234
data/lib/canvas_sync.rb CHANGED
@@ -47,6 +47,7 @@ module CanvasSync
47
47
  grade
48
48
  module
49
49
  module_item
50
+ course_section
50
51
  ].freeze
51
52
 
52
53
  # Runs a standard provisioning sync job with no extra report types.
@@ -1,6 +1,6 @@
1
- <%= autogenerated_migration_warning %>
1
+ # <%= autogenerated_migration_warning %>
2
2
 
3
3
  class ContextModuleItem < ApplicationRecord
4
4
  belongs_to :context_module, primary_key: :canvas_context_module_id, foreign_key: :canvas_context_module_id, optional: true
5
- belongs_to :assignment, foreign_key: :content_id, primary_key: :canvas_assignment_id
5
+ belongs_to :assignment, foreign_key: :canvas_assignment_id, primary_key: :canvas_assignment_id
6
6
  end
@@ -8,6 +8,7 @@ class CreateContextModuleItems < ActiveRecord::Migration[5.1]
8
8
  t.integer :position
9
9
  t.string :content_type
10
10
  t.bigint :content_id
11
+ t.bigint :canvas_assignment_id
11
12
  t.string :workflow_state
12
13
 
13
14
  t.timestamps
@@ -10,6 +10,8 @@ class CreateUsers < ActiveRecord::Migration[5.1]
10
10
  t.string :last_name
11
11
  t.string :status
12
12
  t.string :login_id
13
+ t.string :full_name
14
+ t.string :sortable_name
13
15
 
14
16
  t.timestamps
15
17
  end
@@ -27,7 +27,7 @@ module LiveEvents
27
27
  private
28
28
 
29
29
  def create_or_update(attrs)
30
- course = Course.where(canva_course_id: attrs[:canva_course_id]).first_or_initialize
30
+ course = Course.where(canvas_course_id: attrs[:canvas_course_id]).first_or_initialize
31
31
  course.assign_attributes(attrs)
32
32
  course.save!
33
33
  course
@@ -0,0 +1,6 @@
1
+ # <%= autogenerated_event_warning %>
2
+
3
+ module LiveEvents
4
+ class CourseSectionCreatedEvent < LiveEvents::CourseSectionEvent
5
+ end
6
+ end
@@ -0,0 +1,48 @@
1
+ # <%= autogenerated_event_warning %>
2
+
3
+ module LiveEvents
4
+ class CourseSectionEvent < LiveEvents::BaseEvent
5
+ # The following is provided in the live events call:
6
+ # {
7
+ # course_section_id: section.id,
8
+ # sis_source_id: section.sis_source_id,
9
+ # sis_batch_id: section.sis_batch_id,
10
+ # course_id: section.course_id,
11
+ # root_account_id: section.root_account_id,
12
+ # enrollment_term_id: section.enrollment_term_id,
13
+ # name: section.name,
14
+ # default_section: section.default_section,
15
+ # accepting_enrollments: section.accepting_enrollments,
16
+ # can_manually_enroll: section.can_manually_enroll,
17
+ # start_at: section.start_at,
18
+ # end_at: section.end_at,
19
+ # workflow_state: section.workflow_state,
20
+ # restrict_enrollments_to_section_dates: section.restrict_enrollments_to_section_dates,
21
+ # nonxlist_course_id: section.nonxlist_course_id,
22
+ # stuck_sis_fields: section.stuck_sis_fields,
23
+ # integration_id: section.integration_id
24
+ # }
25
+
26
+ def perform(_event_payload)
27
+ super
28
+ attrs = {
29
+ canvas_section_id: local_canvas_id(payload[:course_section_id]),
30
+ canvas_course_id: local_canvas_id(payload[:course_id]),
31
+ name: payload[:name],
32
+ status: payload[:workflow_state],
33
+ start_date: payload[:start_at],
34
+ end_date: payload[:end_at],
35
+ canvas_nonxlist_course_id: payload[:nonxlist_course_id],
36
+ }
37
+ create_or_update(attrs)
38
+ end
39
+
40
+ private
41
+
42
+ def create_or_update(attrs)
43
+ section = Section.where(canvas_section_id: attrs[:canvas_section_id]).first_or_initialize
44
+ section.assign_attributes(attrs)
45
+ section.save!
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,6 @@
1
+ # <%= autogenerated_event_warning %>
2
+
3
+ module LiveEvents
4
+ class CourseSectionUpdatedEvent < LiveEvents::CourseSectionEvent
5
+ end
6
+ end
@@ -1,6 +1,6 @@
1
1
  # <%= autogenerated_event_warning %>
2
2
 
3
3
  module LiveEvents
4
- class UserChangedEvent < LiveEvents::UserEvent
4
+ class UserCreatedEvent < LiveEvents::UserEvent
5
5
  end
6
6
  end
@@ -2,31 +2,33 @@
2
2
 
3
3
  module LiveEvents
4
4
  class UserEvent < LiveEvents::BaseEvent
5
- # The following is provided in the live events call:
6
- # {
7
- # user_id: user.global_id,
8
- # uuid: user.uuid,
9
- # name: user.name,
10
- # short_name: user.short_name,
11
- # workflow_state: user.workflow_state,
12
- # created_at: user.created_at,
13
- # updated_at: user.updated_at
14
- # }
5
+ # The following is provided in the live events call:
6
+ # {
7
+ # user_id: user.global_id,
8
+ # uuid: user.uuid,
9
+ # name: user.name,
10
+ # short_name: user.short_name,
11
+ # workflow_state: user.workflow_state,
12
+ # created_at: user.created_at,
13
+ # updated_at: user.updated_at
14
+ # }
15
15
 
16
- def perform(event_payload)
17
- super
18
- attrs = {
19
- canvas_user_id: local_canvas_id(payload[:user_id]),
20
- status: payload[:workflow_state],
21
- }
22
- create_or_update(attrs)
23
- end
16
+ def perform(event_payload)
17
+ super
18
+ attrs = {
19
+ canvas_user_id: local_canvas_id(payload[:user_id]),
20
+ full_name: payload[:name],
21
+ status: payload[:workflow_state],
22
+ }
23
+ create_or_update(attrs)
24
+ end
24
25
 
25
- private
26
+ private
26
27
 
27
- def create_or_update(attrs)
28
- user = User.where(canvas_user_id: attrs[:canvas_user_id]).first_or_initialize
29
- user.assign_attributes(attrs)
30
- user.save!
28
+ def create_or_update(attrs)
29
+ user = User.where(canvas_user_id: attrs[:canvas_user_id]).first_or_initialize
30
+ user.assign_attributes(attrs)
31
+ user.save!
32
+ end
31
33
  end
32
34
  end
@@ -16,6 +16,12 @@ users:
16
16
  last_name:
17
17
  database_column_name: last_name
18
18
  type: string
19
+ full_name:
20
+ database_column_name: full_name
21
+ type: string
22
+ sortable_name:
23
+ database_column_name: sortable_name
24
+ type: string
19
25
  status:
20
26
  database_column_name: status
21
27
  type: string
@@ -320,3 +326,6 @@ context_module_items:
320
326
  workflow_state:
321
327
  database_column_name: workflow_state
322
328
  type: string
329
+ assignment_id:
330
+ database_column_name: canvas_assignment_id
331
+ type: integer
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.4.1".freeze
2
+ VERSION = "0.5.1".freeze
3
3
  end
@@ -1,4 +1,4 @@
1
- #
1
+ # #
2
2
  # AUTO GENERATED MIGRATION
3
3
  # This migration was auto generated by the CanvasSync Gem.
4
4
  # You can add new columns to this table, but removing or
@@ -8,5 +8,5 @@
8
8
 
9
9
  class ContextModuleItem < ApplicationRecord
10
10
  belongs_to :context_module, primary_key: :canvas_context_module_id, foreign_key: :canvas_context_module_id, optional: true
11
- belongs_to :assignment, foreign_key: :content_id, primary_key: :canvas_assignment_id
11
+ belongs_to :assignment, foreign_key: :canvas_assignment_id, primary_key: :canvas_assignment_id
12
12
  end
@@ -33,7 +33,7 @@ module LiveEvents
33
33
  private
34
34
 
35
35
  def create_or_update(attrs)
36
- course = Course.where(canva_course_id: attrs[:canva_course_id]).first_or_initialize
36
+ course = Course.where(canvas_course_id: attrs[:canvas_course_id]).first_or_initialize
37
37
  course.assign_attributes(attrs)
38
38
  course.save!
39
39
  course
@@ -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 CourseSectionCreatedEvent < LiveEvents::CourseSectionEvent
11
+ end
12
+ end
@@ -0,0 +1,54 @@
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 CourseSectionEvent < LiveEvents::BaseEvent
11
+ # The following is provided in the live events call:
12
+ # {
13
+ # course_section_id: section.id,
14
+ # sis_source_id: section.sis_source_id,
15
+ # sis_batch_id: section.sis_batch_id,
16
+ # course_id: section.course_id,
17
+ # root_account_id: section.root_account_id,
18
+ # enrollment_term_id: section.enrollment_term_id,
19
+ # name: section.name,
20
+ # default_section: section.default_section,
21
+ # accepting_enrollments: section.accepting_enrollments,
22
+ # can_manually_enroll: section.can_manually_enroll,
23
+ # start_at: section.start_at,
24
+ # end_at: section.end_at,
25
+ # workflow_state: section.workflow_state,
26
+ # restrict_enrollments_to_section_dates: section.restrict_enrollments_to_section_dates,
27
+ # nonxlist_course_id: section.nonxlist_course_id,
28
+ # stuck_sis_fields: section.stuck_sis_fields,
29
+ # integration_id: section.integration_id
30
+ # }
31
+
32
+ def perform(_event_payload)
33
+ super
34
+ attrs = {
35
+ canvas_section_id: local_canvas_id(payload[:course_section_id]),
36
+ canvas_course_id: local_canvas_id(payload[:course_id]),
37
+ name: payload[:name],
38
+ status: payload[:workflow_state],
39
+ start_date: payload[:start_at],
40
+ end_date: payload[:end_at],
41
+ canvas_nonxlist_course_id: payload[:nonxlist_course_id],
42
+ }
43
+ create_or_update(attrs)
44
+ end
45
+
46
+ private
47
+
48
+ def create_or_update(attrs)
49
+ section = Section.where(canvas_section_id: attrs[:canvas_section_id]).first_or_initialize
50
+ section.assign_attributes(attrs)
51
+ section.save!
52
+ end
53
+ end
54
+ 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 CourseSectionUpdatedEvent < LiveEvents::CourseSectionEvent
11
+ end
12
+ end
@@ -7,6 +7,6 @@
7
7
 
8
8
 
9
9
  module LiveEvents
10
- class UserChangedEvent < LiveEvents::UserEvent
10
+ class UserCreatedEvent < LiveEvents::UserEvent
11
11
  end
12
12
  end
@@ -8,31 +8,33 @@
8
8
 
9
9
  module LiveEvents
10
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
- # }
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
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
22
+ def perform(event_payload)
23
+ super
24
+ attrs = {
25
+ canvas_user_id: local_canvas_id(payload[:user_id]),
26
+ full_name: payload[:name],
27
+ status: payload[:workflow_state],
28
+ }
29
+ create_or_update(attrs)
30
+ end
30
31
 
31
- private
32
+ private
32
33
 
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!
34
+ def create_or_update(attrs)
35
+ user = User.where(canvas_user_id: attrs[:canvas_user_id]).first_or_initialize
36
+ user.assign_attributes(attrs)
37
+ user.save!
38
+ end
37
39
  end
38
40
  end
@@ -16,6 +16,8 @@ class CreateUsers < ActiveRecord::Migration[5.1]
16
16
  t.string :last_name
17
17
  t.string :status
18
18
  t.string :login_id
19
+ t.string :full_name
20
+ t.string :sortable_name
19
21
 
20
22
  t.timestamps
21
23
  end
@@ -14,6 +14,7 @@ class CreateContextModuleItems < ActiveRecord::Migration[5.1]
14
14
  t.integer :position
15
15
  t.string :content_type
16
16
  t.bigint :content_id
17
+ t.bigint :canvas_assignment_id
17
18
  t.string :workflow_state
18
19
 
19
20
  t.timestamps
@@ -10,7 +10,7 @@
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: 20180411215633) do
13
+ ActiveRecord::Schema.define(version: 20180605172338) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -99,6 +99,7 @@ ActiveRecord::Schema.define(version: 20180411215633) do
99
99
  t.integer "position"
100
100
  t.string "content_type"
101
101
  t.bigint "content_id"
102
+ t.bigint "canvas_assignment_id"
102
103
  t.string "workflow_state"
103
104
  t.datetime "created_at", null: false
104
105
  t.datetime "updated_at", null: false
@@ -223,6 +224,8 @@ ActiveRecord::Schema.define(version: 20180411215633) do
223
224
  t.string "last_name"
224
225
  t.string "status"
225
226
  t.string "login_id"
227
+ t.string "full_name"
228
+ t.string "sortable_name"
226
229
  t.datetime "created_at", null: false
227
230
  t.datetime "updated_at", null: false
228
231
  t.index ["canvas_user_id"], name: "index_users_on_canvas_user_id", unique: true
@@ -3285,3 +3285,780 @@ Migrating to CreateContextModuleItems (20180411215633)
3285
3285
   (0.3ms) COMMIT
3286
3286
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
3287
3287
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3288
+  (5.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3289
+  (14.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3290
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3291
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3292
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3293
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3294
+  (235.0ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3295
+  (174.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3296
+  (157.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3297
+  (3.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)
3298
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
3299
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3300
+ Migrating to CreateEnrollments (20170905192509)
3301
+  (0.1ms) BEGIN
3302
+  (26.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)
3303
+  (1.4ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3304
+  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3305
+  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3306
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3307
+  (0.4ms) COMMIT
3308
+ Migrating to CreateTerms (20170906193506)
3309
+  (5.9ms) BEGIN
3310
+  (17.9ms) 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)
3311
+  (2.6ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3312
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3313
+  (1.0ms) COMMIT
3314
+ Migrating to CreateCourses (20170914181345)
3315
+  (6.4ms) BEGIN
3316
+  (18.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)
3317
+  (1.9ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3318
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3319
+  (0.4ms) COMMIT
3320
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3321
+  (0.2ms) BEGIN
3322
+  (5.1ms) 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)
3323
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3324
+  (0.4ms) COMMIT
3325
+ Migrating to CreateSections (20171107213207)
3326
+  (11.3ms) BEGIN
3327
+  (17.7ms) 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)
3328
+  (2.2ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3329
+  (2.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3330
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3331
+  (0.4ms) COMMIT
3332
+ Migrating to CreateRoles (20180103162102)
3333
+  (6.1ms) BEGIN
3334
+  (17.0ms) 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)
3335
+  (2.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
3336
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
3337
+  (0.5ms) COMMIT
3338
+ Migrating to CreateAdmins (20180109210452)
3339
+  (10.1ms) BEGIN
3340
+  (40.0ms) 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)
3341
+  (2.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
3342
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
3343
+  (0.5ms) COMMIT
3344
+ Migrating to CreateAssignments (20180215214227)
3345
+  (5.7ms) BEGIN
3346
+  (18.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)
3347
+  (1.7ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
3348
+  (1.8ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
3349
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
3350
+  (0.5ms) COMMIT
3351
+ Migrating to CreateSubmissions (20180216171618)
3352
+  (6.0ms) BEGIN
3353
+  (23.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)
3354
+  (1.9ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
3355
+  (1.5ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
3356
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
3357
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
3358
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
3359
+  (0.5ms) COMMIT
3360
+ Migrating to CreateAccounts (20180220172559)
3361
+  (5.8ms) BEGIN
3362
+  (23.3ms) 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)
3363
+  (2.3ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
3364
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
3365
+  (0.5ms) COMMIT
3366
+ Migrating to CreateAssignmentGroups (20180222163506)
3367
+  (10.8ms) BEGIN
3368
+  (18.1ms) 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)
3369
+  (1.7ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
3370
+  (1.6ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
3371
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
3372
+  (0.5ms) COMMIT
3373
+ Migrating to CreateContextModules (20180411215348)
3374
+  (6.0ms) BEGIN
3375
+  (22.3ms) 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)
3376
+  (2.1ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
3377
+  (1.9ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
3378
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
3379
+  (0.4ms) COMMIT
3380
+ Migrating to CreateContextModuleItems (20180411215633)
3381
+  (11.8ms) BEGIN
3382
+  (16.7ms) 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)
3383
+  (1.7ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
3384
+  (1.9ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
3385
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
3386
+  (0.4ms) COMMIT
3387
+ Migrating to CreateUsers (20180509194201)
3388
+  (6.1ms) BEGIN
3389
+  (47.0ms) 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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
3390
+  (2.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3391
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
3392
+  (0.5ms) COMMIT
3393
+ ActiveRecord::InternalMetadata Load (1.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
3394
+  (0.1ms) BEGIN
3395
+ 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-05-09 19:42:23.235418"], ["updated_at", "2018-05-09 19:42:23.235418"]]
3396
+  (0.4ms) COMMIT
3397
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
3398
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3399
+  (7.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3400
+  (7.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3401
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3402
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3403
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3404
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3405
+  (203.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3406
+  (198.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3407
+  (26.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3408
+  (4.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)
3409
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
3410
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3411
+ Migrating to CreateEnrollments (20170905192509)
3412
+  (0.1ms) BEGIN
3413
+  (18.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)
3414
+  (2.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3415
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3416
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3417
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3418
+  (0.6ms) COMMIT
3419
+ Migrating to CreateTerms (20170906193506)
3420
+  (0.3ms) BEGIN
3421
+  (7.0ms) 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)
3422
+  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3423
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3424
+  (0.5ms) COMMIT
3425
+ Migrating to CreateCourses (20170914181345)
3426
+  (0.2ms) BEGIN
3427
+  (6.1ms) 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)
3428
+  (2.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3429
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3430
+  (0.5ms) COMMIT
3431
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3432
+  (6.1ms) BEGIN
3433
+  (18.9ms) 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)
3434
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3435
+  (0.6ms) COMMIT
3436
+ Migrating to CreateSections (20171107213207)
3437
+  (0.3ms) BEGIN
3438
+  (7.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)
3439
+  (2.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3440
+  (2.0ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3441
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3442
+  (0.5ms) COMMIT
3443
+ Migrating to CreateRoles (20180103162102)
3444
+  (0.2ms) BEGIN
3445
+  (5.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)
3446
+  (1.9ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
3447
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
3448
+  (0.4ms) COMMIT
3449
+ Migrating to CreateAdmins (20180109210452)
3450
+  (0.2ms) BEGIN
3451
+  (5.6ms) 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)
3452
+  (1.8ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
3453
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
3454
+  (0.4ms) COMMIT
3455
+ Migrating to CreateAssignments (20180215214227)
3456
+  (0.3ms) BEGIN
3457
+  (5.5ms) 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)
3458
+  (2.0ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
3459
+  (2.8ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
3460
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
3461
+  (0.5ms) COMMIT
3462
+ Migrating to CreateSubmissions (20180216171618)
3463
+  (0.2ms) BEGIN
3464
+  (5.6ms) 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)
3465
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
3466
+  (1.4ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
3467
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
3468
+  (1.6ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
3469
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
3470
+  (0.4ms) COMMIT
3471
+ Migrating to CreateAccounts (20180220172559)
3472
+  (0.2ms) BEGIN
3473
+  (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)
3474
+  (1.8ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
3475
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
3476
+  (0.4ms) COMMIT
3477
+ Migrating to CreateAssignmentGroups (20180222163506)
3478
+  (0.3ms) BEGIN
3479
+  (5.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)
3480
+  (1.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
3481
+  (1.7ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
3482
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
3483
+  (0.5ms) COMMIT
3484
+ Migrating to CreateContextModules (20180411215348)
3485
+  (0.2ms) BEGIN
3486
+  (5.6ms) 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)
3487
+  (1.8ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
3488
+  (1.6ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
3489
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
3490
+  (0.4ms) COMMIT
3491
+ Migrating to CreateContextModuleItems (20180411215633)
3492
+  (0.2ms) BEGIN
3493
+  (6.5ms) 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)
3494
+  (2.0ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
3495
+  (1.8ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
3496
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
3497
+  (0.4ms) COMMIT
3498
+ Migrating to CreateUsers (20180509194201)
3499
+  (0.2ms) BEGIN
3500
+  (5.3ms) 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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
3501
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3502
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
3503
+  (0.4ms) COMMIT
3504
+ ActiveRecord::InternalMetadata Load (2.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
3505
+  (0.2ms) BEGIN
3506
+ 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-09 19:47:48.559079"], ["updated_at", "2018-05-09 19:47:48.559079"]]
3507
+  (0.5ms) COMMIT
3508
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
3509
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3510
+  (2.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3511
+  (8.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3512
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3513
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3514
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3515
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3516
+  (336.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3517
+  (137.6ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3518
+  (23.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3519
+  (5.8ms) 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)
3520
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
3521
+  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3522
+ Migrating to CreateEnrollments (20170905192509)
3523
+  (0.2ms) BEGIN
3524
+  (18.4ms) 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)
3525
+  (1.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3526
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3527
+  (1.9ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3528
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3529
+  (0.5ms) COMMIT
3530
+ Migrating to CreateTerms (20170906193506)
3531
+  (0.2ms) BEGIN
3532
+  (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)
3533
+  (1.7ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3534
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3535
+  (0.3ms) COMMIT
3536
+ Migrating to CreateCourses (20170914181345)
3537
+  (0.3ms) BEGIN
3538
+  (5.8ms) 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)
3539
+  (2.0ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3540
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3541
+  (0.5ms) COMMIT
3542
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3543
+  (5.9ms) BEGIN
3544
+  (22.9ms) 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)
3545
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3546
+  (0.6ms) COMMIT
3547
+ Migrating to CreateSections (20171107213207)
3548
+  (0.3ms) BEGIN
3549
+  (7.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)
3550
+  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3551
+  (2.0ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3552
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3553
+  (0.4ms) COMMIT
3554
+ Migrating to CreateRoles (20180103162102)
3555
+  (0.3ms) BEGIN
3556
+  (5.9ms) 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)
3557
+  (1.9ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
3558
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
3559
+  (0.5ms) COMMIT
3560
+ Migrating to CreateAdmins (20180109210452)
3561
+  (0.2ms) BEGIN
3562
+  (6.6ms) 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)
3563
+  (2.0ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
3564
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
3565
+  (0.5ms) COMMIT
3566
+ Migrating to CreateAssignments (20180215214227)
3567
+  (0.3ms) BEGIN
3568
+  (6.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)
3569
+  (2.1ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
3570
+  (2.7ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
3571
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
3572
+  (0.5ms) COMMIT
3573
+ Migrating to CreateSubmissions (20180216171618)
3574
+  (0.2ms) BEGIN
3575
+  (5.8ms) 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)
3576
+  (1.9ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
3577
+  (7.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
3578
+  (8.5ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
3579
+  (8.3ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
3580
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
3581
+  (0.6ms) COMMIT
3582
+ Migrating to CreateAccounts (20180220172559)
3583
+  (0.2ms) BEGIN
3584
+  (7.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)
3585
+  (2.0ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
3586
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
3587
+  (0.4ms) COMMIT
3588
+ Migrating to CreateAssignmentGroups (20180222163506)
3589
+  (0.2ms) BEGIN
3590
+  (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)
3591
+  (1.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
3592
+  (1.6ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
3593
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
3594
+  (0.3ms) COMMIT
3595
+ Migrating to CreateContextModules (20180411215348)
3596
+  (0.3ms) BEGIN
3597
+  (7.6ms) 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)
3598
+  (1.9ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
3599
+  (2.1ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
3600
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
3601
+  (0.6ms) COMMIT
3602
+ Migrating to CreateContextModuleItems (20180411215633)
3603
+  (0.2ms) BEGIN
3604
+  (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)
3605
+  (1.9ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
3606
+  (2.1ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
3607
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
3608
+  (0.5ms) COMMIT
3609
+ Migrating to CreateUsers (20180509194201)
3610
+  (0.3ms) BEGIN
3611
+  (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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
3612
+  (2.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3613
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
3614
+  (0.4ms) COMMIT
3615
+ ActiveRecord::InternalMetadata Load (1.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
3616
+  (0.2ms) BEGIN
3617
+ 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-05-09 20:00:06.309383"], ["updated_at", "2018-05-09 20:00:06.309383"]]
3618
+  (0.5ms) COMMIT
3619
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
3620
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3621
+  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3622
+  (1.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3623
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3624
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3625
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3626
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3627
+  (205.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3628
+  (207.0ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3629
+  (24.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3630
+  (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)
3631
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
3632
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3633
+ Migrating to CreateEnrollments (20170905192509)
3634
+  (0.1ms) BEGIN
3635
+  (6.9ms) 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)
3636
+  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3637
+  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3638
+  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3639
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3640
+  (0.4ms) COMMIT
3641
+ Migrating to CreateTerms (20170906193506)
3642
+  (0.2ms) BEGIN
3643
+  (5.5ms) 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)
3644
+  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3645
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3646
+  (0.4ms) COMMIT
3647
+ Migrating to CreateCourses (20170914181345)
3648
+  (0.2ms) BEGIN
3649
+  (5.8ms) 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)
3650
+  (2.2ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3651
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3652
+  (0.4ms) COMMIT
3653
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3654
+  (0.2ms) BEGIN
3655
+  (4.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)
3656
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3657
+  (0.4ms) COMMIT
3658
+ Migrating to CreateSections (20171107213207)
3659
+  (0.2ms) BEGIN
3660
+  (5.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)
3661
+  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3662
+  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3663
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3664
+  (0.4ms) COMMIT
3665
+ Migrating to CreateRoles (20180103162102)
3666
+  (0.2ms) BEGIN
3667
+  (4.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)
3668
+  (1.5ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
3669
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
3670
+  (0.4ms) COMMIT
3671
+ Migrating to CreateAdmins (20180109210452)
3672
+  (0.2ms) BEGIN
3673
+  (4.7ms) 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)
3674
+  (1.7ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
3675
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
3676
+  (0.4ms) COMMIT
3677
+ Migrating to CreateAssignments (20180215214227)
3678
+  (0.3ms) BEGIN
3679
+  (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)
3680
+  (1.9ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
3681
+  (1.6ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
3682
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
3683
+  (0.4ms) COMMIT
3684
+ Migrating to CreateSubmissions (20180216171618)
3685
+  (0.2ms) BEGIN
3686
+  (5.4ms) 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)
3687
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
3688
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
3689
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
3690
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
3691
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
3692
+  (0.4ms) COMMIT
3693
+ Migrating to CreateAccounts (20180220172559)
3694
+  (0.2ms) BEGIN
3695
+  (4.8ms) 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)
3696
+  (1.5ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
3697
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
3698
+  (0.4ms) COMMIT
3699
+ Migrating to CreateAssignmentGroups (20180222163506)
3700
+  (0.2ms) BEGIN
3701
+  (5.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)
3702
+  (1.6ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
3703
+  (1.5ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
3704
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
3705
+  (0.4ms) COMMIT
3706
+ Migrating to CreateContextModules (20180411215348)
3707
+  (0.3ms) BEGIN
3708
+  (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)
3709
+  (1.5ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
3710
+  (2.1ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
3711
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
3712
+  (0.3ms) COMMIT
3713
+ Migrating to CreateContextModuleItems (20180411215633)
3714
+  (0.2ms) BEGIN
3715
+  (5.0ms) 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)
3716
+  (1.7ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
3717
+  (1.6ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
3718
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
3719
+  (0.4ms) COMMIT
3720
+ Migrating to CreateUsers (20180509194201)
3721
+  (0.2ms) BEGIN
3722
+  (5.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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
3723
+  (2.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3724
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
3725
+  (0.5ms) COMMIT
3726
+ ActiveRecord::InternalMetadata Load (2.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
3727
+  (0.2ms) BEGIN
3728
+ 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-05-09 20:00:56.923493"], ["updated_at", "2018-05-09 20:00:56.923493"]]
3729
+  (0.4ms) COMMIT
3730
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
3731
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3732
+  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3733
+  (0.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3734
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3735
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3736
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3737
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3738
+  (202.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3739
+  (156.6ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3740
+  (26.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3741
+  (5.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)
3742
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
3743
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3744
+ Migrating to CreateEnrollments (20170905192509)
3745
+  (0.2ms) BEGIN
3746
+  (19.7ms) 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)
3747
+  (2.4ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3748
+  (2.0ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3749
+  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3750
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3751
+  (0.4ms) COMMIT
3752
+ Migrating to CreateTerms (20170906193506)
3753
+  (0.3ms) BEGIN
3754
+  (5.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)
3755
+  (1.7ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3756
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3757
+  (0.5ms) COMMIT
3758
+ Migrating to CreateCourses (20170914181345)
3759
+  (0.2ms) BEGIN
3760
+  (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)
3761
+  (1.8ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3762
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3763
+  (0.3ms) COMMIT
3764
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3765
+  (5.9ms) BEGIN
3766
+  (19.5ms) 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)
3767
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3768
+  (0.6ms) COMMIT
3769
+ Migrating to CreateSections (20171107213207)
3770
+  (0.2ms) BEGIN
3771
+  (6.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)
3772
+  (2.0ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3773
+  (2.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3774
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3775
+  (0.5ms) COMMIT
3776
+ Migrating to CreateRoles (20180103162102)
3777
+  (0.2ms) BEGIN
3778
+  (6.1ms) 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)
3779
+  (1.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
3780
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
3781
+  (0.4ms) COMMIT
3782
+ Migrating to CreateAdmins (20180109210452)
3783
+  (0.2ms) BEGIN
3784
+  (5.6ms) 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)
3785
+  (2.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
3786
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
3787
+  (0.6ms) COMMIT
3788
+ Migrating to CreateAssignments (20180215214227)
3789
+  (0.3ms) BEGIN
3790
+  (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)
3791
+  (2.0ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
3792
+  (2.4ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
3793
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
3794
+  (0.4ms) COMMIT
3795
+ Migrating to CreateSubmissions (20180216171618)
3796
+  (0.3ms) BEGIN
3797
+  (5.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)
3798
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
3799
+  (2.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
3800
+  (2.4ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
3801
+  (2.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
3802
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
3803
+  (0.4ms) COMMIT
3804
+ Migrating to CreateAccounts (20180220172559)
3805
+  (0.3ms) BEGIN
3806
+  (5.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)
3807
+  (1.8ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
3808
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
3809
+  (0.5ms) COMMIT
3810
+ Migrating to CreateAssignmentGroups (20180222163506)
3811
+  (0.2ms) BEGIN
3812
+  (5.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)
3813
+  (1.6ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
3814
+  (1.8ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
3815
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
3816
+  (0.4ms) COMMIT
3817
+ Migrating to CreateContextModules (20180411215348)
3818
+  (0.2ms) BEGIN
3819
+  (4.9ms) 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)
3820
+  (1.7ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
3821
+  (3.2ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
3822
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
3823
+  (0.4ms) COMMIT
3824
+ Migrating to CreateContextModuleItems (20180411215633)
3825
+  (0.2ms) BEGIN
3826
+  (6.1ms) 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)
3827
+  (2.0ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
3828
+  (1.8ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
3829
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
3830
+  (0.5ms) COMMIT
3831
+ Migrating to CreateUsers (20180509194201)
3832
+  (0.2ms) BEGIN
3833
+  (7.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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
3834
+  (2.0ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3835
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
3836
+  (0.5ms) COMMIT
3837
+ 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]]
3838
+  (0.2ms) BEGIN
3839
+ 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-05-09 20:14:57.166038"], ["updated_at", "2018-05-09 20:14:57.166038"]]
3840
+  (0.5ms) COMMIT
3841
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
3842
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3843
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3844
+  (1.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3845
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3846
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3847
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3848
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3849
+  (199.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3850
+  (196.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3851
+  (18.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3852
+  (3.9ms) 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)
3853
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
3854
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3855
+ Migrating to CreateEnrollments (20170905192509)
3856
+  (0.1ms) BEGIN
3857
+  (5.5ms) 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)
3858
+  (1.5ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3859
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3860
+  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3861
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3862
+  (0.4ms) COMMIT
3863
+ Migrating to CreateTerms (20170906193506)
3864
+  (0.2ms) BEGIN
3865
+  (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)
3866
+  (1.6ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3867
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3868
+  (0.4ms) COMMIT
3869
+ Migrating to CreateCourses (20170914181345)
3870
+  (0.2ms) BEGIN
3871
+  (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)
3872
+  (1.6ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3873
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3874
+  (0.5ms) COMMIT
3875
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3876
+  (0.3ms) BEGIN
3877
+  (4.9ms) 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)
3878
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3879
+  (0.4ms) COMMIT
3880
+ Migrating to CreateSections (20171107213207)
3881
+  (0.2ms) BEGIN
3882
+  (4.7ms) 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)
3883
+  (1.6ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3884
+  (1.6ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3885
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3886
+  (0.4ms) COMMIT
3887
+ Migrating to CreateRoles (20180103162102)
3888
+  (0.2ms) BEGIN
3889
+  (5.1ms) 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)
3890
+  (2.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
3891
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
3892
+  (0.5ms) COMMIT
3893
+ Migrating to CreateAdmins (20180109210452)
3894
+  (0.2ms) BEGIN
3895
+  (5.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)
3896
+  (1.8ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
3897
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
3898
+  (0.3ms) COMMIT
3899
+ Migrating to CreateAssignments (20180215214227)
3900
+  (0.2ms) BEGIN
3901
+  (5.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)
3902
+  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
3903
+  (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
3904
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
3905
+  (0.4ms) COMMIT
3906
+ Migrating to CreateSubmissions (20180216171618)
3907
+  (0.2ms) BEGIN
3908
+  (4.8ms) 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)
3909
+  (1.6ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
3910
+  (1.5ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
3911
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
3912
+  (1.6ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
3913
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
3914
+  (0.4ms) COMMIT
3915
+ Migrating to CreateAccounts (20180220172559)
3916
+  (0.2ms) BEGIN
3917
+  (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)
3918
+  (1.9ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
3919
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
3920
+  (0.4ms) COMMIT
3921
+ Migrating to CreateAssignmentGroups (20180222163506)
3922
+  (0.2ms) BEGIN
3923
+  (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)
3924
+  (1.7ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
3925
+  (1.5ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
3926
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
3927
+  (0.4ms) COMMIT
3928
+ Migrating to CreateContextModules (20180411215348)
3929
+  (0.2ms) BEGIN
3930
+  (4.9ms) 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)
3931
+  (1.6ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
3932
+  (1.6ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
3933
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
3934
+  (0.4ms) COMMIT
3935
+ Migrating to CreateContextModuleItems (20180411215633)
3936
+  (0.2ms) BEGIN
3937
+  (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)
3938
+  (1.7ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
3939
+  (1.5ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
3940
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
3941
+  (0.4ms) COMMIT
3942
+ Migrating to CreateUsers (20180509194201)
3943
+  (0.2ms) BEGIN
3944
+  (5.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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
3945
+  (1.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
3946
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
3947
+  (0.5ms) COMMIT
3948
+ ActiveRecord::InternalMetadata Load (1.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
3949
+  (0.1ms) BEGIN
3950
+ 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-05-09 20:22:57.744067"], ["updated_at", "2018-05-09 20:22:57.744067"]]
3951
+  (0.3ms) COMMIT
3952
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
3953
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3954
+  (5.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3955
+  (9.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3956
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3957
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3958
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3959
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
3960
+  (210.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
3961
+  (204.3ms) DROP DATABASE IF EXISTS "canvas_sync_test"
3962
+  (14.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
3963
+  (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)
3964
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
3965
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
3966
+ Migrating to CreateEnrollments (20170905192509)
3967
+  (0.2ms) BEGIN
3968
+  (17.9ms) 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)
3969
+  (1.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
3970
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
3971
+  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
3972
+ SQL (1.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
3973
+  (0.5ms) COMMIT
3974
+ Migrating to CreateTerms (20170906193506)
3975
+  (11.7ms) BEGIN
3976
+  (17.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)
3977
+  (1.6ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
3978
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
3979
+  (0.4ms) COMMIT
3980
+ Migrating to CreateCourses (20170914181345)
3981
+  (5.6ms) BEGIN
3982
+  (22.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)
3983
+  (1.6ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
3984
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
3985
+  (0.4ms) COMMIT
3986
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
3987
+  (0.3ms) BEGIN
3988
+  (5.5ms) 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)
3989
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
3990
+  (0.5ms) COMMIT
3991
+ Migrating to CreateSections (20171107213207)
3992
+  (5.4ms) BEGIN
3993
+  (23.3ms) 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)
3994
+  (1.6ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
3995
+  (1.4ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
3996
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
3997
+  (0.4ms) COMMIT
3998
+ Migrating to CreateRoles (20180103162102)
3999
+  (5.5ms) BEGIN
4000
+  (18.0ms) 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)
4001
+  (2.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
4002
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
4003
+  (0.4ms) COMMIT
4004
+ Migrating to CreateAdmins (20180109210452)
4005
+  (6.0ms) BEGIN
4006
+  (20.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)
4007
+  (2.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
4008
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
4009
+  (0.4ms) COMMIT
4010
+ Migrating to CreateAssignments (20180215214227)
4011
+  (6.0ms) BEGIN
4012
+  (12.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)
4013
+  (5.8ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
4014
+  (1.9ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
4015
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
4016
+  (0.4ms) COMMIT
4017
+ Migrating to CreateSubmissions (20180216171618)
4018
+  (5.5ms) BEGIN
4019
+  (17.3ms) 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)
4020
+  (2.0ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
4021
+  (2.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
4022
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
4023
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
4024
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
4025
+  (0.6ms) COMMIT
4026
+ Migrating to CreateAccounts (20180220172559)
4027
+  (10.2ms) BEGIN
4028
+  (17.5ms) 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)
4029
+  (2.2ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
4030
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
4031
+  (0.4ms) COMMIT
4032
+ Migrating to CreateAssignmentGroups (20180222163506)
4033
+  (10.7ms) BEGIN
4034
+  (16.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)
4035
+  (2.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
4036
+  (3.0ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
4037
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
4038
+  (0.6ms) COMMIT
4039
+ Migrating to CreateContextModules (20180411215348)
4040
+  (0.2ms) BEGIN
4041
+  (23.6ms) 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)
4042
+  (3.1ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
4043
+  (1.8ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
4044
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
4045
+  (0.4ms) COMMIT
4046
+ Migrating to CreateUsers (20180509194201)
4047
+  (6.3ms) BEGIN
4048
+  (28.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, "full_name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4049
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
4050
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180509194201"]]
4051
+  (0.4ms) COMMIT
4052
+ Migrating to CreateContextModuleItems (20180605172338)
4053
+  (10.7ms) BEGIN
4054
+  (16.7ms) 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, "canvas_assignment_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4055
+  (1.6ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
4056
+  (2.3ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
4057
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180605172338"]]
4058
+  (0.4ms) COMMIT
4059
+ 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]]
4060
+  (0.1ms) BEGIN
4061
+ 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-06-05 17:23:59.459154"], ["updated_at", "2018-06-05 17:23:59.459154"]]
4062
+  (0.4ms) COMMIT
4063
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
4064
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC