canvas_sync 0.17.0.beta1 → 0.17.0.beta6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b4ffe8d3a42b647f8c30f1d831c4a86998bc7c1b
4
- data.tar.gz: 2ba762a479d2df35e22a69b7930d051a2e43bd30
2
+ SHA256:
3
+ metadata.gz: 00bad4ee593106421544ae0ec2e99c8d5376c48450ce924774f00bc936130bee
4
+ data.tar.gz: 21341abba869bf4c375b5d7fa00d5c165b6901fc38bcbe76c1bff9873ef2437d
5
5
  SHA512:
6
- metadata.gz: 6702f6754b217edfe2c7e4ff51c586940e7073993b5e3a79464e49308edd274af9bc8165f38aa919ef3c288ec86f1623065a91f42121f68c4da1389f27a57cb2
7
- data.tar.gz: 71365002bcf14b762b00b73ae805862d8691a2b78ecd0254c0ef7fcf56eea6caeae838652e7ca4a685834eb380a08e782cf78e591b5af2c8950b4d4fd763e704
6
+ metadata.gz: e9def679518392df1a99842b1afa51b0804718ebc7c5b8d652001c5b4fa07463171cb14ba187c092b78c4abf6cc127184fa2ba752a473b14e0330cdd0ff8182c
7
+ data.tar.gz: d4e0b07807371ab31c55527aeee07ef756708bd2acccd0de4467f8bc15473e70de0a552caa704b4cb805b06aa98edb6cc49a80c67a5b51b3a029056e736236ce
@@ -161,6 +161,7 @@ module CanvasSync
161
161
  ###############################
162
162
 
163
163
  per_term_chain = JobBatches::ChainBuilder.new(model_job_map[:terms])
164
+ per_term_chain.params[:term_scope] = term_scope
164
165
  current_chain << per_term_chain
165
166
  current_chain = per_term_chain
166
167
 
@@ -171,7 +172,7 @@ module CanvasSync
171
172
  try_add_model_job.call('context_module_items')
172
173
 
173
174
  current_chain.insert(
174
- generate_provisioning_jobs(models, options, job_options: { term_scope: term_scope }, only_split: ['users'])
175
+ generate_provisioning_jobs(models, options, only_split: ['users'])
175
176
  )
176
177
 
177
178
  ###############################
@@ -120,6 +120,8 @@ module CanvasSync
120
120
 
121
121
  @ready_to_queue = []
122
122
 
123
+ puts "Beginning Batch #{@bidkey}"
124
+
123
125
  begin
124
126
  parent = Thread.current[:batch]
125
127
  Thread.current[:batch] = self
@@ -173,7 +175,7 @@ module CanvasSync
173
175
  end
174
176
 
175
177
  def valid?(batch = self)
176
- valid = !redis { |r| r.exists("invalidated-bid-#{batch.bid}") }
178
+ valid = !redis { |r| r.exists?("invalidated-bid-#{batch.bid}") }
177
179
  batch.parent ? valid && valid?(batch.parent) : valid
178
180
  end
179
181
 
@@ -223,7 +225,7 @@ module CanvasSync
223
225
  r.hincrby("BID-#{bid}", "pending", 0)
224
226
  r.scard("BID-#{bid}-failed")
225
227
  r.hincrby("BID-#{bid}", "children", 0)
226
- r.scard("BID-#{bid}-complete")
228
+ r.scard("BID-#{bid}-batches-complete")
227
229
  r.hget("BID-#{bid}", "parent_bid")
228
230
 
229
231
  r.expire("BID-#{bid}-failed", BID_EXPIRE_TTL)
@@ -253,7 +255,7 @@ module CanvasSync
253
255
 
254
256
  r.scard("BID-#{bid}-dead")
255
257
  r.hincrby("BID-#{bid}", "children", 0)
256
- r.scard("BID-#{bid}-complete")
258
+ r.scard("BID-#{bid}-batches-complete")
257
259
  r.hget("BID-#{bid}", "parent_bid")
258
260
 
259
261
  r.expire("BID-#{bid}-dead", BID_EXPIRE_TTL)
@@ -273,17 +275,18 @@ module CanvasSync
273
275
  end
274
276
 
275
277
  def process_successful_job(bid, jid)
276
- failed, pending, children, complete, success, total, parent_bid = redis do |r|
278
+ _, failed, pending, children, complete, success, total, parent_bid = redis do |r|
277
279
  r.multi do
280
+ r.srem("BID-#{bid}-failed", jid)
281
+
278
282
  r.scard("BID-#{bid}-failed")
279
283
  r.hincrby("BID-#{bid}", "pending", -1)
280
284
  r.hincrby("BID-#{bid}", "children", 0)
281
- r.scard("BID-#{bid}-complete")
282
- r.scard("BID-#{bid}-success")
285
+ r.scard("BID-#{bid}-batches-complete")
286
+ r.scard("BID-#{bid}-batches-success")
283
287
  r.hget("BID-#{bid}", "total")
284
288
  r.hget("BID-#{bid}", "parent_bid")
285
289
 
286
- r.srem("BID-#{bid}-failed", jid)
287
290
  r.srem("BID-#{bid}-jids", jid)
288
291
  r.expire("BID-#{bid}", BID_EXPIRE_TTL)
289
292
  end
@@ -365,8 +368,9 @@ module CanvasSync
365
368
  "BID-#{bid}-callbacks-success",
366
369
  "BID-#{bid}-failed",
367
370
 
368
- "BID-#{bid}-success",
369
- "BID-#{bid}-complete",
371
+ "BID-#{bid}-batches-success",
372
+ "BID-#{bid}-batches-complete",
373
+ "BID-#{bid}-batches-failed",
370
374
  "BID-#{bid}-jids",
371
375
  )
372
376
  end
@@ -87,13 +87,16 @@ module CanvasSync
87
87
  def success(bid, status, parent_bid)
88
88
  return unless parent_bid
89
89
 
90
- _, _, success, _, complete, pending, children, failure = Batch.redis do |r|
90
+ _, _, success, _, _, complete, pending, children, failure = Batch.redis do |r|
91
91
  r.multi do
92
- r.sadd("BID-#{parent_bid}-success", bid)
93
- r.expire("BID-#{parent_bid}-success", Batch::BID_EXPIRE_TTL)
94
- r.scard("BID-#{parent_bid}-success")
95
- r.sadd("BID-#{parent_bid}-complete", bid)
96
- r.scard("BID-#{parent_bid}-complete")
92
+ r.sadd("BID-#{parent_bid}-batches-success", bid)
93
+ r.expire("BID-#{parent_bid}-batches-success", Batch::BID_EXPIRE_TTL)
94
+ r.scard("BID-#{parent_bid}-batches-success")
95
+
96
+ r.srem("BID-#{parent_bid}-batches-failed", bid)
97
+ r.sadd("BID-#{parent_bid}-batches-complete", bid)
98
+ r.scard("BID-#{parent_bid}-batches-complete")
99
+
97
100
  r.hincrby("BID-#{parent_bid}", "pending", 0)
98
101
  r.hincrby("BID-#{parent_bid}", "children", 0)
99
102
  r.scard("BID-#{parent_bid}-failed")
@@ -112,7 +115,7 @@ module CanvasSync
112
115
  r.multi do
113
116
  r.hincrby("BID-#{bid}", "pending", 0)
114
117
  r.hincrby("BID-#{bid}", "children", 0)
115
- r.scard("BID-#{bid}-success")
118
+ r.scard("BID-#{bid}-batches-success")
116
119
  end
117
120
  end
118
121
 
@@ -127,10 +130,11 @@ module CanvasSync
127
130
  # callback may add more jobs to the parent batch
128
131
 
129
132
  Batch.logger.debug {"Finalize parent complete bid: #{parent_bid}"}
130
- _, complete, pending, children, failure = Batch.redis do |r|
133
+ _, _, complete, pending, children, failure = Batch.redis do |r|
131
134
  r.multi do
132
- r.sadd("BID-#{parent_bid}-complete", bid)
133
- r.scard("BID-#{parent_bid}-complete")
135
+ r.sadd("BID-#{parent_bid}-batches-complete", bid)
136
+ r.sadd("BID-#{parent_bid}-batches-failed", bid)
137
+ r.scard("BID-#{parent_bid}-batches-complete")
134
138
  r.hincrby("BID-#{parent_bid}", "pending", 0)
135
139
  r.hincrby("BID-#{parent_bid}", "children", 0)
136
140
  r.scard("BID-#{parent_bid}-failed")
@@ -141,11 +145,6 @@ module CanvasSync
141
145
  end
142
146
  end
143
147
  end
144
-
145
- def cleanup_redis bid, callback_bid=nil
146
- Batch.cleanup_redis bid
147
- Batch.cleanup_redis callback_bid if callback_bid
148
- end
149
148
  end
150
149
  end
151
150
  end
@@ -104,6 +104,16 @@ module CanvasSync
104
104
  end
105
105
  end
106
106
 
107
+ # Legacy Support
108
+ def merge_options(job, options)
109
+ matching_jobs = find_matching_jobs(job)
110
+
111
+ matching_jobs.each do |j|
112
+ j[:options] ||= {}
113
+ j[:options].deep_merge!(options)
114
+ end
115
+ end
116
+
107
117
  private
108
118
 
109
119
  def find_matching_jobs(search_job, parent_job = self.base_job)
@@ -145,6 +155,13 @@ module CanvasSync
145
155
  def enqueue_job(job_def)
146
156
  job_class = job_def[:job].constantize
147
157
  job_options = job_def[:parameters] || []
158
+
159
+ # Legacy Support
160
+ if job_def[:options]
161
+ job_options << {} unless job_options[-1].is_a?(Hash)
162
+ job_options[-1].merge!(job_def[:options])
163
+ end
164
+
148
165
  if job_class.respond_to? :perform_async
149
166
  job_class.perform_async(*job_options)
150
167
  else
@@ -5,6 +5,7 @@ module CanvasSync
5
5
  class ConcurrentBatchJob < BaseJob
6
6
  def perform(sub_jobs, context: nil)
7
7
  Batch.new.tap do |b|
8
+ b.description = "Concurrent Batch Root"
8
9
  b.context = context
9
10
  b.jobs do
10
11
  sub_jobs.each do |j|
@@ -21,6 +21,7 @@ module CanvasSync
21
21
  end
22
22
  end
23
23
 
24
+ root_batch.description = "Serial Batch Root (#{serial_id})"
24
25
  root_batch.allow_context_changes = true
25
26
  root_batch.context = context
26
27
  root_batch.on(:success, "#{self.class.to_s}.cleanup_redis", serial_batch_id: serial_id)
@@ -61,7 +62,8 @@ module CanvasSync
61
62
 
62
63
  Batch.new(root_bid).jobs do
63
64
  Batch.new.tap do |batch|
64
- batch.on(:success, "#{self.to_s}.job_succeeded_callback", serial_batch_id: serial_id)
65
+ batch.description = "Serial Batch Fiber (#{serial_id})"
66
+ batch.on(:success, "#{self.to_s}.job_succeeded_callback", serial_batch_id: serial_id)
65
67
  batch.jobs do
66
68
  ChainBuilder.enqueue_job(next_job)
67
69
  end
@@ -84,6 +84,8 @@ module CanvasSync
84
84
  end
85
85
  end
86
86
  ::Sidekiq.const_set(:Batch, CanvasSync::JobBatches::Batch)
87
+ # This alias helps apartment-sidekiq set itself up correctly
88
+ ::Sidekiq::Batch.const_set(:Server, CanvasSync::JobBatches::Sidekiq::ServerMiddleware)
87
89
  ::Sidekiq::Worker.send(:include, JobBatches::Sidekiq::WorkerExtension)
88
90
  end
89
91
  end
@@ -40,10 +40,26 @@ module CanvasSync
40
40
  'true' == Batch.redis { |r| r.hget("BID-#{bid}", 'complete') }
41
41
  end
42
42
 
43
+ def success?
44
+ 'true' == Batch.redis { |r| r.hget("BID-#{bid}", 'success') }
45
+ end
46
+
43
47
  def child_count
44
48
  Batch.redis { |r| r.hget("BID-#{bid}", 'children') }.to_i
45
49
  end
46
50
 
51
+ def completed_children_count
52
+ Batch.redis { |r| r.scard("BID-#{bid}-batches-complete") }.to_i
53
+ end
54
+
55
+ def successful_children_count
56
+ Batch.redis { |r| r.scard("BID-#{bid}-batches-success") }.to_i
57
+ end
58
+
59
+ def failed_children_count
60
+ Batch.redis { |r| r.scard("BID-#{bid}-batches-failed") }.to_i
61
+ end
62
+
47
63
  def data
48
64
  {
49
65
  bid: bid,
@@ -52,9 +68,13 @@ module CanvasSync
52
68
  pending: pending,
53
69
  created_at: created_at,
54
70
  complete: complete?,
71
+ success: success?,
55
72
  failure_info: failure_info,
56
73
  parent_bid: parent_bid,
57
- child_count: child_count
74
+ child_count: child_count,
75
+ completed_children_count: completed_children_count,
76
+ successful_children_count: successful_children_count,
77
+ failed_children_count: failed_children_count,
58
78
  }
59
79
  end
60
80
  end
@@ -15,6 +15,7 @@ module CanvasSync
15
15
  JobBatches::Batch.new.tap do |b|
16
16
  b.description = "CanvasSync Root Batch"
17
17
  b.on(:complete, "#{self.class.to_s}.batch_completed", sync_batch_id: sync_batch.id)
18
+ b.on(:success, "#{self.class.to_s}.batch_completed", sync_batch_id: sync_batch.id)
18
19
  b.context = globals
19
20
  b.jobs do
20
21
  JobBatches::SerialBatchJob.perform_now(chain_definition)
@@ -25,7 +26,7 @@ module CanvasSync
25
26
  def self.batch_completed(status, options)
26
27
  sbatch = SyncBatch.find(options['sync_batch_id'])
27
28
  sbatch.update!(
28
- status: status.failures.positive? ? 'failed' : 'completed',
29
+ status: status.success? ? 'completed' : 'failed',
29
30
  completed_at: DateTime.now,
30
31
  )
31
32
  end
@@ -2,9 +2,6 @@ module CanvasSync
2
2
  module Jobs
3
3
  # ActiveJob class that starts a Canvas provisioning report
4
4
  class SyncProvisioningReportJob < CanvasSync::Job
5
- # @param options [Hash] If options contains a :term_scope a seperate provisioning report
6
- # will be started for each term in that scope. :models should be an array of
7
- # models to sync.
8
5
  def perform(options)
9
6
  start_report(report_params(options), options)
10
7
  end
@@ -5,7 +5,9 @@ module CanvasSync
5
5
  #
6
6
  # Terms are pre-synced so that provisioning reports can be scoped to term.
7
7
  #
8
- # @param options [Hash]
8
+ # @param options [Hash] If options contains a :term_scope a seperate provisioning report
9
+ # will be started for each term in that scope. :models should be an array of
10
+ # models to sync.
9
11
  def perform(options)
10
12
  CanvasSync.get_canvas_sync_client(batch_context).terms("self").all_pages!.each do |term_params|
11
13
  if account_id = batch_context[:account_id]
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.17.0.beta1".freeze
2
+ VERSION = "0.17.0.beta6".freeze
3
3
  end
@@ -36,8 +36,9 @@ RSpec.describe CanvasSync do
36
36
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
37
37
  {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users"], :b=>2}},
38
38
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
39
+ :term_scope=>"active",
39
40
  :sub_jobs=>[
40
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :term_scope=>"active", :c=>3}}
41
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :c=>3}}
41
42
  ]
42
43
  }]}
43
44
  ]]}
@@ -54,8 +55,9 @@ RSpec.describe CanvasSync do
54
55
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
55
56
  {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users"]}},
56
57
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
58
+ :term_scope=>"active",
57
59
  :sub_jobs=>[
58
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :term_scope=>"active"}}
60
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}
59
61
  ]
60
62
  }]}
61
63
  ]]}
@@ -72,8 +74,9 @@ RSpec.describe CanvasSync do
72
74
  :parameters => [[
73
75
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
74
76
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
77
+ :term_scope=>nil,
75
78
  :sub_jobs=>[
76
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "courses"], :term_scope=>nil}}
79
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "courses"]}}
77
80
  ]
78
81
  }]}
79
82
  ]]}
@@ -91,8 +94,9 @@ RSpec.describe CanvasSync do
91
94
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
92
95
  {:job=>"CanvasSync::Jobs::SyncRolesJob", :options=>{}},
93
96
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
97
+ :term_scope=>"active",
94
98
  :sub_jobs=>[
95
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :term_scope=>"active"}}
99
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}
96
100
  ]
97
101
  }]}
98
102
  ]]}
@@ -110,8 +114,9 @@ RSpec.describe CanvasSync do
110
114
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
111
115
  {:job=>"CanvasSync::Jobs::SyncRolesJob", :options=>{}},
112
116
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
117
+ :term_scope=>nil,
113
118
  :sub_jobs=>[
114
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :term_scope=>nil}}
119
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}
115
120
  ]
116
121
  }]}
117
122
  ]]}
@@ -129,8 +134,9 @@ RSpec.describe CanvasSync do
129
134
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
130
135
  {:job=>"CanvasSync::Jobs::SyncAdminsJob", :options=>{}},
131
136
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
137
+ :term_scope=>"active",
132
138
  :sub_jobs=>[
133
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :term_scope=>"active"}}
139
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}
134
140
  ]
135
141
  }]}
136
142
  ]]}
@@ -148,8 +154,9 @@ RSpec.describe CanvasSync do
148
154
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
149
155
  {:job=>"CanvasSync::Jobs::SyncAdminsJob", :options=>{}},
150
156
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
157
+ :term_scope=>nil,
151
158
  :sub_jobs=>[
152
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"], :term_scope=>nil}}
159
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["courses"]}}
153
160
  ]
154
161
  }]}
155
162
  ]]}
@@ -167,9 +174,10 @@ RSpec.describe CanvasSync do
167
174
  :parameters => [[
168
175
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
169
176
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
177
+ :term_scope=>nil,
170
178
  :sub_jobs=>[
171
179
  {:job=>"CanvasSync::Jobs::SyncAssignmentsJob", :options=>{}},
172
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"], :term_scope=>nil}}
180
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"]}}
173
181
  ]
174
182
  }]}
175
183
  ]]}
@@ -187,9 +195,10 @@ RSpec.describe CanvasSync do
187
195
  :parameters => [[
188
196
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
189
197
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
198
+ :term_scope=>nil,
190
199
  :sub_jobs=>[
191
200
  {:job=>"CanvasSync::Jobs::SyncSubmissionsJob", :options=>{}},
192
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"], :term_scope=>nil}}
201
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"]}}
193
202
  ]
194
203
  }]}
195
204
  ]]}
@@ -207,9 +216,10 @@ RSpec.describe CanvasSync do
207
216
  :parameters => [[
208
217
  {:job=>"CanvasSync::JobBatches::ConcurrentBatchJob", :parameters=>[[
209
218
  {:job=>"CanvasSync::Jobs::SyncTermsJob", :parameters=>[{
219
+ :term_scope=>nil,
210
220
  :sub_jobs=>[
211
221
  {:job=>"CanvasSync::Jobs::SyncAssignmentGroupsJob", :options=>{}},
212
- {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"], :term_scope=>nil}}
222
+ {:job=>"CanvasSync::Jobs::SyncProvisioningReportJob", :options=>{:models=>["users", "enrollments"]}}
213
223
  ]
214
224
  }]}
215
225
  ]]}
@@ -0,0 +1,1248 @@
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)
4
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
+ Migrating to CreateEnrollments (20170905192509)
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")
11
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
12
+  (0.3ms) COMMIT
13
+ Migrating to CreateTerms (20170906193506)
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)
16
+  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
17
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
18
+  (0.7ms) COMMIT
19
+ Migrating to CreateCourses (20170914181345)
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)
22
+  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
23
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
24
+  (0.2ms) COMMIT
25
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
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
30
+ Migrating to CreateUsers (20170918221413)
31
+  (0.2ms) BEGIN
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")
34
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
35
+  (1.2ms) COMMIT
36
+ Migrating to CreateSections (20171107213207)
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")
41
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
42
+  (0.3ms) COMMIT
43
+ Migrating to CreateRoles (20180103162102)
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")
47
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
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
57
+ Migrating to CreateAdmins (20180109210452)
58
+  (0.2ms) BEGIN
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")
61
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
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
66
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
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
69
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
70
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
71
+ Migrating to CreateAdmins (20180109210452)
72
+  (0.2ms) BEGIN
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
90
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
91
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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)
94
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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)
102
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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
105
+ Migrating to CreateAdmins (20180109210452)
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")
109
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
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
128
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
129
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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"]]
132
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
133
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
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)
140
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
141
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
142
+ Migrating to CreateEnrollments (20170905192509)
143
+  (0.1ms) BEGIN
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
150
+ Migrating to CreateTerms (20170906193506)
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")
154
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
155
+  (0.3ms) COMMIT
156
+ Migrating to CreateCourses (20170914181345)
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")
160
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
161
+  (0.3ms) COMMIT
162
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
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
167
+ Migrating to CreateUsers (20170918221413)
168
+  (0.2ms) BEGIN
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")
171
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
172
+  (0.3ms) COMMIT
173
+ Migrating to CreateSections (20171107213207)
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
180
+ Migrating to CreateRoles (20180103162102)
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
186
+ Migrating to CreateAdmins (20180109210452)
187
+  (0.2ms) BEGIN
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")
190
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
191
+  (0.3ms) COMMIT
192
+ Migrating to CreateAssignments (20180212204530)
193
+  (0.2ms) BEGIN
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)
200
+  (0.1ms) BEGIN
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"]]
207
+  (0.4ms) COMMIT
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)
213
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
214
+  (2.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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"]]
218
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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)
224
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
225
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
226
+ Migrating to CreateEnrollments (20170905192509)
227
+  (0.1ms) BEGIN
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
234
+ Migrating to CreateTerms (20170906193506)
235
+  (0.2ms) BEGIN
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")
238
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
239
+  (0.3ms) COMMIT
240
+ Migrating to CreateCourses (20170914181345)
241
+  (0.2ms) BEGIN
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
246
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
247
+  (6.1ms) BEGIN
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
251
+ Migrating to CreateUsers (20170918221413)
252
+  (0.2ms) BEGIN
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)
254
+  (1.4ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
255
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
256
+  (0.3ms) COMMIT
257
+ Migrating to CreateSections (20171107213207)
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
264
+ Migrating to CreateRoles (20180103162102)
265
+  (0.2ms) BEGIN
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")
268
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
269
+  (0.2ms) COMMIT
270
+ Migrating to CreateAdmins (20180109210452)
271
+  (0.1ms) BEGIN
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
296
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
297
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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"]]
300
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
301
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
302
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
303
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
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)
308
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
309
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
310
+ Migrating to CreateEnrollments (20170905192509)
311
+  (0.1ms) BEGIN
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
318
+ Migrating to CreateTerms (20170906193506)
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
324
+ Migrating to CreateCourses (20170914181345)
325
+  (0.2ms) BEGIN
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
330
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
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)
333
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
334
+  (0.5ms) COMMIT
335
+ Migrating to CreateUsers (20170918221413)
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")
339
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
340
+  (0.3ms) COMMIT
341
+ Migrating to CreateSections (20171107213207)
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")
346
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
347
+  (0.3ms) COMMIT
348
+ Migrating to CreateRoles (20180103162102)
349
+  (0.2ms) BEGIN
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")
352
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
353
+  (0.3ms) COMMIT
354
+ Migrating to CreateAdmins (20180109210452)
355
+  (0.2ms) BEGIN
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)
361
+  (0.2ms) BEGIN
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
380
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
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
385
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
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)
392
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
393
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
394
+ Migrating to CreateEnrollments (20170905192509)
395
+  (0.1ms) BEGIN
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
402
+ Migrating to CreateTerms (20170906193506)
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")
406
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
407
+  (0.4ms) COMMIT
408
+ Migrating to CreateCourses (20170914181345)
409
+  (0.2ms) BEGIN
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")
412
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
413
+  (0.2ms) COMMIT
414
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
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)
417
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
418
+  (0.3ms) COMMIT
419
+ Migrating to CreateUsers (20170918221413)
420
+  (0.2ms) BEGIN
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")
423
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
424
+  (0.3ms) COMMIT
425
+ Migrating to CreateSections (20171107213207)
426
+  (0.2ms) BEGIN
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")
430
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
431
+  (0.2ms) COMMIT
432
+ Migrating to CreateRoles (20180103162102)
433
+  (0.2ms) BEGIN
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")
436
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
437
+  (0.3ms) COMMIT
438
+ Migrating to CreateAdmins (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"]]
443
+  (0.4ms) COMMIT
444
+ Migrating to CreateAssignments (20180212204530)
445
+  (0.2ms) BEGIN
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)
447
+  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
448
+  (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
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]]
461
+  (0.1ms) BEGIN
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)
465
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
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"]]
468
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
469
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
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)
476
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
477
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
478
+ Migrating to CreateEnrollments (20170905192509)
479
+  (0.1ms) BEGIN
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
486
+ Migrating to CreateTerms (20170906193506)
487
+  (0.2ms) BEGIN
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")
490
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
491
+  (0.3ms) COMMIT
492
+ Migrating to CreateCourses (20170914181345)
493
+  (0.2ms) BEGIN
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")
496
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
497
+  (0.3ms) COMMIT
498
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
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)
501
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
502
+  (0.3ms) COMMIT
503
+ Migrating to CreateUsers (20170918221413)
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")
507
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
508
+  (0.3ms) COMMIT
509
+ Migrating to CreateSections (20171107213207)
510
+  (0.1ms) BEGIN
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)
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")
514
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
515
+  (0.3ms) COMMIT
516
+ Migrating to CreateRoles (20180103162102)
517
+  (0.2ms) BEGIN
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")
520
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
521
+  (0.3ms) COMMIT
522
+ Migrating to CreateAdmins (20180109210452)
523
+  (0.2ms) BEGIN
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")
526
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
527
+  (0.3ms) COMMIT
528
+ Migrating to CreateAssignments (20180212204530)
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")
533
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]
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]]
545
+  (0.1ms) BEGIN
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)
549
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
550
+  (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
551
+  (7.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
552
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
553
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
554
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
555
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
556
+  (126.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
557
+  (117.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"
558
+  (13.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
559
+  (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)
560
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
561
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
562
+ Migrating to CreateEnrollments (20170905192509)
563
+  (0.1ms) BEGIN
564
+  (5.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)
565
+  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
566
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
567
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
568
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
569
+  (0.3ms) COMMIT
570
+ Migrating to CreateTerms (20170906193506)
571
+  (0.1ms) BEGIN
572
+  (4.5ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
573
+  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
574
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
575
+  (1.8ms) COMMIT
576
+ Migrating to CreateCourses (20170914181345)
577
+  (0.2ms) BEGIN
578
+  (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)
579
+  (1.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
580
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
581
+  (0.3ms) COMMIT
582
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
583
+  (0.2ms) BEGIN
584
+  (6.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)
585
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
586
+  (0.3ms) COMMIT
587
+ Migrating to CreateUsers (20170918221413)
588
+  (0.2ms) BEGIN
589
+  (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)
590
+  (1.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
591
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
592
+  (0.8ms) COMMIT
593
+ Migrating to CreateSections (20171107213207)
594
+  (0.2ms) BEGIN
595
+  (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)
596
+  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
597
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
598
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
599
+  (0.3ms) COMMIT
600
+ Migrating to CreateRoles (20180103162102)
601
+  (0.2ms) BEGIN
602
+  (3.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)
603
+  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
604
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
605
+  (0.2ms) COMMIT
606
+ Migrating to CreateAdmins (20180109210452)
607
+  (0.1ms) BEGIN
608
+  (3.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)
609
+  (1.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
610
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
611
+  (0.2ms) COMMIT
612
+ Migrating to CreateSubmissions (20180213235544)
613
+  (0.1ms) BEGIN
614
+  (3.0ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
615
+  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
616
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
617
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
618
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
619
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
620
+  (0.2ms) COMMIT
621
+ Migrating to CreateAssignments (20180215214227)
622
+  (0.2ms) BEGIN
623
+  (3.9ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
624
+  (1.1ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
625
+  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
626
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
627
+  (0.2ms) COMMIT
628
+ 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]]
629
+  (0.1ms) BEGIN
630
+ 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-15 21:42:39.178681"], ["updated_at", "2018-02-15 21:42:39.178681"]]
631
+  (0.3ms) COMMIT
632
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
633
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
634
+  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
635
+  (8.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
636
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
637
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
638
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
639
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
640
+  (123.6ms) DROP DATABASE IF EXISTS "canvas_sync_development"
641
+  (123.0ms) DROP DATABASE IF EXISTS "canvas_sync_test"
642
+  (13.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
643
+  (3.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)
644
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
645
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
646
+ Migrating to CreateEnrollments (20170905192509)
647
+  (0.2ms) BEGIN
648
+  (21.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)
649
+  (1.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
650
+  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
651
+  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
652
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
653
+  (0.4ms) COMMIT
654
+ Migrating to CreateTerms (20170906193506)
655
+  (0.2ms) BEGIN
656
+  (3.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)
657
+  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
658
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
659
+  (0.3ms) COMMIT
660
+ Migrating to CreateCourses (20170914181345)
661
+  (0.2ms) BEGIN
662
+  (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)
663
+  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
664
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
665
+  (0.3ms) COMMIT
666
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
667
+  (6.0ms) BEGIN
668
+  (19.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)
669
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
670
+  (0.3ms) COMMIT
671
+ Migrating to CreateUsers (20170918221413)
672
+  (0.2ms) BEGIN
673
+  (3.8ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
674
+  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
675
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
676
+  (0.2ms) COMMIT
677
+ Migrating to CreateSections (20171107213207)
678
+  (0.1ms) BEGIN
679
+  (3.4ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
680
+  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
681
+  (1.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
682
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
683
+  (0.3ms) COMMIT
684
+ Migrating to CreateRoles (20180103162102)
685
+  (0.1ms) BEGIN
686
+  (3.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)
687
+  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
688
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
689
+  (0.2ms) COMMIT
690
+ Migrating to CreateAdmins (20180109210452)
691
+  (0.1ms) BEGIN
692
+  (3.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)
693
+  (1.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
694
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
695
+  (0.2ms) COMMIT
696
+ Migrating to CreateSubmissions (20180213235544)
697
+  (0.2ms) BEGIN
698
+  (2.4ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
699
+  (1.2ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
700
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
701
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
702
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
703
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
704
+  (0.2ms) COMMIT
705
+ Migrating to CreateAssignments (20180215214227)
706
+  (0.1ms) BEGIN
707
+  (3.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" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
708
+  (1.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
709
+  (1.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
710
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
711
+  (0.3ms) COMMIT
712
+ 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]]
713
+  (0.1ms) BEGIN
714
+ 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-15 21:59:29.557046"], ["updated_at", "2018-02-15 21:59:29.557046"]]
715
+  (0.3ms) COMMIT
716
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
717
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
718
+  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
719
+  (8.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
720
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
721
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
722
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
723
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
724
+  (123.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
725
+  (121.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"
726
+  (11.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
727
+  (21.3ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
728
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
729
+  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
730
+ Migrating to CreateEnrollments (20170905192509)
731
+  (0.1ms) BEGIN
732
+  (15.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)
733
+  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
734
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
735
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
736
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
737
+  (0.4ms) COMMIT
738
+ Migrating to CreateTerms (20170906193506)
739
+  (0.2ms) BEGIN
740
+  (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)
741
+  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
742
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
743
+  (0.3ms) COMMIT
744
+ Migrating to CreateCourses (20170914181345)
745
+  (0.1ms) BEGIN
746
+  (3.6ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
747
+  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
748
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
749
+  (0.2ms) COMMIT
750
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
751
+  (0.2ms) BEGIN
752
+  (3.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)
753
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
754
+  (0.3ms) COMMIT
755
+ Migrating to CreateUsers (20170918221413)
756
+  (0.2ms) BEGIN
757
+  (3.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
758
+  (1.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
759
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
760
+  (0.3ms) COMMIT
761
+ Migrating to CreateSections (20171107213207)
762
+  (0.1ms) BEGIN
763
+  (3.3ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
764
+  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
765
+  (1.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
766
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
767
+  (0.2ms) COMMIT
768
+ Migrating to CreateRoles (20180103162102)
769
+  (0.1ms) BEGIN
770
+  (3.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)
771
+  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
772
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
773
+  (0.2ms) COMMIT
774
+ Migrating to CreateAdmins (20180109210452)
775
+  (0.1ms) BEGIN
776
+  (3.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)
777
+  (1.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
778
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
779
+  (0.3ms) COMMIT
780
+ Migrating to CreateSubmissions (20180213235544)
781
+  (5.5ms) BEGIN
782
+  (8.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)
783
+  (12.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
784
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
785
+  (1.4ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
786
+  (1.5ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
787
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
788
+  (0.3ms) COMMIT
789
+ Migrating to CreateAssignments (20180215214227)
790
+  (0.2ms) BEGIN
791
+  (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, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
792
+  (1.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
793
+  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
794
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
795
+  (0.3ms) COMMIT
796
+ 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]]
797
+  (0.1ms) BEGIN
798
+ 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-15 22:00:57.501540"], ["updated_at", "2018-02-15 22:00:57.501540"]]
799
+  (0.3ms) COMMIT
800
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
801
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
802
+  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
803
+  (3.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
804
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
805
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
806
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
807
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
808
+  (124.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"
809
+  (119.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"
810
+  (33.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
811
+  (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)
812
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
813
+  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
814
+ Migrating to CreateEnrollments (20170905192509)
815
+  (0.1ms) BEGIN
816
+  (9.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)
817
+  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
818
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
819
+  (6.9ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
820
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
821
+  (6.0ms) COMMIT
822
+ Migrating to CreateTerms (20170906193506)
823
+  (6.2ms) BEGIN
824
+  (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)
825
+  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
826
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
827
+  (0.3ms) COMMIT
828
+ Migrating to CreateCourses (20170914181345)
829
+  (0.1ms) BEGIN
830
+  (3.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)
831
+  (1.2ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
832
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
833
+  (0.3ms) COMMIT
834
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
835
+  (0.1ms) BEGIN
836
+  (10.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)
837
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
838
+  (5.7ms) COMMIT
839
+ Migrating to CreateUsers (20170918221413)
840
+  (5.5ms) BEGIN
841
+  (7.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
842
+  (1.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
843
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
844
+  (0.3ms) COMMIT
845
+ Migrating to CreateSections (20171107213207)
846
+  (0.2ms) BEGIN
847
+  (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)
848
+  (1.2ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
849
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
850
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
851
+  (0.3ms) COMMIT
852
+ Migrating to CreateRoles (20180103162102)
853
+  (0.2ms) BEGIN
854
+  (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)
855
+  (6.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
856
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
857
+  (6.0ms) COMMIT
858
+ Migrating to CreateAdmins (20180109210452)
859
+  (11.8ms) BEGIN
860
+  (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)
861
+  (1.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
862
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
863
+  (0.3ms) COMMIT
864
+ Migrating to CreateSubmissions (20180213235544)
865
+  (0.1ms) BEGIN
866
+  (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)
867
+  (1.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
868
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
869
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
870
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
871
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
872
+  (0.2ms) COMMIT
873
+ Migrating to CreateAssignments (20180215214227)
874
+  (0.1ms) BEGIN
875
+  (4.4ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
876
+  (1.3ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
877
+  (1.4ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
878
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
879
+  (0.3ms) COMMIT
880
+ ActiveRecord::InternalMetadata Load (1.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
881
+  (0.1ms) BEGIN
882
+ 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-15 22:01:29.506349"], ["updated_at", "2018-02-15 22:01:29.506349"]]
883
+  (0.2ms) COMMIT
884
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
885
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
886
+  (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
887
+  (8.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
888
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
889
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
890
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
891
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
892
+  (124.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"
893
+  (119.1ms) DROP DATABASE IF EXISTS "canvas_sync_test"
894
+  (12.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
895
+  (3.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)
896
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
897
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
898
+ Migrating to CreateEnrollments (20170905192509)
899
+  (0.1ms) BEGIN
900
+  (22.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)
901
+  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
902
+  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
903
+  (2.0ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
904
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
905
+  (6.0ms) COMMIT
906
+ Migrating to CreateTerms (20170906193506)
907
+  (11.0ms) BEGIN
908
+  (5.9ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
909
+  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
910
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
911
+  (0.3ms) COMMIT
912
+ Migrating to CreateCourses (20170914181345)
913
+  (0.3ms) BEGIN
914
+  (4.3ms) 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)
915
+  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
916
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
917
+  (0.2ms) COMMIT
918
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
919
+  (5.9ms) BEGIN
920
+  (21.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)
921
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
922
+  (0.5ms) COMMIT
923
+ Migrating to CreateUsers (20170918221413)
924
+  (0.2ms) BEGIN
925
+  (4.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
926
+  (1.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
927
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
928
+  (0.4ms) COMMIT
929
+ Migrating to CreateSections (20171107213207)
930
+  (0.2ms) BEGIN
931
+  (3.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)
932
+  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
933
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
934
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
935
+  (0.2ms) COMMIT
936
+ Migrating to CreateRoles (20180103162102)
937
+  (6.2ms) BEGIN
938
+  (23.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)
939
+  (1.7ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
940
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
941
+  (0.4ms) COMMIT
942
+ Migrating to CreateAdmins (20180109210452)
943
+  (6.1ms) BEGIN
944
+  (18.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)
945
+  (1.7ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
946
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
947
+  (0.4ms) COMMIT
948
+ Migrating to CreateSubmissions (20180213235544)
949
+  (11.6ms) BEGIN
950
+  (9.5ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
951
+  (1.8ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
952
+  (2.0ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
953
+  (7.4ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
954
+  (14.5ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
955
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
956
+  (0.4ms) COMMIT
957
+ Migrating to CreateAssignments (20180215214227)
958
+  (15.5ms) BEGIN
959
+  (12.1ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
960
+  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
961
+  (2.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
962
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
963
+  (0.3ms) COMMIT
964
+ 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]]
965
+  (0.1ms) BEGIN
966
+ 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-15 22:04:30.044556"], ["updated_at", "2018-02-15 22:04:30.044556"]]
967
+  (0.3ms) COMMIT
968
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
969
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
970
+  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
971
+  (7.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
972
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
973
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
974
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
975
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
976
+  (124.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"
977
+  (120.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"
978
+  (8.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
979
+  (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)
980
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
981
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
982
+ Migrating to CreateEnrollments (20170905192509)
983
+  (0.1ms) BEGIN
984
+  (21.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)
985
+  (1.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
986
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
987
+  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
988
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
989
+  (0.3ms) COMMIT
990
+ Migrating to CreateTerms (20170906193506)
991
+  (0.2ms) BEGIN
992
+  (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)
993
+  (1.5ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
994
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
995
+  (0.3ms) COMMIT
996
+ Migrating to CreateCourses (20170914181345)
997
+  (0.2ms) BEGIN
998
+  (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)
999
+  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1000
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1001
+  (0.3ms) COMMIT
1002
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1003
+  (0.2ms) BEGIN
1004
+  (3.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)
1005
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1006
+  (0.3ms) COMMIT
1007
+ Migrating to CreateUsers (20170918221413)
1008
+  (0.2ms) BEGIN
1009
+  (3.7ms) 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)
1010
+  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1011
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1012
+  (0.3ms) COMMIT
1013
+ Migrating to CreateSections (20171107213207)
1014
+  (0.1ms) BEGIN
1015
+  (3.3ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1016
+  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1017
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1018
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1019
+  (0.3ms) COMMIT
1020
+ Migrating to CreateRoles (20180103162102)
1021
+  (0.2ms) BEGIN
1022
+  (3.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)
1023
+  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1024
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1025
+  (0.2ms) COMMIT
1026
+ Migrating to CreateAdmins (20180109210452)
1027
+  (0.2ms) BEGIN
1028
+  (3.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)
1029
+  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1030
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1031
+  (0.2ms) COMMIT
1032
+ Migrating to CreateSubmissions (20180213235544)
1033
+  (0.2ms) BEGIN
1034
+  (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)
1035
+  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1036
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1037
+  (1.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1038
+  (1.3ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1039
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]
1040
+  (0.3ms) COMMIT
1041
+ Migrating to CreateAssignments (20180215214227)
1042
+  (0.1ms) BEGIN
1043
+  (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, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1044
+  (1.3ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1045
+  (1.3ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1046
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1047
+  (0.3ms) COMMIT
1048
+ Migrating to CreateAssignmentGroups (20180215220605)
1049
+  (0.2ms) BEGIN
1050
+  (4.1ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "default_assignment_name" character varying, "position" integer, "assignment_weighting_scheme" text, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1051
+  (1.2ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1052
+  (1.2ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1053
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215220605"]]
1054
+  (0.3ms) COMMIT
1055
+ 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]]
1056
+  (0.1ms) BEGIN
1057
+ 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-15 22:06:17.250893"], ["updated_at", "2018-02-15 22:06:17.250893"]]
1058
+  (0.4ms) COMMIT
1059
+  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
1060
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1061
+  (2.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1062
+  (9.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1063
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1064
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1065
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1066
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1067
+  (125.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1068
+  (125.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1069
+  (18.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1070
+  (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)
1071
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1072
+  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1073
+ Migrating to CreateEnrollments (20170905192509)
1074
+  (0.2ms) BEGIN
1075
+  (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)
1076
+  (1.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1077
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1078
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1079
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1080
+  (0.3ms) COMMIT
1081
+ Migrating to CreateTerms (20170906193506)
1082
+  (0.2ms) BEGIN
1083
+  (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)
1084
+  (1.2ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1085
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1086
+  (0.3ms) COMMIT
1087
+ Migrating to CreateCourses (20170914181345)
1088
+  (0.2ms) BEGIN
1089
+  (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)
1090
+  (1.2ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1091
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1092
+  (0.3ms) COMMIT
1093
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1094
+  (0.2ms) BEGIN
1095
+  (13.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)
1096
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1097
+  (0.4ms) COMMIT
1098
+ Migrating to CreateUsers (20170918221413)
1099
+  (0.7ms) BEGIN
1100
+  (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)
1101
+  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1102
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1103
+  (0.2ms) COMMIT
1104
+ Migrating to CreateSections (20171107213207)
1105
+  (0.1ms) BEGIN
1106
+  (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)
1107
+  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1108
+  (1.3ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1109
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1110
+  (0.2ms) COMMIT
1111
+ Migrating to CreateRoles (20180103162102)
1112
+  (0.1ms) BEGIN
1113
+  (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)
1114
+  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1115
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1116
+  (0.3ms) COMMIT
1117
+ Migrating to CreateAdmins (20180109210452)
1118
+  (0.2ms) BEGIN
1119
+  (3.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)
1120
+  (1.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1121
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1122
+  (0.3ms) COMMIT
1123
+ Migrating to CreateAssignments (20180215214227)
1124
+  (0.2ms) BEGIN
1125
+  (4.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" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1126
+  (1.1ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1127
+  (1.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1128
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1129
+  (0.2ms) COMMIT
1130
+ Migrating to CreateAssignmentGroups (20180215220605)
1131
+  (0.1ms) BEGIN
1132
+  (4.0ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "default_assignment_name" character varying, "position" integer, "assignment_weighting_scheme" text, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1133
+  (1.3ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1134
+  (1.2ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1135
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215220605"]]
1136
+  (0.2ms) COMMIT
1137
+ Migrating to CreateSubmissions (20180216171618)
1138
+  (0.2ms) BEGIN
1139
+  (4.0ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1140
+  (1.2ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1141
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1142
+  (1.0ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1143
+  (1.0ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1144
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1145
+  (0.2ms) COMMIT
1146
+ ActiveRecord::InternalMetadata Load (1.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]
1147
+  (0.1ms) BEGIN
1148
+ 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-16 17:16:29.994205"], ["updated_at", "2018-02-16 17:16:29.994205"]]
1149
+  (0.2ms) COMMIT
1150
+  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)
1151
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1152
+  (1.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1153
+  (7.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1154
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1155
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1156
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1157
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
1158
+  (124.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"
1159
+  (127.5ms) DROP DATABASE IF EXISTS "canvas_sync_test"
1160
+  (12.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
1161
+  (3.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)
1162
+  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)
1163
+  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1164
+ Migrating to CreateEnrollments (20170905192509)
1165
+  (0.1ms) BEGIN
1166
+  (6.0ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1167
+  (1.4ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")
1168
+  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
1169
+  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
1170
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]
1171
+  (0.4ms) COMMIT
1172
+ Migrating to CreateTerms (20170906193506)
1173
+  (0.2ms) BEGIN
1174
+  (3.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)
1175
+  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")
1176
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]
1177
+  (0.3ms) COMMIT
1178
+ Migrating to CreateCourses (20170914181345)
1179
+  (0.2ms) BEGIN
1180
+  (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)
1181
+  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")
1182
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]
1183
+  (0.3ms) COMMIT
1184
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
1185
+  (0.1ms) BEGIN
1186
+  (3.7ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1187
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
1188
+  (0.2ms) COMMIT
1189
+ Migrating to CreateUsers (20170918221413)
1190
+  (0.1ms) BEGIN
1191
+  (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)
1192
+  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")
1193
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]
1194
+  (0.3ms) COMMIT
1195
+ Migrating to CreateSections (20171107213207)
1196
+  (0.1ms) BEGIN
1197
+  (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)
1198
+  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")
1199
+  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
1200
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]
1201
+  (0.3ms) COMMIT
1202
+ Migrating to CreateRoles (20180103162102)
1203
+  (0.1ms) BEGIN
1204
+  (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)
1205
+  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")
1206
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]
1207
+  (0.3ms) COMMIT
1208
+ Migrating to CreateAdmins (20180109210452)
1209
+  (0.1ms) BEGIN
1210
+  (3.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)
1211
+  (1.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")
1212
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]
1213
+  (0.3ms) COMMIT
1214
+ Migrating to CreateAssignments (20180215214227)
1215
+  (0.2ms) BEGIN
1216
+  (4.4ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1217
+  (1.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")
1218
+  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")
1219
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]
1220
+  (0.3ms) COMMIT
1221
+ Migrating to CreateSubmissions (20180216171618)
1222
+  (0.1ms) BEGIN
1223
+  (3.7ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1224
+  (1.1ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")
1225
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
1226
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
1227
+  (1.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
1228
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180216171618"]]
1229
+  (0.3ms) COMMIT
1230
+ Migrating to CreateAccounts (20180220172559)
1231
+  (0.2ms) BEGIN
1232
+  (4.0ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_account_id" bigint NOT NULL, "account_id" character varying, "canvas_parent_id" bigint, "parent_account_id" character varying, "name" character varying, "status" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1233
+  (1.2ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")
1234
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180220172559"]]
1235
+  (0.2ms) COMMIT
1236
+ Migrating to CreateAssignmentGroups (20180222163506)
1237
+  (0.1ms) BEGIN
1238
+  (3.5ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1239
+  (1.2ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")
1240
+  (1.1ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
1241
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180222163506"]]
1242
+  (0.2ms) COMMIT
1243
+ 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]]
1244
+  (0.1ms) BEGIN
1245
+ 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-22 16:35:18.218730"], ["updated_at", "2018-02-22 16:35:18.218730"]]
1246
+  (0.3ms) COMMIT
1247
+  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)
1248
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC