canvas_sync 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +4 -1
  3. data/lib/canvas_sync.rb +3 -1
  4. data/lib/canvas_sync/generators/templates/models/assignment.rb +1 -0
  5. data/lib/canvas_sync/generators/templates/models/course.rb +1 -0
  6. data/lib/canvas_sync/generators/templates/models/create_submissions.rb +23 -0
  7. data/lib/canvas_sync/generators/templates/models/submission.rb +8 -0
  8. data/lib/canvas_sync/generators/templates/models/user.rb +1 -0
  9. data/lib/canvas_sync/jobs/sync_submissions_job.rb +28 -0
  10. data/lib/canvas_sync/processors/model_mappings.yml +28 -0
  11. data/lib/canvas_sync/processors/submissions_processor.rb +24 -0
  12. data/lib/canvas_sync/version.rb +1 -1
  13. data/spec/canvas_sync/{models/assignments_spec.rb → assignment_spec.rb} +6 -0
  14. data/spec/canvas_sync/canvas_sync_spec.rb +15 -0
  15. data/spec/canvas_sync/jobs/sync_submissions_job_spec.rb +17 -0
  16. data/spec/canvas_sync/models/course_spec.rb +5 -0
  17. data/spec/canvas_sync/models/user_spec.rb +6 -0
  18. data/spec/canvas_sync/processors/submissions_processor_spec.rb +13 -0
  19. data/spec/canvas_sync/submission_spec.rb +31 -0
  20. data/spec/dummy/app/models/assignment.rb +1 -0
  21. data/spec/dummy/app/models/course.rb +1 -0
  22. data/spec/dummy/app/models/submission.rb +14 -0
  23. data/spec/dummy/app/models/user.rb +1 -0
  24. data/spec/dummy/db/migrate/20180213235544_create_submissions.rb +29 -0
  25. data/spec/dummy/db/schema.rb +18 -1
  26. data/spec/dummy/db/test.sqlite3 +0 -0
  27. data/spec/dummy/log/development.log +389 -822
  28. data/spec/dummy/log/test.log +29886 -13563
  29. data/spec/factories/submission_factory.rb +9 -0
  30. data/spec/support/fixtures/reports/submissions.csv +3 -0
  31. metadata +23 -7
  32. data/spec/dummy/db/development.sqlite3 +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 0e20004cc4e924da4afb400f82f223abcf3b384afda17db07e66923528586f35
4
- data.tar.gz: d0b270232aa379fc899a19b20c659f71b6bbf211e2c0dea70f010f3b02a59678
2
+ SHA1:
3
+ metadata.gz: ffcf605b5474780a893dd4cb81c60d39568e5198
4
+ data.tar.gz: d2e32471b37b95667680a17c4907c42ce6965bdc
5
5
  SHA512:
6
- metadata.gz: cbe225d20cc4f43382d70c3594798f4cf69013ca3b9094a6180e0be0f71db98c97d924792bb9711fd4868f6b0afbf9a17ebed8e2c569c23fcf94a2d88a3caf7b
7
- data.tar.gz: f3d814550bbeac5deb732ca77f49942f703a6cd3ddca1351d53b794181c33527f6604007fed4dd3619c9af851cc0590f50a42d0c32f9872360c44868c686e72a
6
+ metadata.gz: 36943420c9986863bc1ae0f54b6cdf50ed284115c99d5bae5ba1421ed65dfada0adc4ba9943c4e6481e5e1eacec50407c103ce82d2bbb926535093d2ba5f0d92
7
+ data.tar.gz: 468ee9f16f45dd6cffb2779ea45a4f78b552c17ebb0de0cd4534711aec4c4f9f0a5ab5da38ae4f8cdf7eb812623c11e1591091319b55d2cbaafa834440429d8f
data/README.md CHANGED
@@ -26,7 +26,10 @@ bundle exec rake db:migrate
26
26
 
27
27
  For a list of currently supported models, see `CanvasSync::SUPPORTED_MODELS`.
28
28
 
29
- Additionally, your Canvas instance must have the "Proserv Provisioning Report" enabled. If you are syncing assignments the "Assignment Report" report must be enabled.
29
+ Additionally, your Canvas instance must have the "Proserv Provisioning Report" enabled.
30
+ - If you are syncing assignments the "Assignment Report" report must be enabled.
31
+ - If you are syncing submissions the "Student Submissions"
32
+ (proserv_student_submissions_csv) report must be enabled.
30
33
 
31
34
  ## Prerequisites
32
35
 
@@ -7,6 +7,7 @@ require "canvas_sync/jobs/report_checker"
7
7
  require "canvas_sync/jobs/report_processor_job"
8
8
  require "canvas_sync/jobs/sync_provisioning_report_job"
9
9
  require "canvas_sync/jobs/sync_assignments_job"
10
+ require "canvas_sync/jobs/sync_submissions_job"
10
11
  require "canvas_sync/jobs/sync_terms_job"
11
12
  require "canvas_sync/jobs/sync_users_job"
12
13
  require "canvas_sync/jobs/sync_roles_job"
@@ -16,7 +17,7 @@ Dir[File.dirname(__FILE__) + "/canvas_sync/importers/*.rb"].each { |file| requi
16
17
  Dir[File.dirname(__FILE__) + "/canvas_sync/generators/*.rb"].each { |file| require file }
17
18
 
18
19
  module CanvasSync
19
- SUPPORTED_MODELS = %w[users courses terms enrollments sections assignments roles admins xlist].freeze
20
+ SUPPORTED_MODELS = %w[users courses terms enrollments sections assignments submissions roles admins xlist].freeze
20
21
  SUPPORTED_LIVE_EVENTS = %w[course enrollment submission assignment user syllabus grade].freeze
21
22
 
22
23
  # Runs a standard provisioning sync job with no extra report types.
@@ -103,6 +104,7 @@ module CanvasSync
103
104
  )
104
105
 
105
106
  jobs.push(job: CanvasSync::Jobs::SyncAssignmentsJob.to_s, options: {}) if models.include?("assignments")
107
+ jobs.push(job: CanvasSync::Jobs::SyncSubmissionsJob.to_s, options: {}) if models.include?("submissions")
106
108
 
107
109
  global_options = { legacy_support: legacy_support }
108
110
  global_options[:account_id] = account_id if account_id.present?
@@ -3,4 +3,5 @@
3
3
  class Assignment < ApplicationRecord
4
4
  validates :canvas_assignment_id, uniqueness: true, presence: true
5
5
  belongs_to :context, polymorphic: true, optional: true, primary_key: :canvas_course_id
6
+ has_many :submissions, primary_key: :canvas_assignment_id, foreign_key: :canvas_assignment_id
6
7
  end
@@ -6,4 +6,5 @@ class Course < ApplicationRecord
6
6
  has_many :enrollments, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
7
7
  has_many :sections, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
8
8
  has_many :assignments, as: :context, primary_key: :canvas_course_id
9
+ has_many :submissions, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
9
10
  end
@@ -0,0 +1,23 @@
1
+ <%= autogenerated_migration_warning %>
2
+
3
+ class CreateSubmissions < ActiveRecord::Migration[5.1]
4
+ def change
5
+ create_table :submissions do |t|
6
+ t.bigint :canvas_submission_id, null: false
7
+ t.bigint :canvas_course_id
8
+ t.bigint :canvas_assignment_id
9
+ t.bigint :canvas_user_id
10
+ t.datetime :submitted_at
11
+ t.datetime :graded_at
12
+ t.integer :score
13
+ t.integer :points_possible
14
+
15
+ t.timestamps
16
+ end
17
+
18
+ add_index :submissions, :canvas_submission_id, unique: true
19
+ add_index :submissions, :canvas_assignment_id
20
+ add_index :submissions, :canvas_course_id
21
+ add_index :submissions, :canvas_user_id
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ <%= autogenerated_model_warning %>
2
+
3
+ class Submission < ApplicationRecord
4
+ validates :canvas_submission_id, uniqueness: true, presence: true
5
+ belongs_to :assignment, primary_key: :canvas_assignment_id, foreign_key: :canvas_assignment_id, optional: true
6
+ belongs_to :user, primary_key: :canvas_user_id, foreign_key: :canvas_user_id, optional: true
7
+ belongs_to :course, primary_key: :canvas_course_id, foreign_key: :canvas_course_id, optional: true
8
+ end
@@ -5,4 +5,5 @@ class User < ApplicationRecord
5
5
  has_many :enrollments, primary_key: :canvas_user_id, foreign_key: :canvas_user_id
6
6
  has_many :admins, foreign_key: :canvas_user_id, primary_key: :canvas_user_id
7
7
  has_many :admin_roles, through: :admins, source: :role
8
+ has_many :submissions, primary_key: :canvas_user_id, foreign_key: :canvas_user_id
8
9
  end
@@ -0,0 +1,28 @@
1
+ module CanvasSync
2
+ module Jobs
3
+ class SyncSubmissionsJob < ReportStarter
4
+ # Syncs Submissions
5
+ #
6
+ # Starts a report processor for the submission report
7
+ # (the proserv_student_submissions_csv report must be enabled)
8
+ #
9
+ # @param job_chain [Hash]
10
+ # @param options [Hash]
11
+ def perform(job_chain, _options)
12
+ report_params = if job_chain[:global_options][:term_id].present?
13
+ { enrollment_term_id: job_chain[:global_options][:term_id] }
14
+ else
15
+ {}
16
+ end
17
+
18
+ super(
19
+ job_chain,
20
+ "proserv_student_submissions_csv",
21
+ report_params,
22
+ CanvasSync::Processors::SubmissionsProcessor.to_s,
23
+ {},
24
+ )
25
+ end
26
+ end
27
+ end
28
+ end
@@ -186,3 +186,31 @@ assignments:
186
186
  grading_standard_id:
187
187
  database_column_name: grading_standard_id
188
188
  type: integer
189
+
190
+ submissions:
191
+ conflict_target: submission_id
192
+ report_columns:
193
+ submission_id:
194
+ database_column_name: :canvas_submission_id
195
+ type: integer
196
+ canvas_user_id:
197
+ database_column_name: :canvas_user_id
198
+ type: integer
199
+ canvas_course_id:
200
+ database_column_name: :canvas_course_id
201
+ type: integer
202
+ assignment_id:
203
+ database_column_name: :canvas_assignment_id
204
+ type: integer
205
+ submission_date:
206
+ database_column_name: submitted_at
207
+ type: datetime
208
+ graded_date:
209
+ database_column_name: graded_at
210
+ type: datetime
211
+ score:
212
+ database_column_name: score
213
+ type: integer
214
+ points_possible:
215
+ database_column_name: points_possible
216
+ type: integer
@@ -0,0 +1,24 @@
1
+ require_relative "./report_processor"
2
+
3
+ module CanvasSync
4
+ module Processors
5
+ # Processes a submissions report using the bulk importer.
6
+ #
7
+ # @param report_file_path [String]
8
+ # @param options [Hash]
9
+ class SubmissionsProcessor < ReportProcessor
10
+ def self.process(report_file_path, _options)
11
+ new(report_file_path)
12
+ end
13
+
14
+ def initialize(report_file_path)
15
+ CanvasSync::Importers::BulkImporter.import(
16
+ report_file_path,
17
+ mapping[:submissions][:report_columns],
18
+ Submission,
19
+ mapping[:submissions][:conflict_target].to_sym,
20
+ )
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.3.13".freeze
2
+ VERSION = "0.3.14".freeze
3
3
  end
@@ -9,6 +9,12 @@ RSpec.describe Assignment, type: :model do
9
9
  end
10
10
 
11
11
  describe "associations" do
12
+ it do
13
+ should have_many(:submissions)
14
+ .with_primary_key(:canvas_assignment_id)
15
+ .with_foreign_key(:canvas_assignment_id)
16
+ end
17
+
12
18
  describe "context" do
13
19
  let!(:other_course) { FactoryGirl.create(:course) }
14
20
  let!(:matching_course) { FactoryGirl.create(:course) }
@@ -121,6 +121,21 @@ RSpec.describe CanvasSync do
121
121
  )
122
122
  end
123
123
  end
124
+
125
+ context "we are syncing submissions" do
126
+ it "appends the SyncSubmissionsJob" do
127
+ chain = CanvasSync.default_provisioning_report_chain(%w[users enrollments submissions])
128
+
129
+ expect(chain).to eq(
130
+ jobs: [
131
+ { job: CanvasSync::Jobs::SyncTermsJob.to_s, options: {} },
132
+ { job: CanvasSync::Jobs::SyncProvisioningReportJob.to_s, options: { term_scope: nil, models: %w[users enrollments submissions] } },
133
+ { job: CanvasSync::Jobs::SyncSubmissionsJob.to_s, options: {} },
134
+ ],
135
+ global_options: { legacy_support: false },
136
+ )
137
+ end
138
+ end
124
139
  end
125
140
  end
126
141
  end
@@ -0,0 +1,17 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Jobs::SyncSubmissionsJob do
4
+ describe "#perform" do
5
+ context "a term id is in the global_options" do
6
+ it "enqueues a ReportStarter for the proserv_student_submissions_csv for the given term" do
7
+ expect_any_instance_of(Bearcat::Client).to receive(:start_report)
8
+ .with("self", "proserv_student_submissions_csv", enrollment_term_id: 1)
9
+ .and_return("id" => 1)
10
+
11
+ expect(CanvasSync::Jobs::ReportChecker).to receive(:set).and_call_original
12
+
13
+ CanvasSync::Jobs::SyncSubmissionsJob.perform_now({ jobs: [], global_options: { term_id: 1 } }, {})
14
+ end
15
+ end
16
+ end
17
+ end
@@ -31,5 +31,10 @@ RSpec.describe Course, type: :model do
31
31
  should have_many(:assignments)
32
32
  .with_primary_key(:canvas_course_id)
33
33
  end
34
+
35
+ it do
36
+ should have_many(:submissions)
37
+ .with_primary_key(:canvas_course_id)
38
+ end
34
39
  end
35
40
  end
@@ -14,5 +14,11 @@ RSpec.describe User, type: :model do
14
14
  .with_primary_key(:canvas_user_id)
15
15
  .with_foreign_key(:canvas_user_id)
16
16
  end
17
+
18
+ it do
19
+ should have_many(:submissions)
20
+ .with_primary_key(:canvas_user_id)
21
+ .with_foreign_key(:canvas_user_id)
22
+ end
17
23
  end
18
24
  end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe CanvasSync::Processors::SubmissionsProcessor do
4
+ let(:subject) { CanvasSync::Processors::SubmissionsProcessor }
5
+
6
+ describe "#process" do
7
+ it "inserts submissions" do
8
+ expect {
9
+ subject.process("spec/support/fixtures/reports/submissions.csv", {})
10
+ }.to change { Submission.count }.by(2)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,31 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Submission, type: :model do
4
+ let(:subject) { FactoryGirl.create(:submission) }
5
+
6
+ describe "validations" do
7
+ it { should validate_presence_of(:canvas_submission_id) }
8
+ it { should validate_uniqueness_of(:canvas_submission_id) }
9
+ end
10
+
11
+ describe 'associations' do
12
+ it do
13
+ should belong_to(:user)
14
+ .with_primary_key(:canvas_user_id)
15
+ .with_foreign_key(:canvas_user_id)
16
+ end
17
+
18
+ it do
19
+ should belong_to(:assignment)
20
+ .with_primary_key(:canvas_assignment_id)
21
+ .with_foreign_key(:canvas_assignment_id)
22
+ end
23
+
24
+ it do
25
+ should belong_to(:course)
26
+ .with_primary_key(:canvas_course_id)
27
+ .with_foreign_key(:canvas_course_id)
28
+ end
29
+ end
30
+
31
+ end
@@ -9,4 +9,5 @@
9
9
  class Assignment < ApplicationRecord
10
10
  validates :canvas_assignment_id, uniqueness: true, presence: true
11
11
  belongs_to :context, polymorphic: true, optional: true, primary_key: :canvas_course_id
12
+ has_many :submissions, primary_key: :canvas_assignment_id, foreign_key: :canvas_assignment_id
12
13
  end
@@ -12,4 +12,5 @@ class Course < ApplicationRecord
12
12
  has_many :enrollments, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
13
13
  has_many :sections, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
14
14
  has_many :assignments, as: :context, primary_key: :canvas_course_id
15
+ has_many :submissions, primary_key: :canvas_course_id, foreign_key: :canvas_course_id
15
16
  end
@@ -0,0 +1,14 @@
1
+ #
2
+ # AUTO GENERATED MODEL
3
+ # This model was auto generated by the CanvasSync Gem.
4
+ # You can customize it as needed, but make sure you test
5
+ # any changes you make to the auto generated methods.
6
+ #
7
+
8
+
9
+ class Submission < ApplicationRecord
10
+ validates :canvas_submission_id, uniqueness: true, presence: true
11
+ belongs_to :assignment, primary_key: :canvas_assignment_id, foreign_key: :canvas_assignment_id, optional: true
12
+ belongs_to :user, primary_key: :canvas_user_id, foreign_key: :canvas_user_id, optional: true
13
+ belongs_to :course, primary_key: :canvas_course_id, foreign_key: :canvas_course_id, optional: true
14
+ end
@@ -11,4 +11,5 @@ class User < ApplicationRecord
11
11
  has_many :enrollments, primary_key: :canvas_user_id, foreign_key: :canvas_user_id
12
12
  has_many :admins, foreign_key: :canvas_user_id, primary_key: :canvas_user_id
13
13
  has_many :admin_roles, through: :admins, source: :role
14
+ has_many :submissions, primary_key: :canvas_user_id, foreign_key: :canvas_user_id
14
15
  end
@@ -0,0 +1,29 @@
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 CreateSubmissions < ActiveRecord::Migration[5.1]
10
+ def change
11
+ create_table :submissions do |t|
12
+ t.bigint :canvas_submission_id, null: false
13
+ t.bigint :canvas_course_id
14
+ t.bigint :canvas_assignment_id
15
+ t.bigint :canvas_user_id
16
+ t.datetime :submitted_at
17
+ t.datetime :graded_at
18
+ t.integer :score
19
+ t.integer :points_possible
20
+
21
+ t.timestamps
22
+ end
23
+
24
+ add_index :submissions, :canvas_submission_id, unique: true
25
+ add_index :submissions, :canvas_assignment_id
26
+ add_index :submissions, :canvas_course_id
27
+ add_index :submissions, :canvas_user_id
28
+ end
29
+ 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: 20180212204530) do
13
+ ActiveRecord::Schema.define(version: 20180213235544) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "plpgsql"
@@ -127,6 +127,23 @@ ActiveRecord::Schema.define(version: 20180212204530) do
127
127
  t.index ["canvas_section_id"], name: "index_sections_on_canvas_section_id", unique: true
128
128
  end
129
129
 
130
+ create_table "submissions", force: :cascade do |t|
131
+ t.bigint "canvas_submission_id", null: false
132
+ t.bigint "canvas_course_id"
133
+ t.bigint "canvas_assignment_id"
134
+ t.bigint "canvas_user_id"
135
+ t.datetime "submitted_at"
136
+ t.datetime "graded_at"
137
+ t.integer "score"
138
+ t.integer "points_possible"
139
+ t.datetime "created_at", null: false
140
+ t.datetime "updated_at", null: false
141
+ t.index ["canvas_assignment_id"], name: "index_submissions_on_canvas_assignment_id"
142
+ t.index ["canvas_course_id"], name: "index_submissions_on_canvas_course_id"
143
+ t.index ["canvas_submission_id"], name: "index_submissions_on_canvas_submission_id", unique: true
144
+ t.index ["canvas_user_id"], name: "index_submissions_on_canvas_user_id"
145
+ end
146
+
130
147
  create_table "terms", force: :cascade do |t|
131
148
  t.integer "canvas_term_id", null: false
132
149
  t.string "name"
Binary file
@@ -1,982 +1,549 @@
1
-  (0.1ms) SELECT sqlite_version(*)
2
-  (7.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3
-  (1.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
4
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
- Migrating to CreateEnrollments (20170905192509)
6
-  (0.1ms) begin transaction
7
-  (0.4ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
8
-  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
9
-  (0.1ms)  SELECT sql
10
- FROM sqlite_master
11
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
12
- UNION ALL
13
- SELECT sql
14
- FROM sqlite_temp_master
15
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
16
- 
17
-  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
18
-  (0.1ms)  SELECT sql
19
- FROM sqlite_master
20
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
21
- UNION ALL
22
- SELECT sql
23
- FROM sqlite_temp_master
24
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
25
- 
26
-  (0.0ms)  SELECT sql
27
- FROM sqlite_master
28
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
29
- UNION ALL
30
- SELECT sql
31
- FROM sqlite_temp_master
32
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
33
- 
34
-  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
35
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
36
-  (0.9ms) commit transaction
37
- Migrating to CreateTerms (20170906193506)
38
-  (0.1ms) begin transaction
39
-  (0.4ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
40
-  (0.2ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
41
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
42
-  (1.6ms) commit transaction
43
- Migrating to CreateSections (20170906203438)
44
-  (0.1ms) begin transaction
45
-  (0.4ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
46
-  (0.2ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
47
-  (0.1ms)  SELECT sql
48
- FROM sqlite_master
49
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
50
- UNION ALL
51
- SELECT sql
52
- FROM sqlite_temp_master
53
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
54
- 
55
-  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
56
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
57
-  (1.2ms) commit transaction
58
- Migrating to CreateCourses (20170914181345)
59
-  (0.0ms) begin transaction
60
-  (0.3ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
61
-  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
62
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
63
-  (1.4ms) commit transaction
64
- Migrating to CreateUsers (20170918221413)
65
-  (0.1ms) begin transaction
66
-  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "login_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
67
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
68
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170918221413"]]
69
-  (1.0ms) commit transaction
70
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
71
-  (0.0ms) begin transaction
72
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-11-02 21:22:48.791273"], ["updated_at", "2017-11-02 21:22:48.791273"]]
73
-  (0.6ms) commit transaction
74
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
75
-  (0.1ms)  SELECT sql
76
- FROM sqlite_master
77
- WHERE name='index_courses_on_canvas_course_id' AND type='index'
78
- UNION ALL
79
- SELECT sql
80
- FROM sqlite_temp_master
81
- WHERE name='index_courses_on_canvas_course_id' AND type='index'
82
- 
83
-  (0.1ms)  SELECT sql
84
- FROM sqlite_master
85
- WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
86
- UNION ALL
87
- SELECT sql
88
- FROM sqlite_temp_master
89
- WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
90
- 
91
-  (0.1ms)  SELECT sql
92
- FROM sqlite_master
93
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
94
- UNION ALL
95
- SELECT sql
96
- FROM sqlite_temp_master
97
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
98
- 
99
-  (0.1ms)  SELECT sql
100
- FROM sqlite_master
101
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
102
- UNION ALL
103
- SELECT sql
104
- FROM sqlite_temp_master
105
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
106
- 
107
-  (0.1ms)  SELECT sql
108
- FROM sqlite_master
109
- WHERE name='index_sections_on_canvas_course_id' AND type='index'
110
- UNION ALL
111
- SELECT sql
112
- FROM sqlite_temp_master
113
- WHERE name='index_sections_on_canvas_course_id' AND type='index'
114
- 
115
-  (0.1ms)  SELECT sql
116
- FROM sqlite_master
117
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
118
- UNION ALL
119
- SELECT sql
120
- FROM sqlite_temp_master
121
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
122
- 
123
-  (0.1ms)  SELECT sql
124
- FROM sqlite_master
125
- WHERE name='index_terms_on_canvas_term_id' AND type='index'
126
- UNION ALL
127
- SELECT sql
128
- FROM sqlite_temp_master
129
- WHERE name='index_terms_on_canvas_term_id' AND type='index'
130
- 
131
-  (0.1ms)  SELECT sql
132
- FROM sqlite_master
133
- WHERE name='index_users_on_canvas_user_id' AND type='index'
134
- UNION ALL
135
- SELECT sql
136
- FROM sqlite_temp_master
137
- WHERE name='index_users_on_canvas_user_id' AND type='index'
138
- 
139
-  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
140
-  (0.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
141
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
142
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
143
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
144
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
145
-  (0.1ms) SELECT sqlite_version(*)
146
-  (4.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
147
-  (1.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
148
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
149
- Migrating to CreateEnrollments (20170905192509)
150
-  (0.1ms) begin transaction
151
-  (0.4ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
152
-  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
153
-  (0.1ms)  SELECT sql
154
- FROM sqlite_master
155
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
156
- UNION ALL
157
- SELECT sql
158
- FROM sqlite_temp_master
159
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
160
- 
161
-  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
162
-  (0.1ms)  SELECT sql
163
- FROM sqlite_master
164
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
165
- UNION ALL
166
- SELECT sql
167
- FROM sqlite_temp_master
168
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
169
- 
170
-  (0.1ms)  SELECT sql
171
- FROM sqlite_master
172
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
173
- UNION ALL
174
- SELECT sql
175
- FROM sqlite_temp_master
176
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
177
- 
178
-  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
179
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
180
-  (0.7ms) commit transaction
181
- Migrating to CreateTerms (20170906193506)
182
-  (0.0ms) begin transaction
183
-  (0.3ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
184
-  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
185
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
186
-  (0.5ms) commit transaction
187
- Migrating to CreateSections (20170906203438)
188
-  (0.0ms) begin transaction
189
-  (0.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
190
-  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
191
-  (0.1ms)  SELECT sql
192
- FROM sqlite_master
193
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
194
- UNION ALL
195
- SELECT sql
196
- FROM sqlite_temp_master
197
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
198
- 
199
-  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
200
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
201
-  (1.3ms) commit transaction
202
- Migrating to CreateCourses (20170914181345)
203
-  (0.1ms) begin transaction
204
-  (0.4ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
205
-  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
206
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
207
-  (1.0ms) commit transaction
208
- Migrating to CreateUsers (20170918221413)
209
-  (0.1ms) begin transaction
210
-  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "login_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
211
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
212
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170918221413"]]
213
-  (0.7ms) commit transaction
214
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
215
-  (0.0ms) begin transaction
216
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-11-02 21:23:44.534031"], ["updated_at", "2017-11-02 21:23:44.534031"]]
217
-  (0.6ms) commit transaction
218
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
219
-  (0.1ms)  SELECT sql
220
- FROM sqlite_master
221
- WHERE name='index_courses_on_canvas_course_id' AND type='index'
222
- UNION ALL
223
- SELECT sql
224
- FROM sqlite_temp_master
225
- WHERE name='index_courses_on_canvas_course_id' AND type='index'
226
- 
227
-  (0.1ms)  SELECT sql
228
- FROM sqlite_master
229
- WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
230
- UNION ALL
231
- SELECT sql
232
- FROM sqlite_temp_master
233
- WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
234
- 
235
-  (0.1ms)  SELECT sql
236
- FROM sqlite_master
237
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
238
- UNION ALL
239
- SELECT sql
240
- FROM sqlite_temp_master
241
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
242
- 
243
-  (0.1ms)  SELECT sql
244
- FROM sqlite_master
245
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
246
- UNION ALL
247
- SELECT sql
248
- FROM sqlite_temp_master
249
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
250
- 
251
-  (0.1ms)  SELECT sql
252
- FROM sqlite_master
253
- WHERE name='index_sections_on_canvas_course_id' AND type='index'
254
- UNION ALL
255
- SELECT sql
256
- FROM sqlite_temp_master
257
- WHERE name='index_sections_on_canvas_course_id' AND type='index'
258
- 
259
-  (0.1ms)  SELECT sql
260
- FROM sqlite_master
261
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
262
- UNION ALL
263
- SELECT sql
264
- FROM sqlite_temp_master
265
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
266
- 
267
-  (0.1ms)  SELECT sql
268
- FROM sqlite_master
269
- WHERE name='index_terms_on_canvas_term_id' AND type='index'
270
- UNION ALL
271
- SELECT sql
272
- FROM sqlite_temp_master
273
- WHERE name='index_terms_on_canvas_term_id' AND type='index'
274
- 
275
-  (0.1ms)  SELECT sql
276
- FROM sqlite_master
277
- WHERE name='index_users_on_canvas_user_id' AND type='index'
278
- UNION ALL
279
- SELECT sql
280
- FROM sqlite_temp_master
281
- WHERE name='index_users_on_canvas_user_id' AND type='index'
282
- 
283
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
284
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
285
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
286
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
287
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
288
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
289
-  (0.1ms) SELECT sqlite_version(*)
290
-  (6.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
291
-  (1.4ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
292
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
293
- Migrating to CreateEnrollments (20170905192509)
294
-  (0.0ms) begin transaction
295
-  (0.4ms) CREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
296
-  (0.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
297
-  (0.1ms)  SELECT sql
298
- FROM sqlite_master
299
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
300
- UNION ALL
301
- SELECT sql
302
- FROM sqlite_temp_master
303
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
304
- 
305
-  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
306
-  (0.1ms)  SELECT sql
307
- FROM sqlite_master
308
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
309
- UNION ALL
310
- SELECT sql
311
- FROM sqlite_temp_master
312
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
313
- 
314
-  (0.1ms)  SELECT sql
315
- FROM sqlite_master
316
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
317
- UNION ALL
318
- SELECT sql
319
- FROM sqlite_temp_master
320
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
321
- 
322
-  (0.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
323
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170905192509"]]
324
-  (1.3ms) commit transaction
325
- Migrating to CreateTerms (20170906193506)
326
-  (0.0ms) begin transaction
327
-  (0.3ms) CREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
328
-  (0.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
329
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906193506"]]
330
-  (1.5ms) commit transaction
331
- Migrating to CreateSections (20170906203438)
332
-  (0.1ms) begin transaction
333
-  (0.3ms) CREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
334
-  (0.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
335
-  (0.1ms)  SELECT sql
336
- FROM sqlite_master
337
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
338
- UNION ALL
339
- SELECT sql
340
- FROM sqlite_temp_master
341
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
342
- 
343
-  (0.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
344
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170906203438"]]
345
-  (1.3ms) commit transaction
346
- Migrating to CreateCourses (20170914181345)
347
-  (0.1ms) begin transaction
348
-  (0.4ms) CREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
349
-  (0.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
350
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170914181345"]]
351
-  (1.1ms) commit transaction
352
- Migrating to CreateCanvasSyncJobLog (20170915210836)
353
-  (0.1ms) begin transaction
354
-  (0.4ms) CREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "status" varchar, "metadata" text, "job_arguments" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
355
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170915210836"]]
356
-  (1.0ms) commit transaction
357
- Migrating to CreateUsers (20170918221413)
358
-  (0.1ms) begin transaction
359
-  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "login_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
360
-  (0.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
361
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170918221413"]]
362
-  (0.9ms) commit transaction
363
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
364
-  (0.0ms) begin transaction
365
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2017-11-02 21:24:18.830692"], ["updated_at", "2017-11-02 21:24:18.830692"]]
366
-  (0.8ms) commit transaction
367
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
368
-  (0.1ms)  SELECT sql
369
- FROM sqlite_master
370
- WHERE name='index_courses_on_canvas_course_id' AND type='index'
371
- UNION ALL
372
- SELECT sql
373
- FROM sqlite_temp_master
374
- WHERE name='index_courses_on_canvas_course_id' AND type='index'
375
- 
376
-  (0.5ms)  SELECT sql
377
- FROM sqlite_master
378
- WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
379
- UNION ALL
380
- SELECT sql
381
- FROM sqlite_temp_master
382
- WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
383
- 
384
-  (0.1ms)  SELECT sql
385
- FROM sqlite_master
386
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
387
- UNION ALL
388
- SELECT sql
389
- FROM sqlite_temp_master
390
- WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
391
- 
392
-  (0.1ms)  SELECT sql
393
- FROM sqlite_master
394
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
395
- UNION ALL
396
- SELECT sql
397
- FROM sqlite_temp_master
398
- WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
399
- 
400
-  (0.1ms)  SELECT sql
401
- FROM sqlite_master
402
- WHERE name='index_sections_on_canvas_course_id' AND type='index'
403
- UNION ALL
404
- SELECT sql
405
- FROM sqlite_temp_master
406
- WHERE name='index_sections_on_canvas_course_id' AND type='index'
407
- 
408
-  (0.1ms)  SELECT sql
409
- FROM sqlite_master
410
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
411
- UNION ALL
412
- SELECT sql
413
- FROM sqlite_temp_master
414
- WHERE name='index_sections_on_canvas_section_id' AND type='index'
415
- 
416
-  (0.1ms)  SELECT sql
417
- FROM sqlite_master
418
- WHERE name='index_terms_on_canvas_term_id' AND type='index'
419
- UNION ALL
420
- SELECT sql
421
- FROM sqlite_temp_master
422
- WHERE name='index_terms_on_canvas_term_id' AND type='index'
423
- 
424
-  (0.1ms)  SELECT sql
425
- FROM sqlite_master
426
- WHERE name='index_users_on_canvas_user_id' AND type='index'
427
- UNION ALL
428
- SELECT sql
429
- FROM sqlite_temp_master
430
- WHERE name='index_users_on_canvas_user_id' AND type='index'
431
- 
432
-  (1.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
433
-  (225.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
434
-  (0.1ms) DROP DATABASE IF EXISTS "canvas_sync_development"
435
-  (0.2ms) DROP DATABASE IF EXISTS "canvas_sync_test"
436
-  (25.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
437
-  (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)
438
-  (0.7ms) SELECT pg_try_advisory_lock(1438354376499275445)
1
+  (16.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
2
+  (19.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)
3
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
439
4
   (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
440
5
  Migrating to CreateEnrollments (20170905192509)
441
-  (0.1ms) BEGIN
442
-  (7.8ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
443
-  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
444
-  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
445
-  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
6
+  (0.3ms) BEGIN
7
+  (25.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)
8
+  (1.8ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
9
+  (4.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
10
+  (2.0ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
446
11
  SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
447
-  (0.4ms) COMMIT
12
+  (0.3ms) COMMIT
448
13
  Migrating to CreateTerms (20170906193506)
449
-  (0.2ms) BEGIN
450
-  (6.0ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
14
+  (0.3ms) BEGIN
15
+  (4.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)
451
16
   (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
452
17
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
453
-  (0.3ms) COMMIT
18
+  (0.7ms) COMMIT
454
19
  Migrating to CreateCourses (20170914181345)
455
-  (0.2ms) BEGIN
456
-  (4.4ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
20
+  (0.1ms) BEGIN
21
+  (4.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)
457
22
   (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
458
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
459
-  (0.4ms) COMMIT
23
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
24
+  (0.2ms) COMMIT
460
25
  Migrating to CreateCanvasSyncJobLog (20170915210836)
461
-  (0.2ms) BEGIN
462
-  (4.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)
463
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
464
-  (0.3ms) COMMIT
26
+  (8.2ms) BEGIN
27
+  (41.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)
28
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
29
+  (0.4ms) COMMIT
465
30
  Migrating to CreateUsers (20170918221413)
466
31
   (0.2ms) BEGIN
467
-  (4.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)
468
-  (1.8ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
32
+  (4.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)
33
+  (1.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
469
34
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
470
-  (1.1ms) COMMIT
35
+  (1.2ms) COMMIT
471
36
  Migrating to CreateSections (20171107213207)
472
-  (0.3ms) BEGIN
473
-  (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)
474
-  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
475
-  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
37
+  (0.1ms) BEGIN
38
+  (4.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)
39
+  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
40
+  (1.4ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
476
41
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
477
42
   (0.3ms) COMMIT
478
43
  Migrating to CreateRoles (20180103162102)
479
-  (0.2ms) BEGIN
480
-  (4.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)
481
-  (1.3ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
44
+  (10.7ms) BEGIN
45
+  (16.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)
46
+  (1.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
482
47
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
483
-  (1.1ms) COMMIT
48
+  (0.3ms) COMMIT
49
+ ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
50
+  (0.1ms) BEGIN
51
+ 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-01-03 16:29:37.282741"], ["updated_at", "2018-01-03 16:29:37.282741"]]
52
+  (0.2ms) COMMIT
53
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
54
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
55
+  (0.8ms) SELECT pg_try_advisory_lock(1438354376499275445)
56
+  (11.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
484
57
  Migrating to CreateAdmins (20180109210452)
485
58
   (0.2ms) BEGIN
486
-  (4.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)
487
-  (1.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
59
+  (23.4ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role" character varying, "canvas_role_id" bigint NOT NULL, "user" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
60
+  (1.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
488
61
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
489
-  (0.3ms) COMMIT
490
- Migrating to CreateAssignments (20180212180400)
491
-  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
492
-  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
493
-  (1.4ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
494
-  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
495
-  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
496
- Migrating to CreateAssignments (20180212180536)
497
-  (0.2ms) BEGIN
498
-  (0.1ms) ROLLBACK
62
+  (1.7ms) COMMIT
63
+ ActiveRecord::InternalMetadata Load (2.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
64
+  (0.1ms) BEGIN
65
+  (0.1ms) COMMIT
499
66
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
500
-  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
501
-  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
502
- Migrating to CreateAssignments (20180212180536)
503
-  (0.2ms) BEGIN
504
-  (0.2ms) ROLLBACK
505
-  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
506
-  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
507
-  (0.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
67
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
68
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
508
69
   (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
509
-  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
510
- Migrating to CreateAssignments (20180212180801)
511
-  (0.1ms) BEGIN
512
-  (16.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" integer, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
513
-  (1.8ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
514
-  (5.1ms) ROLLBACK
515
-  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
516
-  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
517
-  (0.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
518
-  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
519
-  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
520
- Migrating to CreateAssignments (20180212180855)
521
-  (0.2ms) BEGIN
522
-  (9.6ms) 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" integer, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
523
-  (2.0ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
524
-  (2.0ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
525
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212180855"]]
526
-  (1.3ms) COMMIT
527
- 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]]
70
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
71
+ Migrating to CreateAdmins (20180109210452)
528
72
   (0.2ms) BEGIN
529
- 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-02-12 18:09:09.560201"], ["updated_at", "2018-02-12 18:09:09.560201"]]
530
-  (0.4ms) COMMIT
73
+  (3.1ms) DROP INDEX "index_admins_on_canvas_admin_id"
74
+  (3.3ms) DROP TABLE "admins"
75
+ SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20180109210452"]]
76
+  (6.0ms) COMMIT
77
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
78
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
79
+  (0.1ms) SELECT pg_try_advisory_lock(1438354376499275445)
80
+  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
81
+ Migrating to CreateAdmins (20180109210452)
82
+  (0.1ms) BEGIN
83
+  (10.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role" character varying, "canvas_role_id" bigint NOT NULL, "user" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
84
+  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
85
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
86
+  (1.0ms) COMMIT
87
+ 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]]
88
+  (0.1ms) BEGIN
89
+  (0.1ms) COMMIT
531
90
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
532
91
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
533
-  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
534
-  (14.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
92
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
93
+  (0.1ms) SELECT pg_try_advisory_lock(1438354376499275445)
535
94
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
536
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
95
+ Migrating to CreateAdmins (20180109210452)
96
+  (0.1ms) BEGIN
97
+  (0.5ms) DROP INDEX "index_admins_on_canvas_admin_id"
98
+  (0.7ms) DROP TABLE "admins"
99
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20180109210452"]]
100
+  (22.8ms) COMMIT
101
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
537
102
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
538
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
539
-  (135.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"
540
-  (202.2ms) DROP DATABASE IF EXISTS "canvas_sync_test"
541
-  (23.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
542
-  (14.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
543
-  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
544
-  (2.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
545
- Migrating to CreateEnrollments (20170905192509)
546
-  (0.2ms) BEGIN
547
-  (18.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)
548
-  (2.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
549
-  (7.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
550
-  (8.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
551
- SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
552
-  (4.6ms) COMMIT
553
- Migrating to CreateTerms (20170906193506)
554
-  (0.3ms) BEGIN
555
-  (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)
556
-  (1.9ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
557
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
558
-  (0.6ms) COMMIT
559
- Migrating to CreateCourses (20170914181345)
560
-  (0.3ms) BEGIN
561
-  (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)
562
-  (7.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
563
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
564
-  (6.0ms) COMMIT
565
- Migrating to CreateCanvasSyncJobLog (20170915210836)
566
-  (0.3ms) BEGIN
567
-  (5.9ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
568
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
569
-  (0.4ms) COMMIT
570
- Migrating to CreateUsers (20170918221413)
571
-  (0.3ms) BEGIN
572
-  (6.3ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
573
-  (19.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
574
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
575
-  (5.5ms) COMMIT
576
- Migrating to CreateSections (20171107213207)
577
-  (0.3ms) BEGIN
578
-  (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)
579
-  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
580
-  (2.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
581
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
582
-  (0.5ms) COMMIT
583
- Migrating to CreateRoles (20180103162102)
584
-  (0.3ms) BEGIN
585
-  (17.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)
586
-  (35.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
587
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
588
-  (10.7ms) COMMIT
103
+  (0.1ms) SELECT pg_try_advisory_lock(1438354376499275445)
104
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
589
105
  Migrating to CreateAdmins (20180109210452)
590
-  (5.9ms) BEGIN
591
-  (6.6ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
592
-  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
106
+  (0.1ms) BEGIN
107
+  (9.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)
108
+  (1.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
593
109
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
594
-  (0.4ms) COMMIT
595
- Migrating to CreateAssignments (20180212180855)
596
-  (0.3ms) BEGIN
597
-  (6.5ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" integer, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
598
-  (7.5ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
599
-  (13.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
600
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212180855"]]
601
-  (5.0ms) COMMIT
602
- ActiveRecord::InternalMetadata Load (1.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
603
-  (0.1ms) BEGIN
604
- 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-02-12 19:11:44.464506"], ["updated_at", "2018-02-12 19:11:44.464506"]]
605
-  (0.4ms) COMMIT
110
+  (1.0ms) COMMIT
111
+ 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]]
112
+  (0.1ms) BEGIN
113
+  (0.1ms) COMMIT
114
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
115
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
116
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
117
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
118
+ 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]]
119
+  (0.1ms) BEGIN
120
+  (0.1ms) COMMIT
121
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
122
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
123
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
124
+  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
125
+ ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
126
+  (0.1ms) BEGIN
127
+  (0.1ms) COMMIT
606
128
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
607
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
608
-  (18.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
609
-  (8.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
610
129
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
611
-  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
130
+  (2.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
131
+  (8.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
612
132
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
613
133
   (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
614
-  (203.2ms) DROP DATABASE IF EXISTS "canvas_sync_development"
615
-  (197.2ms) DROP DATABASE IF EXISTS "canvas_sync_test"
616
-  (16.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
617
-  (3.7ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
134
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
135
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
136
+  (165.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"
137
+  (127.0ms) DROP DATABASE IF EXISTS "canvas_sync_test"
138
+  (28.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
139
+  (5.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)
618
140
   (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
619
141
   (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
620
142
  Migrating to CreateEnrollments (20170905192509)
621
143
   (0.1ms) BEGIN
622
-  (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)
623
-  (1.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
624
-  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
625
-  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
626
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
627
-  (0.5ms) COMMIT
144
+  (5.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)
145
+  (1.5ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
146
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
147
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
148
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
149
+  (0.4ms) COMMIT
628
150
  Migrating to CreateTerms (20170906193506)
629
-  (0.3ms) BEGIN
630
-  (4.8ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
631
-  (1.6ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
151
+  (0.2ms) BEGIN
152
+  (3.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)
153
+  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
632
154
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
633
155
   (0.3ms) COMMIT
634
156
  Migrating to CreateCourses (20170914181345)
635
-  (0.2ms) BEGIN
636
-  (5.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)
637
-  (1.6ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
157
+  (0.1ms) BEGIN
158
+  (3.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)
159
+  (1.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
638
160
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
639
-  (0.5ms) COMMIT
161
+  (0.3ms) COMMIT
640
162
  Migrating to CreateCanvasSyncJobLog (20170915210836)
641
-  (6.0ms) BEGIN
642
-  (22.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)
643
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
644
-  (0.5ms) COMMIT
163
+  (0.2ms) BEGIN
164
+  (4.0ms) 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)
165
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
166
+  (0.3ms) COMMIT
645
167
  Migrating to CreateUsers (20170918221413)
646
168
   (0.2ms) BEGIN
647
-  (5.1ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
648
-  (1.6ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
169
+  (4.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)
170
+  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
649
171
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
650
-  (0.4ms) COMMIT
172
+  (0.3ms) COMMIT
651
173
  Migrating to CreateSections (20171107213207)
652
-  (0.2ms) BEGIN
653
-  (5.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)
654
-  (1.7ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
655
-  (1.6ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
656
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
657
-  (0.4ms) COMMIT
174
+  (0.1ms) BEGIN
175
+  (4.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
176
+  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
177
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
178
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
179
+  (0.2ms) COMMIT
658
180
  Migrating to CreateRoles (20180103162102)
659
-  (0.2ms) BEGIN
660
-  (4.8ms) 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)
661
-  (1.7ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
662
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
663
-  (0.4ms) COMMIT
181
+  (0.1ms) BEGIN
182
+  (3.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)
183
+  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
184
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
185
+  (0.3ms) COMMIT
664
186
  Migrating to CreateAdmins (20180109210452)
665
187
   (0.2ms) BEGIN
666
-  (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)
667
-  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
188
+  (3.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)
189
+  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
668
190
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
669
-  (0.4ms) COMMIT
670
- Migrating to CreateAssignments (20180212180855)
191
+  (0.3ms) COMMIT
192
+ Migrating to CreateAssignments (20180212204530)
671
193
   (0.2ms) BEGIN
672
-  (5.2ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" integer, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
673
-  (1.7ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
674
-  (1.8ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
675
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212180855"]]
676
-  (0.5ms) COMMIT
677
- ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
194
+  (4.5ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
195
+  (1.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
196
+  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
197
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]
198
+  (0.3ms) COMMIT
199
+ Migrating to CreateSubmissions (20180213232302)
678
200
   (0.1ms) BEGIN
679
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-12 19:22:31.493969"], ["updated_at", "2018-02-12 19:22:31.493969"]]
201
+  (2.3ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint NOT NULL, "canvas_assignment_id" bigint NOT NULL, "canvas_user_id" bigint NOT NULL, "submission_date" timestamp, "graded_date" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
202
+  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
203
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
204
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
205
+  (1.9ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
206
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213232302"]]
680
207
   (0.4ms) COMMIT
681
-  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
208
+ ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
209
+  (0.1ms) BEGIN
210
+ SQL (0.2ms) 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-02-13 23:23:14.681205"], ["updated_at", "2018-02-13 23:23:14.681205"]]
211
+  (0.3ms) COMMIT
212
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
682
213
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
683
214
   (2.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
684
-  (8.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
215
+  (15.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
216
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
217
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
685
218
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
686
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
687
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
688
-  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
689
-  (204.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
690
-  (141.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
691
-  (17.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
692
-  (4.0ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
219
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
220
+  (138.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
221
+  (126.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"
222
+  (14.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
223
+  (4.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)
693
224
   (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
694
225
   (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
695
226
  Migrating to CreateEnrollments (20170905192509)
696
227
   (0.1ms) BEGIN
697
-  (23.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)
698
-  (1.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
699
-  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
700
-  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
701
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
702
-  (0.4ms) COMMIT
228
+  (15.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)
229
+  (5.2ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
230
+  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
231
+  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
232
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
233
+  (0.3ms) COMMIT
703
234
  Migrating to CreateTerms (20170906193506)
704
235
   (0.2ms) BEGIN
705
-  (4.7ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
706
-  (1.6ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
236
+  (4.0ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
237
+  (1.2ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
707
238
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
708
-  (0.4ms) COMMIT
239
+  (0.3ms) COMMIT
709
240
  Migrating to CreateCourses (20170914181345)
710
241
   (0.2ms) BEGIN
711
-  (4.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)
712
-  (2.1ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
713
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
714
-  (0.5ms) COMMIT
242
+  (3.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)
243
+  (1.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
244
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
245
+  (0.3ms) COMMIT
715
246
  Migrating to CreateCanvasSyncJobLog (20170915210836)
716
247
   (6.1ms) BEGIN
717
-  (17.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)
718
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
719
-  (0.5ms) COMMIT
248
+  (21.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)
249
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
250
+  (0.4ms) COMMIT
720
251
  Migrating to CreateUsers (20170918221413)
721
252
   (0.2ms) BEGIN
722
253
   (5.1ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
723
-  (1.6ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
254
+  (1.4ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
724
255
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
725
-  (0.4ms) COMMIT
256
+  (0.3ms) COMMIT
726
257
  Migrating to CreateSections (20171107213207)
727
-  (0.2ms) BEGIN
728
-  (4.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
729
-  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
730
-  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
731
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
732
-  (0.5ms) COMMIT
258
+  (0.1ms) BEGIN
259
+  (3.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)
260
+  (1.3ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
261
+  (1.7ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
262
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
263
+  (0.3ms) COMMIT
733
264
  Migrating to CreateRoles (20180103162102)
734
265
   (0.2ms) BEGIN
735
-  (4.4ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
736
-  (1.5ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
266
+  (4.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)
267
+  (1.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
737
268
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
738
-  (0.4ms) COMMIT
269
+  (0.2ms) COMMIT
739
270
  Migrating to CreateAdmins (20180109210452)
740
-  (0.2ms) BEGIN
741
-  (4.6ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
742
-  (1.5ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
743
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
744
-  (0.4ms) COMMIT
745
- Migrating to CreateAssignments (20180212180855)
746
-  (0.2ms) BEGIN
747
-  (5.6ms) 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" integer, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
748
-  (1.7ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
749
-  (1.6ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
750
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212180855"]]
751
-  (0.4ms) COMMIT
752
- ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
753
271
   (0.1ms) BEGIN
754
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-12 19:38:47.599194"], ["updated_at", "2018-02-12 19:38:47.599194"]]
755
-  (0.4ms) COMMIT
272
+  (4.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)
273
+  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
274
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
275
+  (0.2ms) COMMIT
276
+ Migrating to CreateAssignments (20180212204530)
277
+  (0.1ms) BEGIN
278
+  (4.3ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
279
+  (1.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
280
+  (1.3ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
281
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]
282
+  (0.3ms) COMMIT
283
+ Migrating to CreateSubmissions (20180213234230)
284
+  (0.1ms) BEGIN
285
+  (2.6ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint NOT NULL, "canvas_assignment_id" bigint NOT NULL, "canvas_user_id" bigint NOT NULL, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
286
+  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
287
+  (1.5ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
288
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
289
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
290
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213234230"]]
291
+  (0.4ms) COMMIT
292
+ 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]]
293
+  (0.1ms) BEGIN
294
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:42:42.931090"], ["updated_at", "2018-02-13 23:42:42.931090"]]
295
+  (0.3ms) COMMIT
756
296
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
757
297
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
758
-  (2.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
759
-  (9.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
298
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
299
+  (0.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
760
300
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
761
-  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
301
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
762
302
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
763
303
   (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
764
-  (205.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"
765
-  (207.3ms) DROP DATABASE IF EXISTS "canvas_sync_test"
766
-  (19.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
767
-  (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)
304
+  (140.2ms) DROP DATABASE IF EXISTS "canvas_sync_development"
305
+  (126.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
306
+  (19.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
307
+  (4.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
768
308
   (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
769
-  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
309
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
770
310
  Migrating to CreateEnrollments (20170905192509)
771
311
   (0.1ms) BEGIN
772
-  (18.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)
773
-  (2.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
774
-  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
775
-  (2.2ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
776
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
777
-  (0.6ms) COMMIT
312
+  (16.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)
313
+  (4.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
314
+  (7.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
315
+  (7.6ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
316
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
317
+  (5.9ms) COMMIT
778
318
  Migrating to CreateTerms (20170906193506)
779
-  (0.3ms) BEGIN
780
-  (7.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)
781
-  (2.2ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
782
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
783
-  (0.6ms) COMMIT
319
+  (9.7ms) BEGIN
320
+  (5.6ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
321
+  (1.8ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
322
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
323
+  (0.3ms) COMMIT
784
324
  Migrating to CreateCourses (20170914181345)
785
325
   (0.2ms) BEGIN
786
-  (6.0ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
787
-  (2.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
788
- SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
789
-  (0.5ms) COMMIT
326
+  (4.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)
327
+  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
328
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
329
+  (0.3ms) COMMIT
790
330
  Migrating to CreateCanvasSyncJobLog (20170915210836)
791
-  (11.0ms) BEGIN
792
-  (17.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)
331
+  (5.7ms) BEGIN
332
+  (17.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
793
333
  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
794
-  (0.6ms) COMMIT
334
+  (0.5ms) COMMIT
795
335
  Migrating to CreateUsers (20170918221413)
796
-  (0.3ms) BEGIN
797
-  (6.4ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
798
-  (2.0ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
336
+  (0.2ms) BEGIN
337
+  (5.1ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
338
+  (1.7ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
799
339
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
800
-  (0.4ms) COMMIT
340
+  (0.3ms) COMMIT
801
341
  Migrating to CreateSections (20171107213207)
802
-  (0.9ms) BEGIN
803
-  (5.8ms) 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)
804
-  (1.9ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
805
-  (1.7ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
342
+  (0.2ms) BEGIN
343
+  (3.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
344
+  (1.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
345
+  (1.4ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
806
346
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
807
-  (0.4ms) COMMIT
347
+  (0.3ms) COMMIT
808
348
  Migrating to CreateRoles (20180103162102)
809
349
   (0.2ms) BEGIN
810
-  (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)
811
-  (1.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
350
+  (3.8ms) 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)
351
+  (1.6ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
812
352
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
813
-  (0.4ms) COMMIT
353
+  (0.3ms) COMMIT
814
354
  Migrating to CreateAdmins (20180109210452)
815
-  (0.3ms) BEGIN
816
-  (5.4ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
817
-  (1.7ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
818
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
819
-  (0.5ms) COMMIT
820
- Migrating to CreateAssignments (20180212194212)
821
355
   (0.2ms) BEGIN
822
-  (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, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
823
-  (2.0ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
824
-  (2.4ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
825
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212194212"]]
826
-  (0.5ms) COMMIT
827
- ActiveRecord::InternalMetadata Load (1.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
356
+  (4.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)
357
+  (1.6ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
358
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
359
+  (0.3ms) COMMIT
360
+ Migrating to CreateAssignments (20180212204530)
828
361
   (0.2ms) BEGIN
829
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-12 19:42:28.390152"], ["updated_at", "2018-02-12 19:42:28.390152"]]
830
-  (0.4ms) COMMIT
362
+  (4.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, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
363
+  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
364
+  (1.3ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
365
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]
366
+  (0.3ms) COMMIT
367
+ Migrating to CreateSubmissions (20180213235544)
368
+  (0.2ms) BEGIN
369
+  (2.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, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
370
+  (1.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
371
+  (1.5ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
372
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
373
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
374
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
375
+  (0.3ms) COMMIT
376
+ ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
377
+  (0.1ms) BEGIN
378
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:55:56.536565"], ["updated_at", "2018-02-13 23:55:56.536565"]]
379
+  (0.3ms) COMMIT
831
380
   (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
832
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
833
-  (4.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
834
-  (8.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
835
-  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
836
-  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
837
381
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
382
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
383
+  (1.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
384
+  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
838
385
   (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
839
-  (198.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
840
-  (138.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
841
-  (17.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
842
-  (3.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
386
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
387
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
388
+  (125.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
389
+  (128.6ms) DROP DATABASE IF EXISTS "canvas_sync_test"
390
+  (13.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
391
+  (4.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)
843
392
   (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
844
-  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
393
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
845
394
  Migrating to CreateEnrollments (20170905192509)
846
395
   (0.1ms) BEGIN
847
-  (17.9ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
848
-  (6.1ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
849
-  (2.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
850
-  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
851
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
852
-  (0.4ms) COMMIT
396
+  (4.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)
397
+  (1.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
398
+  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
399
+  (1.2ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
400
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
401
+  (0.3ms) COMMIT
853
402
  Migrating to CreateTerms (20170906193506)
854
-  (0.2ms) BEGIN
855
-  (5.2ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
856
-  (1.7ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
403
+  (0.1ms) BEGIN
404
+  (3.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)
405
+  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
857
406
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
858
-  (0.3ms) COMMIT
407
+  (0.4ms) COMMIT
859
408
  Migrating to CreateCourses (20170914181345)
860
409
   (0.2ms) BEGIN
861
-  (4.7ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
862
-  (1.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
410
+  (4.4ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
411
+  (1.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
863
412
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
864
-  (0.4ms) COMMIT
413
+  (0.2ms) COMMIT
865
414
  Migrating to CreateCanvasSyncJobLog (20170915210836)
866
-  (6.0ms) BEGIN
867
-  (18.0ms) 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)
415
+  (0.1ms) BEGIN
416
+  (3.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)
868
417
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
869
-  (0.5ms) COMMIT
418
+  (0.3ms) COMMIT
870
419
  Migrating to CreateUsers (20170918221413)
871
420
   (0.2ms) BEGIN
872
-  (4.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)
873
-  (1.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
421
+  (4.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)
422
+  (1.4ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
874
423
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
875
-  (0.4ms) COMMIT
424
+  (0.3ms) COMMIT
876
425
  Migrating to CreateSections (20171107213207)
877
426
   (0.2ms) BEGIN
878
-  (4.7ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
879
-  (1.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
880
-  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
427
+  (3.8ms) 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)
428
+  (1.3ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
429
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
881
430
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
882
-  (0.4ms) COMMIT
431
+  (0.2ms) COMMIT
883
432
  Migrating to CreateRoles (20180103162102)
884
433
   (0.2ms) BEGIN
885
-  (4.6ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
886
-  (1.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
434
+  (4.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)
435
+  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
887
436
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
888
-  (0.4ms) COMMIT
437
+  (0.3ms) COMMIT
889
438
  Migrating to CreateAdmins (20180109210452)
890
-  (0.2ms) BEGIN
891
-  (4.5ms) 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)
892
-  (1.7ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
893
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
439
+  (0.1ms) BEGIN
440
+  (3.6ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
441
+  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
442
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
894
443
   (0.4ms) COMMIT
895
- Migrating to CreateAssignments (20180212194212)
444
+ Migrating to CreateAssignments (20180212204530)
896
445
   (0.2ms) BEGIN
897
-  (5.2ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
446
+  (4.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, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
898
447
   (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
899
448
   (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
900
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212194212"]]
901
-  (0.4ms) COMMIT
902
- ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
449
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]
450
+  (0.3ms) COMMIT
451
+ Migrating to CreateSubmissions (20180213235544)
452
+  (0.2ms) BEGIN
453
+  (2.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, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
454
+  (1.2ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
455
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
456
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
457
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
458
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
459
+  (0.3ms) COMMIT
460
+ ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
903
461
   (0.1ms) BEGIN
904
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-12 19:57:27.403506"], ["updated_at", "2018-02-12 19:57:27.403506"]]
905
-  (0.5ms) COMMIT
906
-  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
907
-  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
908
-  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
909
-  (19.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
462
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:57:20.233403"], ["updated_at", "2018-02-13 23:57:20.233403"]]
463
+  (0.3ms) COMMIT
464
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
910
465
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
911
-  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
466
+  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
467
+  (14.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
912
468
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
913
469
   (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
914
-  (204.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
915
-  (213.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
916
-  (17.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
917
-  (4.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)
470
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
471
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
472
+  (127.6ms) DROP DATABASE IF EXISTS "canvas_sync_development"
473
+  (129.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
474
+  (13.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
475
+  (3.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)
918
476
   (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
919
-  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
477
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
920
478
  Migrating to CreateEnrollments (20170905192509)
921
479
   (0.1ms) BEGIN
922
-  (22.4ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
923
-  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
924
-  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
925
-  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
926
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
927
-  (0.5ms) COMMIT
480
+  (4.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)
481
+  (1.2ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
482
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
483
+  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
484
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
485
+  (0.3ms) COMMIT
928
486
  Migrating to CreateTerms (20170906193506)
929
487
   (0.2ms) BEGIN
930
-  (4.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)
931
-  (1.6ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
488
+  (4.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)
489
+  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
932
490
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
933
491
   (0.3ms) COMMIT
934
492
  Migrating to CreateCourses (20170914181345)
935
493
   (0.2ms) BEGIN
936
-  (4.4ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
937
-  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
494
+  (3.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)
495
+  (1.6ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
938
496
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
939
-  (0.4ms) COMMIT
497
+  (0.3ms) COMMIT
940
498
  Migrating to CreateCanvasSyncJobLog (20170915210836)
941
-  (5.9ms) BEGIN
942
-  (20.0ms) 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)
499
+  (0.2ms) BEGIN
500
+  (4.0ms) 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)
943
501
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
944
-  (0.5ms) COMMIT
502
+  (0.3ms) COMMIT
945
503
  Migrating to CreateUsers (20170918221413)
946
-  (0.2ms) BEGIN
947
-  (4.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)
948
-  (1.6ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
504
+  (0.1ms) BEGIN
505
+  (3.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)
506
+  (1.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
949
507
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
950
-  (0.5ms) COMMIT
508
+  (0.3ms) COMMIT
951
509
  Migrating to CreateSections (20171107213207)
952
-  (0.2ms) BEGIN
510
+  (0.1ms) BEGIN
953
511
   (4.8ms) 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)
954
-  (1.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
955
-  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
512
+  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
513
+  (1.3ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
956
514
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
957
515
   (0.3ms) COMMIT
958
516
  Migrating to CreateRoles (20180103162102)
959
517
   (0.2ms) BEGIN
960
-  (4.8ms) 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)
961
-  (1.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
518
+  (3.8ms) 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)
519
+  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
962
520
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
963
-  (0.4ms) COMMIT
521
+  (0.3ms) COMMIT
964
522
  Migrating to CreateAdmins (20180109210452)
965
523
   (0.2ms) BEGIN
966
-  (4.6ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
967
-  (1.5ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
524
+  (5.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)
525
+  (1.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
968
526
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
969
-  (0.4ms) COMMIT
527
+  (0.3ms) COMMIT
970
528
  Migrating to CreateAssignments (20180212204530)
971
-  (0.2ms) BEGIN
972
-  (5.4ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
973
-  (1.5ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
974
-  (1.6ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
529
+  (0.1ms) BEGIN
530
+  (4.3ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
531
+  (1.3ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
532
+  (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
975
533
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]
976
-  (0.4ms) COMMIT
977
- ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
534
+  (0.2ms) COMMIT
535
+ Migrating to CreateSubmissions (20180213235544)
536
+  (0.2ms) BEGIN
537
+  (2.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, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
538
+  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
539
+  (1.6ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
540
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
541
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
542
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
543
+  (0.3ms) COMMIT
544
+ ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
978
545
   (0.1ms) BEGIN
979
- SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-12 20:45:44.469619"], ["updated_at", "2018-02-12 20:45:44.469619"]]
980
-  (0.4ms) COMMIT
981
-  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
546
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-14 00:29:53.010574"], ["updated_at", "2018-02-14 00:29:53.010574"]]
547
+  (0.3ms) COMMIT
548
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
982
549
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC