canvas_sync 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -1
- data/app/models/canvas_sync/job_log.rb +8 -0
- data/db/migrate/20170915210836_create_canvas_sync_job_log.rb +16 -0
- data/lib/canvas_sync.rb +2 -1
- data/lib/canvas_sync/engine.rb +13 -0
- data/lib/canvas_sync/job.rb +29 -0
- data/lib/canvas_sync/jobs/report_checker.rb +1 -1
- data/lib/canvas_sync/jobs/report_processor_job.rb +1 -1
- data/lib/canvas_sync/jobs/report_starter.rb +1 -1
- data/lib/canvas_sync/jobs/sync_provisioning_report_job.rb +1 -1
- data/lib/canvas_sync/jobs/sync_terms_job.rb +1 -1
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/canvas_sync/jobs/job_spec.rb +40 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +13 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +740 -0
- data/spec/dummy/log/test.log +0 -0
- metadata +35 -2
- data/lib/canvas_sync/jobs/application_job.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbbd1539f4a800bb595198f919653e5b73454b7b
|
4
|
+
data.tar.gz: 75508d1a64e10df9cd21b413ccfda805be8abdbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b346284748712d882fba0f6ce149d8750967c832b58bf3c9446b51e6f0b02ab2d3346d54d9e3c0fc653785517faa93d35a5123146797c35d6db0242a8db4d6a
|
7
|
+
data.tar.gz: fa0fe09275931b1af5f08940515300543fcbbdf7557f0c650f294efc5512ff503f5f7da6eba1bb23a4e28853b69df651b50fb2d5ced403b837e15481a825a49c
|
data/README.md
CHANGED
@@ -18,6 +18,12 @@ bin/rails generate canvas_sync:install --models users,terms,courses
|
|
18
18
|
|
19
19
|
Use the `--models` option to specify what models you would like installed. This will add both the model files and their corresponding migrations. If you'd like to install all the models that `CanvasSync` supports then specify `--models all`.
|
20
20
|
|
21
|
+
Then run the migrations:
|
22
|
+
|
23
|
+
```
|
24
|
+
bundle exec rake db:migrate
|
25
|
+
```
|
26
|
+
|
21
27
|
For a list of currently supported models, see `CanvasSync::SUPPORTED_MODELS`.
|
22
28
|
|
23
29
|
Additionally, your Canvas instance must have the "Proserv Provisioning Report" enabled.
|
@@ -63,6 +69,17 @@ If you pass in the optional `term_scope` the provisioning reports will be run fo
|
|
63
69
|
|
64
70
|
Imports are inserted in bulk with [https://github.com/zdennis/activerecord-import](activerecord-import) so they should be very fast.
|
65
71
|
|
72
|
+
## CanvasSync::JobLog
|
73
|
+
|
74
|
+
Running the migrations will create a `canvas_sync_job_logs` table. All the jobs written in this gem will create a `CanvasSync::JobLog` and store data about their arguments, job class, any exceptions, and start/completion time. This will work regardless of your queue adapter.
|
75
|
+
|
76
|
+
If you want your own jobs to also log to the table all you have to do is have your job class inherit from `CanvasSync::Job`. You can also persist extra data you might need later by saving to the `metadata` column:
|
77
|
+
|
78
|
+
```
|
79
|
+
@job_log.metadata = "This job ran really well!"
|
80
|
+
@job_log.save!
|
81
|
+
```
|
82
|
+
|
66
83
|
## Advanced Usage
|
67
84
|
|
68
85
|
This gem also helps with syncing and processing other reports if needed. In order to do so, you must:
|
@@ -137,7 +154,7 @@ What if you've got some other job that you want run that doesn't deal with a rep
|
|
137
154
|
|
138
155
|
|
139
156
|
```
|
140
|
-
class SomeRandomJob < CanvasSync::
|
157
|
+
class SomeRandomJob < CanvasSync::Job
|
141
158
|
def perform(job_chain, options)
|
142
159
|
i_dunno_do_something!
|
143
160
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module CanvasSync
|
2
|
+
# When you write a job that inherits from CanvasSync::Job it will log to the canvas_sync_job_logs table
|
3
|
+
#
|
4
|
+
# Use this model to track failures, job run times, and metadata about a job.
|
5
|
+
class JobLog < ApplicationRecord
|
6
|
+
serialize :job_arguments, Array
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateCanvasSyncJobLog < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :canvas_sync_job_logs do |t|
|
4
|
+
t.datetime :started_at
|
5
|
+
t.datetime :completed_at
|
6
|
+
t.string :exception
|
7
|
+
t.text :backtrace
|
8
|
+
t.string :job_class
|
9
|
+
t.string :status
|
10
|
+
t.text :metadata
|
11
|
+
t.text :job_arguments
|
12
|
+
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/canvas_sync.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require "bearcat"
|
2
2
|
require "canvas_sync/version"
|
3
|
+
require "canvas_sync/engine"
|
3
4
|
|
4
|
-
require "canvas_sync/
|
5
|
+
require "canvas_sync/job"
|
5
6
|
require "canvas_sync/jobs/report_starter"
|
6
7
|
require "canvas_sync/jobs/report_checker"
|
7
8
|
require "canvas_sync/jobs/report_processor_job"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rails'
|
2
|
+
|
3
|
+
module CanvasSync
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
isolate_namespace CanvasSync
|
6
|
+
|
7
|
+
initializer :append_migrations do |app|
|
8
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
9
|
+
app.config.paths["db/migrate"] << expanded_path
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "active_job"
|
2
|
+
|
3
|
+
module CanvasSync
|
4
|
+
# Inherit from this class to build a Job that will log to the canvas_sync_job_logs table
|
5
|
+
class Job < ActiveJob::Base
|
6
|
+
around_perform do |job, block|
|
7
|
+
@job_log = CanvasSync::JobLog.create(
|
8
|
+
started_at: Time.now,
|
9
|
+
job_class: self.class.name,
|
10
|
+
job_arguments: job.arguments
|
11
|
+
)
|
12
|
+
|
13
|
+
begin
|
14
|
+
block.call
|
15
|
+
rescue => e
|
16
|
+
@job_log.exception = "#{e.class}: #{e.message}"
|
17
|
+
@job_log.backtrace = e.backtrace
|
18
|
+
raise e
|
19
|
+
ensure
|
20
|
+
@job_log.completed_at = Time.now
|
21
|
+
@job_log.save!
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def report_checker_wait_time
|
26
|
+
Rails.env.development? ? 1.second : 30.seconds
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -3,7 +3,7 @@ module CanvasSync
|
|
3
3
|
# ActiveJob class used to check the status of a pending Canvas report.
|
4
4
|
# Re-enqueues itself if the report is still processing on Canvas.
|
5
5
|
# Enqueues the ReportProcessor when the report has completed.
|
6
|
-
class ReportChecker <
|
6
|
+
class ReportChecker < CanvasSync::Job
|
7
7
|
# @param job_chain [Hash]
|
8
8
|
# @param report_name [Hash] e.g., 'provisioning_csv'
|
9
9
|
# @param report_id [Integer]
|
@@ -5,7 +5,7 @@ module CanvasSync
|
|
5
5
|
# ActiveJob class that wraps around a report processor. This job will
|
6
6
|
# download the report, and then pass the file path and options into the
|
7
7
|
# process method on the processor.
|
8
|
-
class ReportProcessorJob <
|
8
|
+
class ReportProcessorJob < CanvasSync::Job
|
9
9
|
# @param job_chain [Hash]
|
10
10
|
# @param report_name [Hash] e.g., 'provisioning_csv'
|
11
11
|
# @param report_url [String]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module CanvasSync
|
2
2
|
module Jobs
|
3
3
|
# Starts a Canvas report and enqueues a ReportChecker
|
4
|
-
class ReportStarter <
|
4
|
+
class ReportStarter < CanvasSync::Job
|
5
5
|
# @param job_chain [Hash]
|
6
6
|
# @param report_name [Hash] e.g., 'provisioning_csv'
|
7
7
|
# @param report_params [Hash] The Canvas report parameters
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module CanvasSync
|
2
2
|
module Jobs
|
3
3
|
# ActiveJob class that starts a Canvas provisioning report
|
4
|
-
class SyncProvisioningReportJob <
|
4
|
+
class SyncProvisioningReportJob < CanvasSync::Job
|
5
5
|
# @param job_chain [Hash]
|
6
6
|
# @param options [Hash] If options contains a :term_scope a seperate provisioning report
|
7
7
|
# will be started for each term in that scope. :models should be an array of
|
data/lib/canvas_sync/version.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
class GoodJob < CanvasSync::Job
|
4
|
+
def perform(argument)
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
class EvilError < StandardError; end;
|
9
|
+
|
10
|
+
class BadJob < CanvasSync::Job
|
11
|
+
def perform(argument)
|
12
|
+
raise EvilError
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
RSpec.describe CanvasSync::Job do
|
17
|
+
describe '#perform' do
|
18
|
+
it 'creates a CanvasSync::JobLog and logs relevant data on it' do
|
19
|
+
expect {
|
20
|
+
GoodJob.perform_now("argument")
|
21
|
+
}.to change { CanvasSync::JobLog.count }.by(1)
|
22
|
+
|
23
|
+
job_log = CanvasSync::JobLog.last
|
24
|
+
expect(job_log.started_at).to_not be_nil
|
25
|
+
expect(job_log.job_class).to eq(GoodJob.to_s)
|
26
|
+
expect(job_log.job_arguments).to eq(["argument"])
|
27
|
+
expect(job_log.completed_at).to_not be_nil
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'logs exceptions on the CanvasSync::JobLog and then re-raises' do
|
31
|
+
expect {
|
32
|
+
BadJob.perform_now("argument")
|
33
|
+
}.to raise_exception(StandardError)
|
34
|
+
|
35
|
+
job_log = CanvasSync::JobLog.last
|
36
|
+
expect(job_log.exception).to eq("EvilError: EvilError")
|
37
|
+
expect(job_log.backtrace).to_not be_nil
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,19 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 20170915210836) do
|
14
|
+
|
15
|
+
create_table "canvas_sync_job_logs", force: :cascade do |t|
|
16
|
+
t.datetime "started_at"
|
17
|
+
t.datetime "completed_at"
|
18
|
+
t.string "exception"
|
19
|
+
t.text "backtrace"
|
20
|
+
t.string "job_class"
|
21
|
+
t.text "metadata"
|
22
|
+
t.text "job_arguments"
|
23
|
+
t.datetime "created_at", null: false
|
24
|
+
t.datetime "updated_at", null: false
|
25
|
+
end
|
14
26
|
|
15
27
|
create_table "courses", force: :cascade do |t|
|
16
28
|
t.bigint "canvas_course_id", null: false
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -3499,4 +3499,744 @@ Migrating to CreateCourses (20170914181345)
|
|
3499
3499
|
SELECT sql
|
3500
3500
|
FROM sqlite_temp_master
|
3501
3501
|
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3502
|
+
[0m
|
3503
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3504
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3505
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3506
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3507
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3508
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3509
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
3510
|
+
[1m[35m (2.6ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
3511
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3512
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3513
|
+
Migrating to CreateUsers (20170831221129)
|
3514
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3515
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3516
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
3517
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170831221129"]]
|
3518
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
3519
|
+
Migrating to CreateEnrollments (20170905192509)
|
3520
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3521
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3522
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
3523
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3524
|
+
FROM sqlite_master
|
3525
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3526
|
+
UNION ALL
|
3527
|
+
SELECT sql
|
3528
|
+
FROM sqlite_temp_master
|
3529
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3530
|
+
[0m
|
3531
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
3532
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3533
|
+
FROM sqlite_master
|
3534
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3535
|
+
UNION ALL
|
3536
|
+
SELECT sql
|
3537
|
+
FROM sqlite_temp_master
|
3538
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3539
|
+
[0m
|
3540
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3541
|
+
FROM sqlite_master
|
3542
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3543
|
+
UNION ALL
|
3544
|
+
SELECT sql
|
3545
|
+
FROM sqlite_temp_master
|
3546
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3547
|
+
[0m
|
3548
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
3549
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170905192509"]]
|
3550
|
+
[1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
|
3551
|
+
Migrating to CreateTerms (20170906193506)
|
3552
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3553
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3554
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
3555
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906193506"]]
|
3556
|
+
[1m[35m (0.6ms)[0m [1m[36mcommit transaction[0m
|
3557
|
+
Migrating to CreateSections (20170906203438)
|
3558
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3559
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3560
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
3561
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3562
|
+
FROM sqlite_master
|
3563
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3564
|
+
UNION ALL
|
3565
|
+
SELECT sql
|
3566
|
+
FROM sqlite_temp_master
|
3567
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3568
|
+
[0m
|
3569
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
3570
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906203438"]]
|
3571
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
3572
|
+
Migrating to CreateCourses (20170914181345)
|
3573
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3574
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3575
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
3576
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170914181345"]]
|
3577
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
3578
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
3579
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3580
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:17:29.585581"], ["updated_at", "2017-09-15 21:17:29.585581"]]
|
3581
|
+
[1m[35m (0.6ms)[0m [1m[36mcommit transaction[0m
|
3582
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3583
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3584
|
+
FROM sqlite_master
|
3585
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
3586
|
+
UNION ALL
|
3587
|
+
SELECT sql
|
3588
|
+
FROM sqlite_temp_master
|
3589
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
3590
|
+
[0m
|
3591
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3592
|
+
FROM sqlite_master
|
3593
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
3594
|
+
UNION ALL
|
3595
|
+
SELECT sql
|
3596
|
+
FROM sqlite_temp_master
|
3597
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
3598
|
+
[0m
|
3599
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3600
|
+
FROM sqlite_master
|
3601
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3602
|
+
UNION ALL
|
3603
|
+
SELECT sql
|
3604
|
+
FROM sqlite_temp_master
|
3605
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3606
|
+
[0m
|
3607
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3608
|
+
FROM sqlite_master
|
3609
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3610
|
+
UNION ALL
|
3611
|
+
SELECT sql
|
3612
|
+
FROM sqlite_temp_master
|
3613
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3614
|
+
[0m
|
3615
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3616
|
+
FROM sqlite_master
|
3617
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
3618
|
+
UNION ALL
|
3619
|
+
SELECT sql
|
3620
|
+
FROM sqlite_temp_master
|
3621
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
3622
|
+
[0m
|
3623
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3624
|
+
FROM sqlite_master
|
3625
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3626
|
+
UNION ALL
|
3627
|
+
SELECT sql
|
3628
|
+
FROM sqlite_temp_master
|
3629
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3630
|
+
[0m
|
3631
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3632
|
+
FROM sqlite_master
|
3633
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
3634
|
+
UNION ALL
|
3635
|
+
SELECT sql
|
3636
|
+
FROM sqlite_temp_master
|
3637
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
3638
|
+
[0m
|
3639
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3640
|
+
FROM sqlite_master
|
3641
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3642
|
+
UNION ALL
|
3643
|
+
SELECT sql
|
3644
|
+
FROM sqlite_temp_master
|
3645
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3646
|
+
[0m
|
3647
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3648
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3649
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3650
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3651
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3652
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3653
|
+
[1m[35m (0.6ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
3654
|
+
[1m[35m (7.0ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
3655
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3656
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3657
|
+
Migrating to CreateUsers (20170831221129)
|
3658
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3659
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3660
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
3661
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170831221129"]]
|
3662
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
3663
|
+
Migrating to CreateEnrollments (20170905192509)
|
3664
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3665
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3666
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
3667
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3668
|
+
FROM sqlite_master
|
3669
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3670
|
+
UNION ALL
|
3671
|
+
SELECT sql
|
3672
|
+
FROM sqlite_temp_master
|
3673
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3674
|
+
[0m
|
3675
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
3676
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3677
|
+
FROM sqlite_master
|
3678
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3679
|
+
UNION ALL
|
3680
|
+
SELECT sql
|
3681
|
+
FROM sqlite_temp_master
|
3682
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3683
|
+
[0m
|
3684
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3685
|
+
FROM sqlite_master
|
3686
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3687
|
+
UNION ALL
|
3688
|
+
SELECT sql
|
3689
|
+
FROM sqlite_temp_master
|
3690
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3691
|
+
[0m
|
3692
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
3693
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170905192509"]]
|
3694
|
+
[1m[35m (1.2ms)[0m [1m[36mcommit transaction[0m
|
3695
|
+
Migrating to CreateTerms (20170906193506)
|
3696
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3697
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3698
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
3699
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906193506"]]
|
3700
|
+
[1m[35m (1.1ms)[0m [1m[36mcommit transaction[0m
|
3701
|
+
Migrating to CreateSections (20170906203438)
|
3702
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3703
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3704
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
3705
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3706
|
+
FROM sqlite_master
|
3707
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3708
|
+
UNION ALL
|
3709
|
+
SELECT sql
|
3710
|
+
FROM sqlite_temp_master
|
3711
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3712
|
+
[0m
|
3713
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
3714
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906203438"]]
|
3715
|
+
[1m[35m (1.5ms)[0m [1m[36mcommit transaction[0m
|
3716
|
+
Migrating to CreateCourses (20170914181345)
|
3717
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3718
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3719
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
3720
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170914181345"]]
|
3721
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
3722
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
3723
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3724
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "canvas_sync_job_log" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3725
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170915210836"]]
|
3726
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
3727
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
3728
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3729
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:18:47.212758"], ["updated_at", "2017-09-15 21:18:47.212758"]]
|
3730
|
+
[1m[35m (1.2ms)[0m [1m[36mcommit transaction[0m
|
3731
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3732
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3733
|
+
FROM sqlite_master
|
3734
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
3735
|
+
UNION ALL
|
3736
|
+
SELECT sql
|
3737
|
+
FROM sqlite_temp_master
|
3738
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
3739
|
+
[0m
|
3740
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3741
|
+
FROM sqlite_master
|
3742
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
3743
|
+
UNION ALL
|
3744
|
+
SELECT sql
|
3745
|
+
FROM sqlite_temp_master
|
3746
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
3747
|
+
[0m
|
3748
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3749
|
+
FROM sqlite_master
|
3750
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3751
|
+
UNION ALL
|
3752
|
+
SELECT sql
|
3753
|
+
FROM sqlite_temp_master
|
3754
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3755
|
+
[0m
|
3756
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3757
|
+
FROM sqlite_master
|
3758
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3759
|
+
UNION ALL
|
3760
|
+
SELECT sql
|
3761
|
+
FROM sqlite_temp_master
|
3762
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3763
|
+
[0m
|
3764
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3765
|
+
FROM sqlite_master
|
3766
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
3767
|
+
UNION ALL
|
3768
|
+
SELECT sql
|
3769
|
+
FROM sqlite_temp_master
|
3770
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
3771
|
+
[0m
|
3772
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3773
|
+
FROM sqlite_master
|
3774
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3775
|
+
UNION ALL
|
3776
|
+
SELECT sql
|
3777
|
+
FROM sqlite_temp_master
|
3778
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3779
|
+
[0m
|
3780
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3781
|
+
FROM sqlite_master
|
3782
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
3783
|
+
UNION ALL
|
3784
|
+
SELECT sql
|
3785
|
+
FROM sqlite_temp_master
|
3786
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
3787
|
+
[0m
|
3788
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3789
|
+
FROM sqlite_master
|
3790
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3791
|
+
UNION ALL
|
3792
|
+
SELECT sql
|
3793
|
+
FROM sqlite_temp_master
|
3794
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3795
|
+
[0m
|
3796
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3797
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3798
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3799
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3800
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3801
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3802
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
3803
|
+
[1m[35m (6.8ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
3804
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3805
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3806
|
+
Migrating to CreateUsers (20170831221129)
|
3807
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3808
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3809
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
3810
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170831221129"]]
|
3811
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
3812
|
+
Migrating to CreateEnrollments (20170905192509)
|
3813
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3814
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3815
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
3816
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3817
|
+
FROM sqlite_master
|
3818
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3819
|
+
UNION ALL
|
3820
|
+
SELECT sql
|
3821
|
+
FROM sqlite_temp_master
|
3822
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3823
|
+
[0m
|
3824
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
3825
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3826
|
+
FROM sqlite_master
|
3827
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3828
|
+
UNION ALL
|
3829
|
+
SELECT sql
|
3830
|
+
FROM sqlite_temp_master
|
3831
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3832
|
+
[0m
|
3833
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3834
|
+
FROM sqlite_master
|
3835
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3836
|
+
UNION ALL
|
3837
|
+
SELECT sql
|
3838
|
+
FROM sqlite_temp_master
|
3839
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3840
|
+
[0m
|
3841
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
3842
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170905192509"]]
|
3843
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
3844
|
+
Migrating to CreateTerms (20170906193506)
|
3845
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3846
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3847
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
3848
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906193506"]]
|
3849
|
+
[1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
|
3850
|
+
Migrating to CreateSections (20170906203438)
|
3851
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3852
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3853
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
3854
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3855
|
+
FROM sqlite_master
|
3856
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3857
|
+
UNION ALL
|
3858
|
+
SELECT sql
|
3859
|
+
FROM sqlite_temp_master
|
3860
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3861
|
+
[0m
|
3862
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
3863
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906203438"]]
|
3864
|
+
[1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
|
3865
|
+
Migrating to CreateCourses (20170914181345)
|
3866
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3867
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3868
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
3869
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170914181345"]]
|
3870
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
3871
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
3872
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3873
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3874
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170915210836"]]
|
3875
|
+
[1m[35m (1.1ms)[0m [1m[36mcommit transaction[0m
|
3876
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
3877
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3878
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:19:15.229214"], ["updated_at", "2017-09-15 21:19:15.229214"]]
|
3879
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
3880
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3881
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3882
|
+
FROM sqlite_master
|
3883
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
3884
|
+
UNION ALL
|
3885
|
+
SELECT sql
|
3886
|
+
FROM sqlite_temp_master
|
3887
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
3888
|
+
[0m
|
3889
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3890
|
+
FROM sqlite_master
|
3891
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
3892
|
+
UNION ALL
|
3893
|
+
SELECT sql
|
3894
|
+
FROM sqlite_temp_master
|
3895
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
3896
|
+
[0m
|
3897
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3898
|
+
FROM sqlite_master
|
3899
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3900
|
+
UNION ALL
|
3901
|
+
SELECT sql
|
3902
|
+
FROM sqlite_temp_master
|
3903
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3904
|
+
[0m
|
3905
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3906
|
+
FROM sqlite_master
|
3907
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3908
|
+
UNION ALL
|
3909
|
+
SELECT sql
|
3910
|
+
FROM sqlite_temp_master
|
3911
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3912
|
+
[0m
|
3913
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3914
|
+
FROM sqlite_master
|
3915
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
3916
|
+
UNION ALL
|
3917
|
+
SELECT sql
|
3918
|
+
FROM sqlite_temp_master
|
3919
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
3920
|
+
[0m
|
3921
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3922
|
+
FROM sqlite_master
|
3923
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3924
|
+
UNION ALL
|
3925
|
+
SELECT sql
|
3926
|
+
FROM sqlite_temp_master
|
3927
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
3928
|
+
[0m
|
3929
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3930
|
+
FROM sqlite_master
|
3931
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
3932
|
+
UNION ALL
|
3933
|
+
SELECT sql
|
3934
|
+
FROM sqlite_temp_master
|
3935
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
3936
|
+
[0m
|
3937
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3938
|
+
FROM sqlite_master
|
3939
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3940
|
+
UNION ALL
|
3941
|
+
SELECT sql
|
3942
|
+
FROM sqlite_temp_master
|
3943
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3944
|
+
[0m
|
3945
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3946
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3947
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3948
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3949
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3950
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
3951
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
3952
|
+
[1m[35m (6.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
3953
|
+
[1m[35m (0.8ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3954
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3955
|
+
Migrating to CreateUsers (20170831221129)
|
3956
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3957
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3958
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
3959
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170831221129"]]
|
3960
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
3961
|
+
Migrating to CreateEnrollments (20170905192509)
|
3962
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
3963
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3964
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
3965
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3966
|
+
FROM sqlite_master
|
3967
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3968
|
+
UNION ALL
|
3969
|
+
SELECT sql
|
3970
|
+
FROM sqlite_temp_master
|
3971
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3972
|
+
[0m
|
3973
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
3974
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3975
|
+
FROM sqlite_master
|
3976
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3977
|
+
UNION ALL
|
3978
|
+
SELECT sql
|
3979
|
+
FROM sqlite_temp_master
|
3980
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
3981
|
+
[0m
|
3982
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
3983
|
+
FROM sqlite_master
|
3984
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3985
|
+
UNION ALL
|
3986
|
+
SELECT sql
|
3987
|
+
FROM sqlite_temp_master
|
3988
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
3989
|
+
[0m
|
3990
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
3991
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170905192509"]]
|
3992
|
+
[1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
|
3993
|
+
Migrating to CreateTerms (20170906193506)
|
3994
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
3995
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3996
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
3997
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906193506"]]
|
3998
|
+
[1m[35m (1.1ms)[0m [1m[36mcommit transaction[0m
|
3999
|
+
Migrating to CreateSections (20170906203438)
|
4000
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4001
|
+
[1m[35m (0.5ms)[0m [1m[35mCREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4002
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
4003
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4004
|
+
FROM sqlite_master
|
4005
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4006
|
+
UNION ALL
|
4007
|
+
SELECT sql
|
4008
|
+
FROM sqlite_temp_master
|
4009
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4010
|
+
[0m
|
4011
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
4012
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906203438"]]
|
4013
|
+
[1m[35m (1.3ms)[0m [1m[36mcommit transaction[0m
|
4014
|
+
Migrating to CreateCourses (20170914181345)
|
4015
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4016
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4017
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
4018
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170914181345"]]
|
4019
|
+
[1m[35m (1.1ms)[0m [1m[36mcommit transaction[0m
|
4020
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
4021
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4022
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "job_arguments" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4023
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170915210836"]]
|
4024
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
4025
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
4026
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
4027
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:35:28.273157"], ["updated_at", "2017-09-15 21:35:28.273157"]]
|
4028
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
4029
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
4030
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4031
|
+
FROM sqlite_master
|
4032
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
4033
|
+
UNION ALL
|
4034
|
+
SELECT sql
|
4035
|
+
FROM sqlite_temp_master
|
4036
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
4037
|
+
[0m
|
4038
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4039
|
+
FROM sqlite_master
|
4040
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
4041
|
+
UNION ALL
|
4042
|
+
SELECT sql
|
4043
|
+
FROM sqlite_temp_master
|
4044
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
4045
|
+
[0m
|
4046
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4047
|
+
FROM sqlite_master
|
4048
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
4049
|
+
UNION ALL
|
4050
|
+
SELECT sql
|
4051
|
+
FROM sqlite_temp_master
|
4052
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
4053
|
+
[0m
|
4054
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4055
|
+
FROM sqlite_master
|
4056
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4057
|
+
UNION ALL
|
4058
|
+
SELECT sql
|
4059
|
+
FROM sqlite_temp_master
|
4060
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4061
|
+
[0m
|
4062
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4063
|
+
FROM sqlite_master
|
4064
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
4065
|
+
UNION ALL
|
4066
|
+
SELECT sql
|
4067
|
+
FROM sqlite_temp_master
|
4068
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
4069
|
+
[0m
|
4070
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4071
|
+
FROM sqlite_master
|
4072
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4073
|
+
UNION ALL
|
4074
|
+
SELECT sql
|
4075
|
+
FROM sqlite_temp_master
|
4076
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4077
|
+
[0m
|
4078
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4079
|
+
FROM sqlite_master
|
4080
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
4081
|
+
UNION ALL
|
4082
|
+
SELECT sql
|
4083
|
+
FROM sqlite_temp_master
|
4084
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
4085
|
+
[0m
|
4086
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4087
|
+
FROM sqlite_master
|
4088
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
4089
|
+
UNION ALL
|
4090
|
+
SELECT sql
|
4091
|
+
FROM sqlite_temp_master
|
4092
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
4093
|
+
[0m
|
4094
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
4095
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
4096
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
4097
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
4098
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
4099
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
4100
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
4101
|
+
[1m[35m (7.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
4102
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4103
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
4104
|
+
Migrating to CreateUsers (20170831221129)
|
4105
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4106
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_user_id" bigint NOT NULL, "sis_id" varchar, "email" varchar, "first_name" varchar, "last_name" varchar, "status" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4107
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
4108
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170831221129"]]
|
4109
|
+
[1m[35m (1.7ms)[0m [1m[36mcommit transaction[0m
|
4110
|
+
Migrating to CreateEnrollments (20170905192509)
|
4111
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4112
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "enrollments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" varchar, "canvas_user_id" bigint, "user_sis_id" varchar, "role" varchar, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" varchar, "status" varchar, "base_role_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4113
|
+
[1m[35m (0.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
4114
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4115
|
+
FROM sqlite_master
|
4116
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4117
|
+
UNION ALL
|
4118
|
+
SELECT sql
|
4119
|
+
FROM sqlite_temp_master
|
4120
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4121
|
+
[0m
|
4122
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
4123
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4124
|
+
FROM sqlite_master
|
4125
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
4126
|
+
UNION ALL
|
4127
|
+
SELECT sql
|
4128
|
+
FROM sqlite_temp_master
|
4129
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
4130
|
+
[0m
|
4131
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4132
|
+
FROM sqlite_master
|
4133
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4134
|
+
UNION ALL
|
4135
|
+
SELECT sql
|
4136
|
+
FROM sqlite_temp_master
|
4137
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4138
|
+
[0m
|
4139
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
4140
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170905192509"]]
|
4141
|
+
[1m[35m (1.6ms)[0m [1m[36mcommit transaction[0m
|
4142
|
+
Migrating to CreateTerms (20170906193506)
|
4143
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4144
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "terms" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_term_id" integer NOT NULL, "name" varchar, "start_at" datetime, "end_at" datetime, "workflow_state" varchar, "grading_period_group_id" integer, "sis_id" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4145
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
4146
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906193506"]]
|
4147
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
4148
|
+
Migrating to CreateSections (20170906203438)
|
4149
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4150
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "sections" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_section_id" bigint NOT NULL, "sis_id" varchar, "canvas_course_id" bigint, "name" varchar, "status" varchar, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4151
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
4152
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4153
|
+
FROM sqlite_master
|
4154
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4155
|
+
UNION ALL
|
4156
|
+
SELECT sql
|
4157
|
+
FROM sqlite_temp_master
|
4158
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4159
|
+
[0m
|
4160
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
4161
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170906203438"]]
|
4162
|
+
[1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
|
4163
|
+
Migrating to CreateCourses (20170914181345)
|
4164
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4165
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "courses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "canvas_course_id" bigint NOT NULL, "sis_id" varchar, "short_name" varchar, "long_name" varchar, "status" varchar, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" datetime, "end_date" datetime, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4166
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
4167
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170914181345"]]
|
4168
|
+
[1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
|
4169
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
4170
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4171
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "canvas_sync_job_logs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "started_at" datetime, "completed_at" datetime, "exception" varchar, "backtrace" text, "job_class" varchar, "metadata" text, "job_arguments" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
4172
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20170915210836"]]
|
4173
|
+
[1m[35m (1.3ms)[0m [1m[36mcommit transaction[0m
|
4174
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
4175
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
4176
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2017-09-15 21:36:11.447580"], ["updated_at", "2017-09-15 21:36:11.447580"]]
|
4177
|
+
[1m[35m (0.7ms)[0m [1m[36mcommit transaction[0m
|
4178
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
4179
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4180
|
+
FROM sqlite_master
|
4181
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
4182
|
+
UNION ALL
|
4183
|
+
SELECT sql
|
4184
|
+
FROM sqlite_temp_master
|
4185
|
+
WHERE name='index_courses_on_canvas_course_id' AND type='index'
|
4186
|
+
[0m
|
4187
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4188
|
+
FROM sqlite_master
|
4189
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
4190
|
+
UNION ALL
|
4191
|
+
SELECT sql
|
4192
|
+
FROM sqlite_temp_master
|
4193
|
+
WHERE name='index_enrollments_on_canvas_user_id' AND type='index'
|
4194
|
+
[0m
|
4195
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4196
|
+
FROM sqlite_master
|
4197
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
4198
|
+
UNION ALL
|
4199
|
+
SELECT sql
|
4200
|
+
FROM sqlite_temp_master
|
4201
|
+
WHERE name='index_enrollments_on_canvas_course_id' AND type='index'
|
4202
|
+
[0m
|
4203
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4204
|
+
FROM sqlite_master
|
4205
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4206
|
+
UNION ALL
|
4207
|
+
SELECT sql
|
4208
|
+
FROM sqlite_temp_master
|
4209
|
+
WHERE name='index_enrollments_on_canvas_enrollment_id' AND type='index'
|
4210
|
+
[0m
|
4211
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4212
|
+
FROM sqlite_master
|
4213
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
4214
|
+
UNION ALL
|
4215
|
+
SELECT sql
|
4216
|
+
FROM sqlite_temp_master
|
4217
|
+
WHERE name='index_sections_on_canvas_course_id' AND type='index'
|
4218
|
+
[0m
|
4219
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4220
|
+
FROM sqlite_master
|
4221
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4222
|
+
UNION ALL
|
4223
|
+
SELECT sql
|
4224
|
+
FROM sqlite_temp_master
|
4225
|
+
WHERE name='index_sections_on_canvas_section_id' AND type='index'
|
4226
|
+
[0m
|
4227
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4228
|
+
FROM sqlite_master
|
4229
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
4230
|
+
UNION ALL
|
4231
|
+
SELECT sql
|
4232
|
+
FROM sqlite_temp_master
|
4233
|
+
WHERE name='index_terms_on_canvas_term_id' AND type='index'
|
4234
|
+
[0m
|
4235
|
+
[1m[35m (0.1ms)[0m [1m[34m SELECT sql
|
4236
|
+
FROM sqlite_master
|
4237
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
4238
|
+
UNION ALL
|
4239
|
+
SELECT sql
|
4240
|
+
FROM sqlite_temp_master
|
4241
|
+
WHERE name='index_users_on_canvas_user_id' AND type='index'
|
3502
4242
|
[0m
|
data/spec/dummy/log/test.log
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canvas_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Collings
|
@@ -178,6 +178,34 @@ dependencies:
|
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: pry
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: pry-nav
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
181
209
|
- !ruby/object:Gem::Dependency
|
182
210
|
name: activejob
|
183
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -257,7 +285,10 @@ extra_rdoc_files: []
|
|
257
285
|
files:
|
258
286
|
- README.md
|
259
287
|
- Rakefile
|
288
|
+
- app/models/canvas_sync/job_log.rb
|
289
|
+
- db/migrate/20170915210836_create_canvas_sync_job_log.rb
|
260
290
|
- lib/canvas_sync.rb
|
291
|
+
- lib/canvas_sync/engine.rb
|
261
292
|
- lib/canvas_sync/generators/install_generator.rb
|
262
293
|
- lib/canvas_sync/generators/templates/course.rb
|
263
294
|
- lib/canvas_sync/generators/templates/create_courses.rb
|
@@ -270,7 +301,7 @@ files:
|
|
270
301
|
- lib/canvas_sync/generators/templates/term.rb
|
271
302
|
- lib/canvas_sync/generators/templates/user.rb
|
272
303
|
- lib/canvas_sync/importers/bulk_importer.rb
|
273
|
-
- lib/canvas_sync/
|
304
|
+
- lib/canvas_sync/job.rb
|
274
305
|
- lib/canvas_sync/jobs/report_checker.rb
|
275
306
|
- lib/canvas_sync/jobs/report_processor_job.rb
|
276
307
|
- lib/canvas_sync/jobs/report_starter.rb
|
@@ -280,6 +311,7 @@ files:
|
|
280
311
|
- lib/canvas_sync/processors/provisioning_report_processor.rb
|
281
312
|
- lib/canvas_sync/version.rb
|
282
313
|
- spec/canvas_sync/canvas_sync_spec.rb
|
314
|
+
- spec/canvas_sync/jobs/job_spec.rb
|
283
315
|
- spec/canvas_sync/jobs/report_checker_spec.rb
|
284
316
|
- spec/canvas_sync/jobs/report_processor_job_spec.rb
|
285
317
|
- spec/canvas_sync/jobs/report_starter_spec.rb
|
@@ -363,6 +395,7 @@ specification_version: 4
|
|
363
395
|
summary: Gem for generating Canvas models and migrations and syncing data from Canvas
|
364
396
|
test_files:
|
365
397
|
- spec/canvas_sync/canvas_sync_spec.rb
|
398
|
+
- spec/canvas_sync/jobs/job_spec.rb
|
366
399
|
- spec/canvas_sync/jobs/report_checker_spec.rb
|
367
400
|
- spec/canvas_sync/jobs/report_processor_job_spec.rb
|
368
401
|
- spec/canvas_sync/jobs/report_starter_spec.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require "active_job"
|
2
|
-
|
3
|
-
module CanvasSync
|
4
|
-
module Jobs
|
5
|
-
# Inherit from this class to build a Job that integrates
|
6
|
-
# well with this gem.
|
7
|
-
class ApplicationJob < ActiveJob::Base
|
8
|
-
# Returns the amount of time to wait between report status checks
|
9
|
-
#
|
10
|
-
# @return [Integer]
|
11
|
-
def report_checker_wait_time
|
12
|
-
Rails.env.development? ? 1.second : 30.seconds
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|