canvas_sync 0.3.22 → 0.3.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/lib/canvas_sync.rb +61 -11
  4. data/lib/canvas_sync/generators/templates/models/assignment.rb +2 -0
  5. data/lib/canvas_sync/generators/templates/models/context_module.rb +10 -0
  6. data/lib/canvas_sync/generators/templates/models/context_module_item.rb +6 -0
  7. data/lib/canvas_sync/generators/templates/models/create_context_module_items.rb +19 -0
  8. data/lib/canvas_sync/generators/templates/models/create_context_modules.rb +20 -0
  9. data/lib/canvas_sync/jobs/sync_context_module_items_job.rb +28 -0
  10. data/lib/canvas_sync/jobs/sync_context_modules_job.rb +28 -0
  11. data/lib/canvas_sync/processors/context_module_items_processor.rb +24 -0
  12. data/lib/canvas_sync/processors/context_modules_processor.rb +24 -0
  13. data/lib/canvas_sync/processors/model_mappings.yml +47 -0
  14. data/lib/canvas_sync/version.rb +1 -1
  15. data/spec/canvas_sync/canvas_sync_spec.rb +3 -3
  16. data/spec/canvas_sync/jobs/sync_context_module_items_job_spec.rb +29 -0
  17. data/spec/canvas_sync/jobs/sync_context_modules_job_spec.rb +29 -0
  18. data/spec/canvas_sync/models/assignment_spec.rb +9 -0
  19. data/spec/canvas_sync/models/context_module_item_spec.rb +10 -0
  20. data/spec/canvas_sync/models/context_module_spec.rb +19 -0
  21. data/spec/canvas_sync/processors/context_module_items_processor_spec.rb +13 -0
  22. data/spec/canvas_sync/processors/context_modules_processor_spec.rb +13 -0
  23. data/spec/dummy/app/models/assignment.rb +2 -0
  24. data/spec/dummy/app/models/context_module.rb +16 -0
  25. data/spec/dummy/app/models/context_module_item.rb +12 -0
  26. data/spec/dummy/db/migrate/20180411215348_create_context_modules.rb +26 -0
  27. data/spec/dummy/db/migrate/20180411215633_create_context_module_items.rb +25 -0
  28. data/spec/dummy/db/schema.rb +29 -1
  29. data/spec/dummy/log/development.log +1195 -0
  30. data/spec/dummy/log/test.log +8076 -0
  31. data/spec/factories/context_module_factory.rb +8 -0
  32. data/spec/factories/context_module_item_factory.rb +7 -0
  33. data/spec/spec_helper.rb +2 -0
  34. data/spec/support/fixtures/reports/context_module_items.csv +3 -0
  35. data/spec/support/fixtures/reports/context_modules.csv +3 -0
  36. metadata +38 -2
@@ -21,6 +21,15 @@ RSpec.describe Assignment, type: :model do
21
21
  .with_foreign_key(:canvas_assignment_group_id)
22
22
  end
23
23
 
24
+ it do
25
+ should have_many(:context_module_items)
26
+ .with_primary_key(:canvas_assignment_id)
27
+ .with_foreign_key(:content_id)
28
+ .dependent(:destroy)
29
+ end
30
+
31
+ it { should have_many(:context_modules).through(:context_module_items) }
32
+
24
33
  describe "context" do
25
34
  let!(:other_course) { FactoryGirl.create(:course) }
26
35
  let!(:matching_course) { FactoryGirl.create(:course) }
@@ -0,0 +1,10 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe ContextModuleItem, type: :model do
4
+ let(:subject) { FactoryGirl.create(:context_module_item) }
5
+
6
+ describe "associations" do
7
+ it { should belong_to(:context_module) }
8
+ it { should belong_to(:assignment) }
9
+ end
10
+ end
@@ -0,0 +1,19 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe ContextModule, type: :model do
4
+ let(:subject) { FactoryGirl.create(:context_module) }
5
+
6
+ describe "associations" do
7
+ it do
8
+ should belong_to(:canvas_context)
9
+ end
10
+
11
+ it do
12
+ should have_many(:context_module_items)
13
+ .with_primary_key(:canvas_context_module_id)
14
+ .with_foreign_key(:canvas_context_module_id)
15
+ end
16
+
17
+ it { should have_many(:assignments).through(:context_module_items) }
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Processors::ContextModuleItemsProcessor do
4
+ let(:subject) { CanvasSync::Processors::ContextModuleItemsProcessor }
5
+
6
+ describe "#process" do
7
+ it "inserts context modules" do
8
+ expect {
9
+ subject.process("spec/support/fixtures/reports/context_module_items.csv", {})
10
+ }.to change { ContextModuleItem.count }.by(2)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Processors::ContextModulesProcessor do
4
+ let(:subject) { CanvasSync::Processors::ContextModulesProcessor }
5
+
6
+ describe "#process" do
7
+ it "inserts context modules" do
8
+ expect {
9
+ subject.process("spec/support/fixtures/reports/context_modules.csv", {})
10
+ }.to change { ContextModule.count }.by(2)
11
+ end
12
+ end
13
+ end
@@ -11,4 +11,6 @@ class Assignment < ApplicationRecord
11
11
  belongs_to :context, polymorphic: true, optional: true, primary_key: :canvas_course_id
12
12
  belongs_to :assignment_group, optional: true, primary_key: :canvas_assignment_group_id, foreign_key: :canvas_assignment_group_id
13
13
  has_many :submissions, primary_key: :canvas_assignment_id, foreign_key: :canvas_assignment_id
14
+ has_many :context_module_items, primary_key: :canvas_assignment_id, foreign_key: :content_id, dependent: :destroy
15
+ has_many :context_modules, through: :context_module_items
14
16
  end
@@ -0,0 +1,16 @@
1
+ #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ # A ContextModule is the same as a Canvas Module. They're called ContextModules for 2 reasons:
10
+ # 1 - Module is a reserved word in Rails and you can't call a model a Module
11
+ # 2 - Canvas calls them ContextModules
12
+ class ContextModule < ApplicationRecord
13
+ belongs_to :canvas_context, polymorphic: true, optional: true
14
+ has_many :context_module_items, primary_key: :canvas_context_module_id, foreign_key: :canvas_context_module_id
15
+ has_many :assignments, through: :context_module_items
16
+ end
@@ -0,0 +1,12 @@
1
+ #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ class ContextModuleItem < ApplicationRecord
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
12
+ end
@@ -0,0 +1,26 @@
1
+ #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ class CreateContextModules < ActiveRecord::Migration[5.1]
10
+ def change
11
+ create_table :context_modules do |t|
12
+ t.bigint :canvas_context_module_id
13
+ t.bigint :canvas_context_id
14
+ t.string :canvas_context_type
15
+ t.integer :position
16
+ t.string :name
17
+ t.string :workflow_state
18
+ t.datetime :deleted_at
19
+ t.datetime :unlock_at
20
+ t.timestamps
21
+ end
22
+
23
+ add_index :context_modules, :canvas_context_module_id, unique: true
24
+ add_index :context_modules, [:canvas_context_id, :canvas_context_type], name: "index_context_modules_on_context"
25
+ end
26
+ end
@@ -0,0 +1,25 @@
1
+ #
2
+ # AUTO GENERATED MIGRATION
3
+ # This migration was auto generated by the CanvasSync Gem.
4
+ # You can add new columns to this table, but removing or
5
+ # re-naming ones created here may break Canvas Syncing.
6
+ #
7
+
8
+
9
+ class CreateContextModuleItems < ActiveRecord::Migration[5.1]
10
+ def change
11
+ create_table :context_module_items do |t|
12
+ t.bigint :canvas_context_module_item_id
13
+ t.bigint :canvas_context_module_id
14
+ t.integer :position
15
+ t.string :content_type
16
+ t.bigint :content_id
17
+ t.string :workflow_state
18
+
19
+ t.timestamps
20
+ end
21
+
22
+ add_index :context_module_items, :canvas_context_module_item_id, unique: true
23
+ add_index :context_module_items, :canvas_context_module_id
24
+ end
25
+ end
@@ -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: 20180222163506) do
13
+ ActiveRecord::Schema.define(version: 20180411215633) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -93,6 +93,34 @@ ActiveRecord::Schema.define(version: 20180222163506) do
93
93
  t.datetime "updated_at", null: false
94
94
  end
95
95
 
96
+ create_table "context_module_items", force: :cascade do |t|
97
+ t.bigint "canvas_context_module_item_id"
98
+ t.bigint "canvas_context_module_id"
99
+ t.integer "position"
100
+ t.string "content_type"
101
+ t.bigint "content_id"
102
+ t.string "workflow_state"
103
+ t.datetime "created_at", null: false
104
+ t.datetime "updated_at", null: false
105
+ t.index ["canvas_context_module_id"], name: "index_context_module_items_on_canvas_context_module_id"
106
+ t.index ["canvas_context_module_item_id"], name: "index_context_module_items_on_canvas_context_module_item_id", unique: true
107
+ end
108
+
109
+ create_table "context_modules", force: :cascade do |t|
110
+ t.bigint "canvas_context_module_id"
111
+ t.bigint "canvas_context_id"
112
+ t.string "canvas_context_type"
113
+ t.integer "position"
114
+ t.string "name"
115
+ t.string "workflow_state"
116
+ t.datetime "deleted_at"
117
+ t.datetime "unlock_at"
118
+ t.datetime "created_at", null: false
119
+ t.datetime "updated_at", null: false
120
+ t.index ["canvas_context_id", "canvas_context_type"], name: "index_context_modules_on_context"
121
+ t.index ["canvas_context_module_id"], name: "index_context_modules_on_canvas_context_module_id", unique: true
122
+ end
123
+
96
124
  create_table "courses", force: :cascade do |t|
97
125
  t.bigint "canvas_course_id", null: false
98
126
  t.string "sis_id"
@@ -980,3 +980,1198 @@ Migrating to CreateAssignments (20180212204530)
980
980
   (0.4ms) COMMIT
981
981
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
982
982
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
983
+  (8.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
984
+  (21.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
985
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
986
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
987
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
988
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
989
+  (258.4ms) DROP DATABASE IF EXISTS "canvas_sync_development"
990
+  (278.3ms) DROP DATABASE IF EXISTS "canvas_sync_test"
991
+  (45.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
992
+  (6.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)
993
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
994
+  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
995
+ Migrating to CreateEnrollments (20170905192509)
996
+  (0.2ms) BEGIN
997
+  (9.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)
998
+  (2.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
999
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1000
+  (2.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1001
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1002
+  (0.4ms) COMMIT
1003
+ Migrating to CreateTerms (20170906193506)
1004
+  (5.8ms) BEGIN
1005
+  (18.1ms) 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)
1006
+  (2.8ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1007
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1008
+  (0.4ms) COMMIT
1009
+ Migrating to CreateCourses (20170914181345)
1010
+  (0.2ms) BEGIN
1011
+  (8.5ms) 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)
1012
+  (2.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1013
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1014
+  (1.2ms) COMMIT
1015
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1016
+  (5.4ms) BEGIN
1017
+  (30.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)
1018
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1019
+  (0.4ms) COMMIT
1020
+ Migrating to CreateUsers (20170918221413)
1021
+  (0.2ms) BEGIN
1022
+  (6.9ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1023
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1024
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1025
+  (0.4ms) COMMIT
1026
+ Migrating to CreateSections (20171107213207)
1027
+  (0.3ms) BEGIN
1028
+  (6.0ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1029
+  (2.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1030
+  (7.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1031
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1032
+  (6.0ms) COMMIT
1033
+ Migrating to CreateRoles (20180103162102)
1034
+  (5.8ms) BEGIN
1035
+  (10.3ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1036
+  (2.3ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1037
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1038
+  (0.5ms) COMMIT
1039
+ Migrating to CreateAdmins (20180109210452)
1040
+  (0.2ms) BEGIN
1041
+  (7.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)
1042
+  (2.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1043
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1044
+  (6.3ms) COMMIT
1045
+ Migrating to CreateAssignments (20180215214227)
1046
+  (9.2ms) BEGIN
1047
+  (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)
1048
+  (2.1ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1049
+  (2.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1050
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1051
+  (0.5ms) COMMIT
1052
+ Migrating to CreateSubmissions (20180216171618)
1053
+  (0.4ms) BEGIN
1054
+  (7.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)
1055
+  (2.5ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1056
+  (5.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1057
+  (10.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1058
+  (8.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1059
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1060
+  (4.4ms) COMMIT
1061
+ Migrating to CreateAccounts (20180220172559)
1062
+  (0.3ms) BEGIN
1063
+  (7.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)
1064
+  (2.4ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1065
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1066
+  (0.4ms) COMMIT
1067
+ Migrating to CreateAssignmentGroups (20180222163506)
1068
+  (0.2ms) BEGIN
1069
+  (7.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)
1070
+  (2.2ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1071
+  (2.0ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1072
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1073
+  (0.3ms) COMMIT
1074
+ ActiveRecord::InternalMetadata Load (1.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1075
+  (0.1ms) BEGIN
1076
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:14:50.538995"], ["updated_at", "2018-04-11 21:14:50.538995"]]
1077
+  (7.0ms) COMMIT
1078
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
1079
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1080
+  (9.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1081
+  (9.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1082
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1083
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1084
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1085
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1086
+  (210.2ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1087
+  (204.7ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1088
+  (23.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1089
+  (5.2ms) 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)
1090
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1091
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1092
+ Migrating to CreateEnrollments (20170905192509)
1093
+  (0.2ms) BEGIN
1094
+  (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)
1095
+  (2.2ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1096
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1097
+  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1098
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1099
+  (0.6ms) COMMIT
1100
+ Migrating to CreateTerms (20170906193506)
1101
+  (0.2ms) BEGIN
1102
+  (7.3ms) 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)
1103
+  (2.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1104
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1105
+  (0.5ms) COMMIT
1106
+ Migrating to CreateCourses (20170914181345)
1107
+  (0.2ms) BEGIN
1108
+  (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)
1109
+  (2.2ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1110
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1111
+  (0.4ms) COMMIT
1112
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1113
+  (5.9ms) BEGIN
1114
+  (22.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1115
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1116
+  (0.6ms) COMMIT
1117
+ Migrating to CreateUsers (20170918221413)
1118
+  (0.4ms) BEGIN
1119
+  (6.8ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1120
+  (2.0ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1121
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1122
+  (0.6ms) COMMIT
1123
+ Migrating to CreateSections (20171107213207)
1124
+  (0.2ms) BEGIN
1125
+  (6.1ms) 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)
1126
+  (2.3ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1127
+  (2.0ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1128
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1129
+  (0.5ms) COMMIT
1130
+ Migrating to CreateRoles (20180103162102)
1131
+  (0.2ms) BEGIN
1132
+  (11.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)
1133
+  (2.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1134
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1135
+  (0.5ms) COMMIT
1136
+ Migrating to CreateAdmins (20180109210452)
1137
+  (0.3ms) BEGIN
1138
+  (6.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1139
+  (2.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1140
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1141
+  (0.5ms) COMMIT
1142
+ Migrating to CreateAssignments (20180215214227)
1143
+  (0.2ms) BEGIN
1144
+  (6.8ms) 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)
1145
+  (2.0ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1146
+  (2.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1147
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1148
+  (0.4ms) COMMIT
1149
+ Migrating to CreateSubmissions (20180216171618)
1150
+  (0.3ms) BEGIN
1151
+  (6.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1152
+  (2.2ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1153
+  (2.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1154
+  (2.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1155
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1156
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1157
+  (0.5ms) COMMIT
1158
+ Migrating to CreateAccounts (20180220172559)
1159
+  (0.2ms) BEGIN
1160
+  (6.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)
1161
+  (2.4ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1162
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1163
+  (0.4ms) COMMIT
1164
+ Migrating to CreateAssignmentGroups (20180222163506)
1165
+  (0.2ms) BEGIN
1166
+  (6.6ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1167
+  (2.0ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1168
+  (1.9ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1169
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1170
+  (0.4ms) COMMIT
1171
+ 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]]
1172
+  (0.1ms) BEGIN
1173
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:16:15.734765"], ["updated_at", "2018-04-11 21:16:15.734765"]]
1174
+  (0.4ms) COMMIT
1175
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
1176
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1177
+  (3.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1178
+  (14.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1179
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1180
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1181
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1182
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1183
+  (236.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1184
+  (146.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1185
+  (21.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1186
+  (4.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1187
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1188
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1189
+ Migrating to CreateEnrollments (20170905192509)
1190
+  (0.1ms) BEGIN
1191
+  (23.1ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1192
+  (1.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1193
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1194
+  (1.9ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1195
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1196
+  (0.5ms) COMMIT
1197
+ Migrating to CreateTerms (20170906193506)
1198
+  (0.2ms) BEGIN
1199
+  (6.3ms) 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)
1200
+  (1.8ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1201
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1202
+  (0.4ms) COMMIT
1203
+ Migrating to CreateCourses (20170914181345)
1204
+  (0.2ms) BEGIN
1205
+  (5.9ms) 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)
1206
+  (1.9ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1207
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1208
+  (0.4ms) COMMIT
1209
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1210
+  (5.9ms) BEGIN
1211
+  (12.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1212
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1213
+  (5.0ms) COMMIT
1214
+ Migrating to CreateUsers (20170918221413)
1215
+  (0.2ms) BEGIN
1216
+  (5.4ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1217
+  (2.0ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1218
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1219
+  (0.4ms) COMMIT
1220
+ Migrating to CreateSections (20171107213207)
1221
+  (0.2ms) BEGIN
1222
+  (6.0ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1223
+  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1224
+  (1.9ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1225
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1226
+  (0.4ms) COMMIT
1227
+ Migrating to CreateRoles (20180103162102)
1228
+  (0.2ms) BEGIN
1229
+  (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)
1230
+  (2.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1231
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1232
+  (0.4ms) COMMIT
1233
+ Migrating to CreateAdmins (20180109210452)
1234
+  (0.2ms) BEGIN
1235
+  (4.9ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1236
+  (2.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1237
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1238
+  (0.4ms) COMMIT
1239
+ Migrating to CreateAssignments (20180215214227)
1240
+  (0.3ms) BEGIN
1241
+  (7.9ms) 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)
1242
+  (2.9ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1243
+  (3.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1244
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1245
+  (0.5ms) COMMIT
1246
+ Migrating to CreateSubmissions (20180216171618)
1247
+  (0.4ms) BEGIN
1248
+  (7.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)
1249
+  (2.0ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1250
+  (2.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1251
+  (2.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1252
+  (2.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1253
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1254
+  (0.5ms) COMMIT
1255
+ Migrating to CreateAccounts (20180220172559)
1256
+  (0.3ms) BEGIN
1257
+  (7.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)
1258
+  (2.5ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1259
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1260
+  (0.5ms) COMMIT
1261
+ Migrating to CreateAssignmentGroups (20180222163506)
1262
+  (0.3ms) BEGIN
1263
+  (7.3ms) 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)
1264
+  (2.1ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1265
+  (2.5ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1266
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1267
+  (0.5ms) COMMIT
1268
+ 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]]
1269
+  (0.2ms) BEGIN
1270
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:16:57.520101"], ["updated_at", "2018-04-11 21:16:57.520101"]]
1271
+  (0.5ms) COMMIT
1272
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1273
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1274
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1275
+  (2.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1276
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1277
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1278
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1279
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1280
+  (213.2ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1281
+  (200.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1282
+  (26.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1283
+  (5.2ms) 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)
1284
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
1285
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1286
+ Migrating to CreateEnrollments (20170905192509)
1287
+  (0.1ms) BEGIN
1288
+  (6.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)
1289
+  (1.8ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1290
+  (1.9ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1291
+  (1.9ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1292
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1293
+  (0.6ms) COMMIT
1294
+ Migrating to CreateTerms (20170906193506)
1295
+  (0.2ms) BEGIN
1296
+  (6.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)
1297
+  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1298
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1299
+  (0.5ms) COMMIT
1300
+ Migrating to CreateCourses (20170914181345)
1301
+  (0.3ms) BEGIN
1302
+  (6.5ms) 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)
1303
+  (1.9ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1304
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1305
+  (0.4ms) COMMIT
1306
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1307
+  (0.2ms) BEGIN
1308
+  (5.2ms) 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)
1309
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1310
+  (0.5ms) COMMIT
1311
+ Migrating to CreateUsers (20170918221413)
1312
+  (0.2ms) BEGIN
1313
+  (6.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, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1314
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1315
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1316
+  (0.5ms) COMMIT
1317
+ Migrating to CreateSections (20171107213207)
1318
+  (0.2ms) BEGIN
1319
+  (7.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)
1320
+  (2.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1321
+  (2.3ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1322
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1323
+  (0.4ms) COMMIT
1324
+ Migrating to CreateRoles (20180103162102)
1325
+  (0.2ms) BEGIN
1326
+  (6.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)
1327
+  (2.0ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1328
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1329
+  (0.6ms) COMMIT
1330
+ Migrating to CreateAdmins (20180109210452)
1331
+  (0.3ms) BEGIN
1332
+  (6.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)
1333
+  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1334
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1335
+  (0.5ms) COMMIT
1336
+ Migrating to CreateAssignments (20180215214227)
1337
+  (0.3ms) BEGIN
1338
+  (6.8ms) 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)
1339
+  (1.7ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1340
+  (2.9ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1341
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1342
+  (0.4ms) COMMIT
1343
+ Migrating to CreateSubmissions (20180216171618)
1344
+  (0.2ms) BEGIN
1345
+  (7.2ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1346
+  (2.0ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1347
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1348
+  (2.1ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1349
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1350
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1351
+  (0.4ms) COMMIT
1352
+ Migrating to CreateAccounts (20180220172559)
1353
+  (0.2ms) BEGIN
1354
+  (5.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)
1355
+  (2.0ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1356
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1357
+  (0.5ms) COMMIT
1358
+ Migrating to CreateAssignmentGroups (20180222163506)
1359
+  (0.3ms) BEGIN
1360
+  (7.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)
1361
+  (1.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1362
+  (2.5ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1363
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1364
+  (0.5ms) COMMIT
1365
+ Migrating to CreateContextModules (20180411211708)
1366
+  (0.2ms) BEGIN
1367
+  (6.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, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1368
+  (2.0ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1369
+  (5.1ms) ROLLBACK
1370
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1371
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1372
+  (1.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1373
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1374
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1375
+ Migrating to CreateContextModules (20180411212010)
1376
+  (0.1ms) BEGIN
1377
+  (15.5ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1378
+  (3.1ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1379
+  (5.1ms) ROLLBACK
1380
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
1381
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1382
+  (1.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1383
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1384
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1385
+ Migrating to CreateContextModules (20180411212010)
1386
+  (0.1ms) BEGIN
1387
+  (15.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)
1388
+  (2.1ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1389
+  (5.8ms) ROLLBACK
1390
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1391
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1392
+  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1393
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1394
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1395
+ Migrating to CreateContextModules (20180411212552)
1396
+  (0.1ms) BEGIN
1397
+  (14.8ms) 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)
1398
+  (2.2ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1399
+  (2.0ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
1400
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411212552"]]
1401
+  (1.5ms) COMMIT
1402
+ ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1403
+  (0.1ms) BEGIN
1404
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:26:05.791107"], ["updated_at", "2018-04-11 21:26:05.791107"]]
1405
+  (0.5ms) COMMIT
1406
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1407
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1408
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1409
+  (1.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1410
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1411
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1412
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1413
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1414
+  (214.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1415
+  (208.1ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1416
+  (24.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1417
+  (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)
1418
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1419
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1420
+ Migrating to CreateEnrollments (20170905192509)
1421
+  (0.1ms) BEGIN
1422
+  (6.8ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1423
+  (2.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1424
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1425
+  (1.9ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1426
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1427
+  (0.8ms) COMMIT
1428
+ Migrating to CreateTerms (20170906193506)
1429
+  (0.2ms) BEGIN
1430
+  (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)
1431
+  (1.7ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1432
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1433
+  (0.4ms) COMMIT
1434
+ Migrating to CreateCourses (20170914181345)
1435
+  (0.2ms) BEGIN
1436
+  (7.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)
1437
+  (2.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1438
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1439
+  (0.5ms) COMMIT
1440
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1441
+  (6.6ms) BEGIN
1442
+  (18.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)
1443
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1444
+  (0.5ms) COMMIT
1445
+ Migrating to CreateUsers (20170918221413)
1446
+  (0.2ms) BEGIN
1447
+  (6.2ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1448
+  (2.7ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1449
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1450
+  (0.6ms) COMMIT
1451
+ Migrating to CreateSections (20171107213207)
1452
+  (1.0ms) BEGIN
1453
+  (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)
1454
+  (2.0ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1455
+  (2.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1456
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1457
+  (0.5ms) COMMIT
1458
+ Migrating to CreateRoles (20180103162102)
1459
+  (0.2ms) BEGIN
1460
+  (6.2ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1461
+  (2.0ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1462
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1463
+  (0.5ms) COMMIT
1464
+ Migrating to CreateAdmins (20180109210452)
1465
+  (0.2ms) BEGIN
1466
+  (6.2ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1467
+  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1468
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1469
+  (0.5ms) COMMIT
1470
+ Migrating to CreateAssignments (20180215214227)
1471
+  (0.3ms) BEGIN
1472
+  (7.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)
1473
+  (2.1ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1474
+  (2.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1475
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1476
+  (0.4ms) COMMIT
1477
+ Migrating to CreateSubmissions (20180216171618)
1478
+  (0.3ms) BEGIN
1479
+  (6.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)
1480
+  (2.1ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1481
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1482
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1483
+  (2.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1484
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1485
+  (0.6ms) COMMIT
1486
+ Migrating to CreateAccounts (20180220172559)
1487
+  (0.3ms) BEGIN
1488
+  (6.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)
1489
+  (2.1ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1490
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1491
+  (0.5ms) COMMIT
1492
+ Migrating to CreateAssignmentGroups (20180222163506)
1493
+  (0.4ms) BEGIN
1494
+  (6.3ms) 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)
1495
+  (2.3ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1496
+  (1.8ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1497
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1498
+  (0.5ms) COMMIT
1499
+ Migrating to CreateContextModules (20180411212552)
1500
+  (0.2ms) BEGIN
1501
+  (5.5ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1502
+  (1.8ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1503
+  (2.0ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
1504
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411212552"]]
1505
+  (0.5ms) COMMIT
1506
+ 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]]
1507
+  (0.1ms) BEGIN
1508
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:26:29.339767"], ["updated_at", "2018-04-11 21:26:29.339767"]]
1509
+  (0.4ms) COMMIT
1510
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1511
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1512
+  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1513
+  (1.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1514
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1515
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1516
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1517
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1518
+  (198.3ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1519
+  (216.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1520
+  (21.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1521
+  (4.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)
1522
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1523
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1524
+ Migrating to CreateEnrollments (20170905192509)
1525
+  (0.2ms) BEGIN
1526
+  (7.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)
1527
+  (1.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1528
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1529
+  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1530
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1531
+  (0.4ms) COMMIT
1532
+ Migrating to CreateTerms (20170906193506)
1533
+  (0.2ms) BEGIN
1534
+  (5.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)
1535
+  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1536
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1537
+  (0.4ms) COMMIT
1538
+ Migrating to CreateCourses (20170914181345)
1539
+  (0.2ms) BEGIN
1540
+  (5.9ms) 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)
1541
+  (1.9ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1542
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1543
+  (0.4ms) COMMIT
1544
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1545
+  (6.0ms) BEGIN
1546
+  (18.4ms) 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)
1547
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1548
+  (0.5ms) COMMIT
1549
+ Migrating to CreateUsers (20170918221413)
1550
+  (0.2ms) BEGIN
1551
+  (5.2ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1552
+  (1.7ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1553
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1554
+  (0.5ms) COMMIT
1555
+ Migrating to CreateSections (20171107213207)
1556
+  (0.2ms) BEGIN
1557
+  (5.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)
1558
+  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1559
+  (1.9ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1560
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1561
+  (0.4ms) COMMIT
1562
+ Migrating to CreateRoles (20180103162102)
1563
+  (0.2ms) BEGIN
1564
+  (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)
1565
+  (1.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1566
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1567
+  (0.5ms) COMMIT
1568
+ Migrating to CreateAdmins (20180109210452)
1569
+  (0.2ms) BEGIN
1570
+  (6.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)
1571
+  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1572
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1573
+  (0.4ms) COMMIT
1574
+ Migrating to CreateAssignments (20180215214227)
1575
+  (0.2ms) BEGIN
1576
+  (5.7ms) 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)
1577
+  (1.9ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1578
+  (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1579
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1580
+  (0.4ms) COMMIT
1581
+ Migrating to CreateSubmissions (20180216171618)
1582
+  (0.2ms) BEGIN
1583
+  (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)
1584
+  (1.8ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1585
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1586
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1587
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1588
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1589
+  (0.4ms) COMMIT
1590
+ Migrating to CreateAccounts (20180220172559)
1591
+  (0.2ms) BEGIN
1592
+  (6.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)
1593
+  (1.9ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1594
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1595
+  (0.5ms) COMMIT
1596
+ Migrating to CreateAssignmentGroups (20180222163506)
1597
+  (0.3ms) BEGIN
1598
+  (5.6ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1599
+  (1.9ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1600
+  (1.6ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1601
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1602
+  (0.4ms) COMMIT
1603
+ Migrating to CreateContextModules (20180411212552)
1604
+  (0.2ms) BEGIN
1605
+  (5.7ms) 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)
1606
+  (1.8ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1607
+  (1.9ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
1608
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411212552"]]
1609
+  (0.4ms) COMMIT
1610
+ Migrating to CreateContextModuleItems (20180411213654)
1611
+  (0.2ms) BEGIN
1612
+  (5.8ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1613
+  (2.5ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
1614
+  (2.1ms) CREATE INDEX "index_context_module_items_on_context_module_id" ON "context_module_items" ("context_module_id")
1615
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411213654"]]
1616
+  (0.5ms) COMMIT
1617
+ 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]]
1618
+  (0.2ms) BEGIN
1619
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:37:09.468673"], ["updated_at", "2018-04-11 21:37:09.468673"]]
1620
+  (0.5ms) COMMIT
1621
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
1622
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1623
+  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1624
+  (1.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1625
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1626
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1627
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1628
+  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1629
+  (147.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1630
+  (218.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1631
+  (29.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1632
+  (5.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)
1633
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
1634
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1635
+ Migrating to CreateEnrollments (20170905192509)
1636
+  (0.2ms) BEGIN
1637
+  (7.1ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1638
+  (2.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1639
+  (2.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1640
+  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1641
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1642
+  (0.5ms) COMMIT
1643
+ Migrating to CreateTerms (20170906193506)
1644
+  (0.2ms) BEGIN
1645
+  (22.3ms) 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)
1646
+  (6.8ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1647
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1648
+  (0.6ms) COMMIT
1649
+ Migrating to CreateCourses (20170914181345)
1650
+  (0.3ms) BEGIN
1651
+  (21.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)
1652
+  (8.2ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1653
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1654
+  (6.0ms) COMMIT
1655
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1656
+  (10.9ms) BEGIN
1657
+  (6.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)
1658
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1659
+  (0.4ms) COMMIT
1660
+ Migrating to CreateUsers (20170918221413)
1661
+  (0.3ms) BEGIN
1662
+  (7.8ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1663
+  (2.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1664
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1665
+  (0.5ms) COMMIT
1666
+ Migrating to CreateSections (20171107213207)
1667
+  (0.2ms) BEGIN
1668
+  (6.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)
1669
+  (8.0ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1670
+  (8.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1671
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1672
+  (5.8ms) COMMIT
1673
+ Migrating to CreateRoles (20180103162102)
1674
+  (0.2ms) BEGIN
1675
+  (6.7ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1676
+  (2.0ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1677
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1678
+  (0.5ms) COMMIT
1679
+ Migrating to CreateAdmins (20180109210452)
1680
+  (0.2ms) BEGIN
1681
+  (6.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)
1682
+  (2.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1683
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1684
+  (0.5ms) COMMIT
1685
+ Migrating to CreateAssignments (20180215214227)
1686
+  (0.2ms) BEGIN
1687
+  (13.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)
1688
+  (7.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1689
+  (13.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1690
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1691
+  (0.4ms) COMMIT
1692
+ Migrating to CreateSubmissions (20180216171618)
1693
+  (0.3ms) BEGIN
1694
+  (6.5ms) 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)
1695
+  (2.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1696
+  (2.3ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1697
+  (2.4ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1698
+  (2.4ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1699
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1700
+  (0.4ms) COMMIT
1701
+ Migrating to CreateAccounts (20180220172559)
1702
+  (0.3ms) BEGIN
1703
+  (22.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)
1704
+  (2.3ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1705
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1706
+  (0.5ms) COMMIT
1707
+ Migrating to CreateAssignmentGroups (20180222163506)
1708
+  (0.2ms) BEGIN
1709
+  (7.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)
1710
+  (2.1ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1711
+  (2.4ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1712
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1713
+  (0.5ms) COMMIT
1714
+ Migrating to CreateContextModules (20180411212552)
1715
+  (0.2ms) BEGIN
1716
+  (6.7ms) 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)
1717
+  (1.8ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1718
+  (7.8ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
1719
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411212552"]]
1720
+  (10.8ms) COMMIT
1721
+ Migrating to CreateContextModuleItems (20180411213920)
1722
+  (4.3ms) BEGIN
1723
+  (6.7ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "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)
1724
+  (2.3ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
1725
+  (2.1ms) CREATE INDEX "index_context_module_items_on_context_module_id" ON "context_module_items" ("context_module_id")
1726
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411213920"]]
1727
+  (0.5ms) COMMIT
1728
+ 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]]
1729
+  (0.1ms) BEGIN
1730
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:39:36.786283"], ["updated_at", "2018-04-11 21:39:36.786283"]]
1731
+  (5.9ms) COMMIT
1732
+  (0.5ms) SELECT pg_advisory_unlock(1438354376499275445)
1733
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1734
+  (2.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1735
+  (1.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1736
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1737
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1738
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1739
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1740
+  (205.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1741
+  (213.3ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1742
+  (23.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1743
+  (4.3ms) 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)
1744
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1745
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1746
+ Migrating to CreateEnrollments (20170905192509)
1747
+  (0.2ms) BEGIN
1748
+  (6.2ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1749
+  (1.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1750
+  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1751
+  (2.5ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1752
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1753
+  (0.5ms) COMMIT
1754
+ Migrating to CreateTerms (20170906193506)
1755
+  (0.4ms) BEGIN
1756
+  (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)
1757
+  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1758
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1759
+  (0.4ms) COMMIT
1760
+ Migrating to CreateCourses (20170914181345)
1761
+  (0.3ms) BEGIN
1762
+  (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)
1763
+  (1.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1764
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1765
+  (0.4ms) COMMIT
1766
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1767
+  (0.2ms) BEGIN
1768
+  (6.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)
1769
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1770
+  (0.5ms) COMMIT
1771
+ Migrating to CreateUsers (20170918221413)
1772
+  (0.3ms) BEGIN
1773
+  (5.2ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1774
+  (1.8ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1775
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1776
+  (0.4ms) COMMIT
1777
+ Migrating to CreateSections (20171107213207)
1778
+  (0.2ms) BEGIN
1779
+  (5.5ms) 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)
1780
+  (2.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1781
+  (2.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1782
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1783
+  (0.5ms) COMMIT
1784
+ Migrating to CreateRoles (20180103162102)
1785
+  (0.2ms) BEGIN
1786
+  (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)
1787
+  (2.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1788
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1789
+  (0.5ms) COMMIT
1790
+ Migrating to CreateAdmins (20180109210452)
1791
+  (0.2ms) BEGIN
1792
+  (6.3ms) 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)
1793
+  (1.8ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1794
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1795
+  (0.5ms) COMMIT
1796
+ Migrating to CreateAssignments (20180215214227)
1797
+  (0.3ms) BEGIN
1798
+  (5.8ms) 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)
1799
+  (1.9ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1800
+  (1.9ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1801
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1802
+  (0.4ms) COMMIT
1803
+ Migrating to CreateSubmissions (20180216171618)
1804
+  (0.2ms) BEGIN
1805
+  (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)
1806
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1807
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1808
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1809
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1810
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1811
+  (0.5ms) COMMIT
1812
+ Migrating to CreateAccounts (20180220172559)
1813
+  (0.2ms) BEGIN
1814
+  (5.9ms) 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)
1815
+  (1.7ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1816
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1817
+  (0.4ms) COMMIT
1818
+ Migrating to CreateAssignmentGroups (20180222163506)
1819
+  (0.3ms) BEGIN
1820
+  (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)
1821
+  (1.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1822
+  (1.6ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1823
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1824
+  (0.3ms) COMMIT
1825
+ Migrating to CreateContextModules (20180411212552)
1826
+  (0.2ms) BEGIN
1827
+  (7.5ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1828
+  (2.1ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1829
+  (1.7ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
1830
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411212552"]]
1831
+  (0.5ms) COMMIT
1832
+ Migrating to CreateContextModuleItems (20180411214055)
1833
+  (0.4ms) BEGIN
1834
+  (5.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)
1835
+  (1.8ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
1836
+  (1.6ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
1837
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411214055"]]
1838
+  (0.4ms) COMMIT
1839
+ 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]]
1840
+  (0.1ms) BEGIN
1841
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:41:10.387446"], ["updated_at", "2018-04-11 21:41:10.387446"]]
1842
+  (0.5ms) COMMIT
1843
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1844
+  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1845
+  (2.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1846
+  (1.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1847
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1848
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1849
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1850
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1851
+  (213.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1852
+  (213.2ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1853
+  (24.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1854
+  (5.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1855
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
1856
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1857
+ Migrating to CreateEnrollments (20170905192509)
1858
+  (0.1ms) BEGIN
1859
+  (6.1ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1860
+  (1.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1861
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1862
+  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1863
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1864
+  (0.5ms) COMMIT
1865
+ Migrating to CreateTerms (20170906193506)
1866
+  (0.2ms) BEGIN
1867
+  (6.1ms) 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)
1868
+  (2.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1869
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1870
+  (0.5ms) COMMIT
1871
+ Migrating to CreateCourses (20170914181345)
1872
+  (0.2ms) BEGIN
1873
+  (6.9ms) 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)
1874
+  (2.0ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1875
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1876
+  (0.5ms) COMMIT
1877
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1878
+  (0.2ms) BEGIN
1879
+  (6.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)
1880
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1881
+  (0.4ms) COMMIT
1882
+ Migrating to CreateUsers (20170918221413)
1883
+  (0.2ms) BEGIN
1884
+  (7.4ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1885
+  (1.9ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1886
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1887
+  (0.5ms) COMMIT
1888
+ Migrating to CreateSections (20171107213207)
1889
+  (0.2ms) BEGIN
1890
+  (4.9ms) 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)
1891
+  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1892
+  (1.8ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1893
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1894
+  (0.4ms) COMMIT
1895
+ Migrating to CreateRoles (20180103162102)
1896
+  (0.3ms) BEGIN
1897
+  (5.4ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1898
+  (2.0ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1899
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1900
+  (0.4ms) COMMIT
1901
+ Migrating to CreateAdmins (20180109210452)
1902
+  (0.3ms) BEGIN
1903
+  (5.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)
1904
+  (1.6ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1905
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1906
+  (0.3ms) COMMIT
1907
+ Migrating to CreateAssignments (20180215214227)
1908
+  (0.2ms) BEGIN
1909
+  (7.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)
1910
+  (1.7ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1911
+  (2.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1912
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1913
+  (0.3ms) COMMIT
1914
+ Migrating to CreateSubmissions (20180216171618)
1915
+  (0.2ms) BEGIN
1916
+  (5.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)
1917
+  (1.8ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1918
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1919
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1920
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1921
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1922
+  (0.5ms) COMMIT
1923
+ Migrating to CreateAccounts (20180220172559)
1924
+  (0.2ms) BEGIN
1925
+  (5.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)
1926
+  (1.9ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1927
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1928
+  (0.4ms) COMMIT
1929
+ Migrating to CreateAssignmentGroups (20180222163506)
1930
+  (0.2ms) BEGIN
1931
+  (6.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)
1932
+  (1.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1933
+  (1.6ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1934
+ SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1935
+  (0.5ms) COMMIT
1936
+ Migrating to CreateContextModules (20180411212552)
1937
+  (0.2ms) BEGIN
1938
+  (5.5ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1939
+  (1.8ms) CREATE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
1940
+  (1.8ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
1941
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411212552"]]
1942
+  (0.5ms) COMMIT
1943
+ Migrating to CreateContextModuleItems (20180411214055)
1944
+  (0.3ms) BEGIN
1945
+  (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)
1946
+  (1.7ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
1947
+  (1.6ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
1948
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411214055"]]
1949
+  (0.3ms) COMMIT
1950
+ 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]]
1951
+  (0.2ms) BEGIN
1952
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:45:05.059828"], ["updated_at", "2018-04-11 21:45:05.059828"]]
1953
+  (0.4ms) COMMIT
1954
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1955
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1956
+  (3.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1957
+  (8.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1958
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1959
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1960
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1961
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1962
+  (229.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1963
+  (215.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1964
+  (13.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1965
+  (4.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)
1966
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1967
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1968
+ Migrating to CreateEnrollments (20170905192509)
1969
+  (0.2ms) BEGIN
1970
+  (19.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)
1971
+  (2.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1972
+  (1.9ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1973
+  (2.4ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1974
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1975
+  (0.4ms) COMMIT
1976
+ Migrating to CreateTerms (20170906193506)
1977
+  (5.9ms) BEGIN
1978
+  (18.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)
1979
+  (2.2ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1980
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1981
+  (0.4ms) COMMIT
1982
+ Migrating to CreateCourses (20170914181345)
1983
+  (11.5ms) BEGIN
1984
+  (13.9ms) 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)
1985
+  (2.0ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1986
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1987
+  (0.5ms) COMMIT
1988
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1989
+  (6.4ms) BEGIN
1990
+  (18.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1991
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1992
+  (0.4ms) COMMIT
1993
+ Migrating to CreateUsers (20170918221413)
1994
+  (6.3ms) BEGIN
1995
+  (18.6ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1996
+  (2.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1997
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1998
+  (0.6ms) COMMIT
1999
+ Migrating to CreateSections (20171107213207)
2000
+  (6.2ms) BEGIN
2001
+  (18.5ms) 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)
2002
+  (2.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2003
+  (1.8ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2004
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2005
+  (0.4ms) COMMIT
2006
+ Migrating to CreateRoles (20180103162102)
2007
+  (5.8ms) BEGIN
2008
+  (18.5ms) 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)
2009
+  (2.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2010
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2011
+  (0.5ms) COMMIT
2012
+ Migrating to CreateAdmins (20180109210452)
2013
+  (6.4ms) BEGIN
2014
+  (18.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2015
+  (2.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2016
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2017
+  (0.4ms) COMMIT
2018
+ Migrating to CreateAssignments (20180215214227)
2019
+  (12.2ms) BEGIN
2020
+  (14.1ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2021
+  (2.8ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2022
+  (2.0ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2023
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2024
+  (0.5ms) COMMIT
2025
+ Migrating to CreateSubmissions (20180216171618)
2026
+  (5.8ms) BEGIN
2027
+  (18.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)
2028
+  (2.1ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2029
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2030
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2031
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2032
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2033
+  (0.4ms) COMMIT
2034
+ Migrating to CreateAccounts (20180220172559)
2035
+  (6.2ms) BEGIN
2036
+  (19.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)
2037
+  (2.4ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2038
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2039
+  (0.5ms) COMMIT
2040
+ Migrating to CreateAssignmentGroups (20180222163506)
2041
+  (6.3ms) BEGIN
2042
+  (18.5ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2043
+  (2.8ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2044
+  (2.0ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2045
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2046
+  (0.5ms) COMMIT
2047
+ Migrating to CreateContextModuleItems (20180411214055)
2048
+  (6.3ms) BEGIN
2049
+  (43.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)
2050
+  (2.1ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2051
+  (1.8ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2052
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411214055"]]
2053
+  (0.6ms) COMMIT
2054
+ Migrating to CreateContextModules (20180411215348)
2055
+  (6.1ms) BEGIN
2056
+  (18.5ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2057
+  (2.5ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2058
+  (2.3ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2059
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2060
+  (0.6ms) COMMIT
2061
+ 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]]
2062
+  (0.1ms) BEGIN
2063
+ SQL (0.6ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:54:05.543735"], ["updated_at", "2018-04-11 21:54:05.543735"]]
2064
+  (0.5ms) COMMIT
2065
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
2066
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2067
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2068
+  (1.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2069
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2070
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2071
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2072
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
2073
+  (216.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
2074
+  (217.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
2075
+  (20.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2076
+  (4.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2077
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
2078
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2079
+ Migrating to CreateEnrollments (20170905192509)
2080
+  (0.2ms) BEGIN
2081
+  (6.6ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2082
+  (2.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
2083
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
2084
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
2085
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
2086
+  (0.5ms) COMMIT
2087
+ Migrating to CreateTerms (20170906193506)
2088
+  (0.3ms) BEGIN
2089
+  (5.3ms) 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)
2090
+  (1.8ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
2091
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
2092
+  (0.5ms) COMMIT
2093
+ Migrating to CreateCourses (20170914181345)
2094
+  (0.2ms) BEGIN
2095
+  (5.5ms) 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)
2096
+  (1.8ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
2097
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
2098
+  (0.4ms) COMMIT
2099
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
2100
+  (0.2ms) BEGIN
2101
+  (5.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)
2102
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
2103
+  (0.5ms) COMMIT
2104
+ Migrating to CreateUsers (20170918221413)
2105
+  (0.3ms) BEGIN
2106
+  (6.6ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2107
+  (2.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
2108
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
2109
+  (0.5ms) COMMIT
2110
+ Migrating to CreateSections (20171107213207)
2111
+  (0.3ms) BEGIN
2112
+  (5.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)
2113
+  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
2114
+  (1.8ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
2115
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
2116
+  (0.4ms) COMMIT
2117
+ Migrating to CreateRoles (20180103162102)
2118
+  (0.2ms) BEGIN
2119
+  (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)
2120
+  (1.6ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
2121
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
2122
+  (0.5ms) COMMIT
2123
+ Migrating to CreateAdmins (20180109210452)
2124
+  (0.2ms) BEGIN
2125
+  (5.3ms) 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)
2126
+  (2.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
2127
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
2128
+  (0.4ms) COMMIT
2129
+ Migrating to CreateAssignments (20180215214227)
2130
+  (0.2ms) BEGIN
2131
+  (7.1ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
2132
+  (2.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
2133
+  (2.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
2134
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
2135
+  (0.4ms) COMMIT
2136
+ Migrating to CreateSubmissions (20180216171618)
2137
+  (0.3ms) BEGIN
2138
+  (12.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)
2139
+  (7.6ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
2140
+  (7.0ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
2141
+  (2.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
2142
+  (2.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
2143
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
2144
+  (0.4ms) COMMIT
2145
+ Migrating to CreateAccounts (20180220172559)
2146
+  (0.3ms) BEGIN
2147
+  (7.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)
2148
+  (2.1ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
2149
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
2150
+  (0.4ms) COMMIT
2151
+ Migrating to CreateAssignmentGroups (20180222163506)
2152
+  (0.3ms) BEGIN
2153
+  (6.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)
2154
+  (8.2ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
2155
+  (7.3ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
2156
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
2157
+  (5.8ms) COMMIT
2158
+ Migrating to CreateContextModules (20180411215348)
2159
+  (0.3ms) BEGIN
2160
+  (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)
2161
+  (2.1ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")
2162
+  (2.2ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
2163
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215348"]]
2164
+  (0.4ms) COMMIT
2165
+ Migrating to CreateContextModuleItems (20180411215633)
2166
+  (0.3ms) BEGIN
2167
+  (6.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)
2168
+  (2.2ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")
2169
+  (2.8ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
2170
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180411215633"]]
2171
+  (0.4ms) COMMIT
2172
+ ActiveRecord::InternalMetadata Load (1.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
2173
+  (0.3ms) BEGIN
2174
+ SQL (0.9ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-04-11 21:56:49.331149"], ["updated_at", "2018-04-11 21:56:49.331149"]]
2175
+  (5.7ms) COMMIT
2176
+  (0.4ms) SELECT pg_advisory_unlock(1438354376499275445)
2177
+  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC