canvas_sync 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/canvas_sync.rb +1 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_item/module_item_created_event.rb +6 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_item/module_item_event.rb +37 -0
- data/lib/canvas_sync/generators/templates/services/live_events/module_item/module_item_updated_event.rb +6 -0
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/canvas_sync/services/module_item_event_spec.rb +47 -0
- data/spec/dummy/app/services/live_events/module_item_created_event.rb +12 -0
- data/spec/dummy/app/services/live_events/module_item_event.rb +43 -0
- data/spec/dummy/app/services/live_events/module_item_updated_event.rb +12 -0
- data/spec/dummy/log/development.log +444 -0
- data/spec/dummy/log/test.log +1468 -0
- data/spec/support/fake_canvas.rb +4 -0
- data/spec/support/fixtures/canvas_responses/module_item.json +12 -0
- metadata +14 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 911d67b330dfd137deb4a5bc9dc87ae99efcd2f4906d27925044985299d405ff
|
4
|
+
data.tar.gz: e7ae278ea03a7cb0ef557af6b71f778b2754d0975e555c09894627b57c955c6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3dc580b3581a1549b85816f46eaca388abbd2cb5ca7db44bc1fb96fc2d453ace537beb7d8ac31ad53b0ef8ac365b45f4a1eeed0772791ef6d957087c5367ee6
|
7
|
+
data.tar.gz: e5785c8363ab10efafd1eee7798e1a5869067c65a998000cdac16418c194e50fca56e843f37c33449e456a80171d1f78ef6891377c66f53a188f4ecbbf63cd22
|
data/lib/canvas_sync.rb
CHANGED
data/lib/canvas_sync/generators/templates/services/live_events/module_item/module_item_event.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# <%= autogenerated_event_warning %>
|
2
|
+
|
3
|
+
module LiveEvents
|
4
|
+
class ModuleItemEvent < LiveEvents::BaseEvent
|
5
|
+
# The following is provided in the live events call:
|
6
|
+
# {
|
7
|
+
# module_item_id,
|
8
|
+
# module_id,
|
9
|
+
# context_id,
|
10
|
+
# context_type,
|
11
|
+
# position,
|
12
|
+
# workflow_state,
|
13
|
+
# }
|
14
|
+
|
15
|
+
def perform(_event_payload)
|
16
|
+
super
|
17
|
+
create_or_update_from_api(payload)
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def create_or_update_from_api(payload)
|
23
|
+
context_module_item = ContextModuleItem.find_or_initialize_by(canvas_context_module_item_id: payload["module_item_id"])
|
24
|
+
api_params = canvas_sync_client.module_item(payload["context_id"], payload["module_id"], payload["module_item_id"])
|
25
|
+
|
26
|
+
context_module_item.assign_attributes(
|
27
|
+
canvas_context_module_id: payload["module_id"],
|
28
|
+
position: payload["position"],
|
29
|
+
workflow_state: payload["workflow_state"],
|
30
|
+
content_id: api_params["content_id"],
|
31
|
+
content_type: api_params["type"],
|
32
|
+
)
|
33
|
+
|
34
|
+
context_module_item.save! if context_module_item.changed?
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/canvas_sync/version.rb
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe LiveEvents::ModuleItemEvent do
|
4
|
+
let(:payload) {
|
5
|
+
{
|
6
|
+
"body" => {
|
7
|
+
module_item_id: 1,
|
8
|
+
module_id: 1,
|
9
|
+
context_id: 1,
|
10
|
+
context_type: "assignment",
|
11
|
+
position: 10,
|
12
|
+
workflow_state: "active",
|
13
|
+
},
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
describe "#perform" do
|
18
|
+
context "the module item already exists" do
|
19
|
+
let!(:cmi) { FactoryGirl.create(:context_module_item, canvas_context_module_item_id: payload["body"][:module_item_id]) }
|
20
|
+
|
21
|
+
it "updates it" do
|
22
|
+
expect {
|
23
|
+
LiveEvents::ModuleItemEvent.new.perform(payload)
|
24
|
+
}.to_not change { ContextModuleItem.count }
|
25
|
+
expect(cmi.reload.canvas_context_module_id).to eq(payload["body"][:module_item_id])
|
26
|
+
expect(cmi.position).to eq(payload["body"][:position])
|
27
|
+
expect(cmi.workflow_state).to eq(payload["body"][:workflow_state])
|
28
|
+
expect(cmi.content_type).to eq("Assignment")
|
29
|
+
expect(cmi.content_id).to eq(143)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "the module item does not already exist" do
|
34
|
+
it "creates it" do
|
35
|
+
expect {
|
36
|
+
LiveEvents::ModuleItemEvent.new.perform(payload)
|
37
|
+
}.to change { ContextModuleItem.count }.by(1)
|
38
|
+
cmi = ContextModuleItem.last
|
39
|
+
expect(cmi.canvas_context_module_id).to eq(payload["body"][:module_item_id])
|
40
|
+
expect(cmi.position).to eq(payload["body"][:position])
|
41
|
+
expect(cmi.workflow_state).to eq(payload["body"][:workflow_state])
|
42
|
+
expect(cmi.content_type).to eq("Assignment")
|
43
|
+
expect(cmi.content_id).to eq(143)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# #
|
2
|
+
# AUTO GENERATED LIVE EVENT
|
3
|
+
# This was auto generated by the CanvasSync Gem.
|
4
|
+
# You can customize it as needed, but make sure you test
|
5
|
+
# any changes you make to the auto generated methods.
|
6
|
+
#
|
7
|
+
|
8
|
+
|
9
|
+
module LiveEvents
|
10
|
+
class ModuleItemCreatedEvent < LiveEvents::ModuleItemEvent
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# #
|
2
|
+
# AUTO GENERATED LIVE EVENT
|
3
|
+
# This was auto generated by the CanvasSync Gem.
|
4
|
+
# You can customize it as needed, but make sure you test
|
5
|
+
# any changes you make to the auto generated methods.
|
6
|
+
#
|
7
|
+
|
8
|
+
|
9
|
+
module LiveEvents
|
10
|
+
class ModuleItemEvent < LiveEvents::BaseEvent
|
11
|
+
# The following is provided in the live events call:
|
12
|
+
# {
|
13
|
+
# module_item_id,
|
14
|
+
# module_id,
|
15
|
+
# context_id,
|
16
|
+
# context_type,
|
17
|
+
# position,
|
18
|
+
# workflow_state,
|
19
|
+
# }
|
20
|
+
|
21
|
+
def perform(_event_payload)
|
22
|
+
super
|
23
|
+
create_or_update_from_api(payload)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def create_or_update_from_api(payload)
|
29
|
+
context_module_item = ContextModuleItem.find_or_initialize_by(canvas_context_module_item_id: payload["module_item_id"])
|
30
|
+
api_params = canvas_sync_client.module_item(payload["context_id"], payload["module_id"], payload["module_item_id"])
|
31
|
+
|
32
|
+
context_module_item.assign_attributes(
|
33
|
+
canvas_context_module_id: payload["module_id"],
|
34
|
+
position: payload["position"],
|
35
|
+
workflow_state: payload["workflow_state"],
|
36
|
+
content_id: api_params["content_id"],
|
37
|
+
content_type: api_params["type"],
|
38
|
+
)
|
39
|
+
|
40
|
+
context_module_item.save! if context_module_item.changed?
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# #
|
2
|
+
# AUTO GENERATED LIVE EVENT
|
3
|
+
# This was auto generated by the CanvasSync Gem.
|
4
|
+
# You can customize it as needed, but make sure you test
|
5
|
+
# any changes you make to the auto generated methods.
|
6
|
+
#
|
7
|
+
|
8
|
+
|
9
|
+
module LiveEvents
|
10
|
+
class ModuleItemUpdatedEvent < LiveEvents::ModuleItemEvent
|
11
|
+
end
|
12
|
+
end
|
@@ -2841,3 +2841,447 @@ Migrating to CreateContextModuleItems (20180411215633)
|
|
2841
2841
|
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
2842
2842
|
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(1438354376499275445)[0m
|
2843
2843
|
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2844
|
+
[1m[35m (14.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2845
|
+
[1m[35m (8.6ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
2846
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2847
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
2848
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2849
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
2850
|
+
[1m[35m (210.0ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_development"[0m
|
2851
|
+
[1m[35m (197.9ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_test"[0m
|
2852
|
+
[1m[35m (11.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
2853
|
+
[1m[35m (4.1ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
2854
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(1438354376499275445)[0m
|
2855
|
+
[1m[35m (1.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2856
|
+
Migrating to CreateEnrollments (20170905192509)
|
2857
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
2858
|
+
[1m[35m (19.7ms)[0m [1m[35mCREATE 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)[0m
|
2859
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
2860
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
2861
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
2862
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170905192509"]]
|
2863
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
2864
|
+
Migrating to CreateTerms (20170906193506)
|
2865
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2866
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE 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)[0m
|
2867
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
2868
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170906193506"]]
|
2869
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2870
|
+
Migrating to CreateCourses (20170914181345)
|
2871
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2872
|
+
[1m[35m (5.1ms)[0m [1m[35mCREATE 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)[0m
|
2873
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
2874
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170914181345"]]
|
2875
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
2876
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
2877
|
+
[1m[35m (6.0ms)[0m [1m[35mBEGIN[0m
|
2878
|
+
[1m[35m (21.6ms)[0m [1m[35mCREATE 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)[0m
|
2879
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170915210836"]]
|
2880
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
2881
|
+
Migrating to CreateUsers (20170918221413)
|
2882
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2883
|
+
[1m[35m (5.0ms)[0m [1m[35mCREATE 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)[0m
|
2884
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
2885
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170918221413"]]
|
2886
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2887
|
+
Migrating to CreateSections (20171107213207)
|
2888
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2889
|
+
[1m[35m (4.8ms)[0m [1m[35mCREATE 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)[0m
|
2890
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
2891
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
2892
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20171107213207"]]
|
2893
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2894
|
+
Migrating to CreateRoles (20180103162102)
|
2895
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2896
|
+
[1m[35m (5.3ms)[0m [1m[35mCREATE 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)[0m
|
2897
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")[0m
|
2898
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180103162102"]]
|
2899
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
2900
|
+
Migrating to CreateAdmins (20180109210452)
|
2901
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2902
|
+
[1m[35m (4.8ms)[0m [1m[35mCREATE 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)[0m
|
2903
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")[0m
|
2904
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180109210452"]]
|
2905
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2906
|
+
Migrating to CreateAssignments (20180215214227)
|
2907
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2908
|
+
[1m[35m (5.2ms)[0m [1m[35mCREATE 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)[0m
|
2909
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")[0m
|
2910
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")[0m
|
2911
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180215214227"]]
|
2912
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2913
|
+
Migrating to CreateSubmissions (20180216171618)
|
2914
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2915
|
+
[1m[35m (5.1ms)[0m [1m[35mCREATE 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)[0m
|
2916
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")[0m
|
2917
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")[0m
|
2918
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")[0m
|
2919
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")[0m
|
2920
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180216171618"]]
|
2921
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2922
|
+
Migrating to CreateAccounts (20180220172559)
|
2923
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2924
|
+
[1m[35m (5.2ms)[0m [1m[35mCREATE 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)[0m
|
2925
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")[0m
|
2926
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180220172559"]]
|
2927
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2928
|
+
Migrating to CreateAssignmentGroups (20180222163506)
|
2929
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2930
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE 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)[0m
|
2931
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")[0m
|
2932
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")[0m
|
2933
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180222163506"]]
|
2934
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
2935
|
+
Migrating to CreateContextModules (20180411215348)
|
2936
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2937
|
+
[1m[35m (4.9ms)[0m [1m[35mCREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
2938
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")[0m
|
2939
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")[0m
|
2940
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215348"]]
|
2941
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2942
|
+
Migrating to CreateContextModuleItems (20180411215633)
|
2943
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2944
|
+
[1m[35m (4.8ms)[0m [1m[35mCREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
2945
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")[0m
|
2946
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")[0m
|
2947
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215633"]]
|
2948
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2949
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
2950
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
2951
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2018-05-02 18:57:15.642239"], ["updated_at", "2018-05-02 18:57:15.642239"]]
|
2952
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2953
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(1438354376499275445)[0m
|
2954
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2955
|
+
[1m[35m (1.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2956
|
+
[1m[35m (1.8ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
2957
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2958
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
2959
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2960
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
2961
|
+
[1m[35m (152.3ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_development"[0m
|
2962
|
+
[1m[35m (200.7ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_test"[0m
|
2963
|
+
[1m[35m (17.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
2964
|
+
[1m[35m (5.1ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
2965
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(1438354376499275445)[0m
|
2966
|
+
[1m[35m (1.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
2967
|
+
Migrating to CreateEnrollments (20170905192509)
|
2968
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
2969
|
+
[1m[35m (8.1ms)[0m [1m[35mCREATE 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)[0m
|
2970
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
2971
|
+
[1m[35m (2.1ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
2972
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
2973
|
+
[1m[35mSQL (1.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170905192509"]]
|
2974
|
+
[1m[35m (0.9ms)[0m [1m[35mCOMMIT[0m
|
2975
|
+
Migrating to CreateTerms (20170906193506)
|
2976
|
+
[1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
|
2977
|
+
[1m[35m (5.2ms)[0m [1m[35mCREATE 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)[0m
|
2978
|
+
[1m[35m (2.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
2979
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170906193506"]]
|
2980
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
2981
|
+
Migrating to CreateCourses (20170914181345)
|
2982
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
2983
|
+
[1m[35m (6.9ms)[0m [1m[35mCREATE 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)[0m
|
2984
|
+
[1m[35m (2.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
2985
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170914181345"]]
|
2986
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2987
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
2988
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
2989
|
+
[1m[35m (5.8ms)[0m [1m[35mCREATE 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)[0m
|
2990
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170915210836"]]
|
2991
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
2992
|
+
Migrating to CreateUsers (20170918221413)
|
2993
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
2994
|
+
[1m[35m (6.4ms)[0m [1m[35mCREATE 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)[0m
|
2995
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
2996
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170918221413"]]
|
2997
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
2998
|
+
Migrating to CreateSections (20171107213207)
|
2999
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3000
|
+
[1m[35m (5.1ms)[0m [1m[35mCREATE 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)[0m
|
3001
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
3002
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
3003
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20171107213207"]]
|
3004
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3005
|
+
Migrating to CreateRoles (20180103162102)
|
3006
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3007
|
+
[1m[35m (5.6ms)[0m [1m[35mCREATE 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)[0m
|
3008
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")[0m
|
3009
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180103162102"]]
|
3010
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3011
|
+
Migrating to CreateAdmins (20180109210452)
|
3012
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3013
|
+
[1m[35m (5.0ms)[0m [1m[35mCREATE 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)[0m
|
3014
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")[0m
|
3015
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180109210452"]]
|
3016
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3017
|
+
Migrating to CreateAssignments (20180215214227)
|
3018
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3019
|
+
[1m[35m (5.8ms)[0m [1m[35mCREATE 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)[0m
|
3020
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")[0m
|
3021
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")[0m
|
3022
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180215214227"]]
|
3023
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3024
|
+
Migrating to CreateSubmissions (20180216171618)
|
3025
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3026
|
+
[1m[35m (4.9ms)[0m [1m[35mCREATE 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)[0m
|
3027
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")[0m
|
3028
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")[0m
|
3029
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")[0m
|
3030
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")[0m
|
3031
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180216171618"]]
|
3032
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3033
|
+
Migrating to CreateAccounts (20180220172559)
|
3034
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3035
|
+
[1m[35m (6.0ms)[0m [1m[35mCREATE 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)[0m
|
3036
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")[0m
|
3037
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180220172559"]]
|
3038
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3039
|
+
Migrating to CreateAssignmentGroups (20180222163506)
|
3040
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3041
|
+
[1m[35m (6.2ms)[0m [1m[35mCREATE 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)[0m
|
3042
|
+
[1m[35m (2.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")[0m
|
3043
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")[0m
|
3044
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180222163506"]]
|
3045
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3046
|
+
Migrating to CreateContextModules (20180411215348)
|
3047
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3048
|
+
[1m[35m (4.9ms)[0m [1m[35mCREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3049
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")[0m
|
3050
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")[0m
|
3051
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215348"]]
|
3052
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3053
|
+
Migrating to CreateContextModuleItems (20180411215633)
|
3054
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3055
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3056
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")[0m
|
3057
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")[0m
|
3058
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215633"]]
|
3059
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3060
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
3061
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
3062
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2018-05-02 19:12:11.751650"], ["updated_at", "2018-05-02 19:12:11.751650"]]
|
3063
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
3064
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(1438354376499275445)[0m
|
3065
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3066
|
+
[1m[35m (8.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3067
|
+
[1m[35m (9.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
3068
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3069
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
3070
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3071
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
3072
|
+
[1m[35m (199.5ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_development"[0m
|
3073
|
+
[1m[35m (201.8ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_test"[0m
|
3074
|
+
[1m[35m (14.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
3075
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3076
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(1438354376499275445)[0m
|
3077
|
+
[1m[35m (1.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3078
|
+
Migrating to CreateEnrollments (20170905192509)
|
3079
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
3080
|
+
[1m[35m (16.2ms)[0m [1m[35mCREATE 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)[0m
|
3081
|
+
[1m[35m (7.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
3082
|
+
[1m[35m (7.0ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
3083
|
+
[1m[35m (6.9ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
3084
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170905192509"]]
|
3085
|
+
[1m[35m (6.2ms)[0m [1m[35mCOMMIT[0m
|
3086
|
+
Migrating to CreateTerms (20170906193506)
|
3087
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3088
|
+
[1m[35m (5.1ms)[0m [1m[35mCREATE 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)[0m
|
3089
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
3090
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170906193506"]]
|
3091
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3092
|
+
Migrating to CreateCourses (20170914181345)
|
3093
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
3094
|
+
[1m[35m (5.8ms)[0m [1m[35mCREATE 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)[0m
|
3095
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
3096
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170914181345"]]
|
3097
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3098
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
3099
|
+
[1m[35m (6.1ms)[0m [1m[35mBEGIN[0m
|
3100
|
+
[1m[35m (17.2ms)[0m [1m[35mCREATE 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)[0m
|
3101
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170915210836"]]
|
3102
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3103
|
+
Migrating to CreateUsers (20170918221413)
|
3104
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3105
|
+
[1m[35m (5.5ms)[0m [1m[35mCREATE 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)[0m
|
3106
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
3107
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170918221413"]]
|
3108
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3109
|
+
Migrating to CreateSections (20171107213207)
|
3110
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3111
|
+
[1m[35m (6.2ms)[0m [1m[35mCREATE 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)[0m
|
3112
|
+
[1m[35m (2.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
3113
|
+
[1m[35m (2.7ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
3114
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20171107213207"]]
|
3115
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
3116
|
+
Migrating to CreateRoles (20180103162102)
|
3117
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
3118
|
+
[1m[35m (7.8ms)[0m [1m[35mCREATE 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)[0m
|
3119
|
+
[1m[35m (3.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")[0m
|
3120
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180103162102"]]
|
3121
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
3122
|
+
Migrating to CreateAdmins (20180109210452)
|
3123
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
3124
|
+
[1m[35m (7.3ms)[0m [1m[35mCREATE 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)[0m
|
3125
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")[0m
|
3126
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180109210452"]]
|
3127
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3128
|
+
Migrating to CreateAssignments (20180215214227)
|
3129
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3130
|
+
[1m[35m (6.0ms)[0m [1m[35mCREATE 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)[0m
|
3131
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")[0m
|
3132
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")[0m
|
3133
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180215214227"]]
|
3134
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3135
|
+
Migrating to CreateSubmissions (20180216171618)
|
3136
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3137
|
+
[1m[35m (5.5ms)[0m [1m[35mCREATE 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)[0m
|
3138
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")[0m
|
3139
|
+
[1m[35m (2.6ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")[0m
|
3140
|
+
[1m[35m (3.0ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")[0m
|
3141
|
+
[1m[35m (2.8ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")[0m
|
3142
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180216171618"]]
|
3143
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3144
|
+
Migrating to CreateAccounts (20180220172559)
|
3145
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3146
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE 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)[0m
|
3147
|
+
[1m[35m (2.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")[0m
|
3148
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180220172559"]]
|
3149
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3150
|
+
Migrating to CreateAssignmentGroups (20180222163506)
|
3151
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3152
|
+
[1m[35m (4.9ms)[0m [1m[35mCREATE 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)[0m
|
3153
|
+
[1m[35m (2.3ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")[0m
|
3154
|
+
[1m[35m (2.1ms)[0m [1m[35mCREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")[0m
|
3155
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180222163506"]]
|
3156
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3157
|
+
Migrating to CreateContextModules (20180411215348)
|
3158
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3159
|
+
[1m[35m (5.3ms)[0m [1m[35mCREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3160
|
+
[1m[35m (2.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")[0m
|
3161
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")[0m
|
3162
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215348"]]
|
3163
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3164
|
+
Migrating to CreateContextModuleItems (20180411215633)
|
3165
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3166
|
+
[1m[35m (6.8ms)[0m [1m[35mCREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3167
|
+
[1m[35m (2.2ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")[0m
|
3168
|
+
[1m[35m (2.1ms)[0m [1m[35mCREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")[0m
|
3169
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215633"]]
|
3170
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3171
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
3172
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3173
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2018-05-02 19:19:44.298446"], ["updated_at", "2018-05-02 19:19:44.298446"]]
|
3174
|
+
[1m[35m (6.0ms)[0m [1m[35mCOMMIT[0m
|
3175
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(1438354376499275445)[0m
|
3176
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3177
|
+
[1m[35m (1.6ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3178
|
+
[1m[35m (1.3ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
3179
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3180
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
3181
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3182
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
3183
|
+
[1m[35m (207.3ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_development"[0m
|
3184
|
+
[1m[35m (208.9ms)[0m [1m[35mDROP DATABASE IF EXISTS "canvas_sync_test"[0m
|
3185
|
+
[1m[35m (16.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
3186
|
+
[1m[35m (4.1ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3187
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(1438354376499275445)[0m
|
3188
|
+
[1m[35m (1.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
3189
|
+
Migrating to CreateEnrollments (20170905192509)
|
3190
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3191
|
+
[1m[35m (20.6ms)[0m [1m[35mCREATE 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)[0m
|
3192
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")[0m
|
3193
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")[0m
|
3194
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")[0m
|
3195
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170905192509"]]
|
3196
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3197
|
+
Migrating to CreateTerms (20170906193506)
|
3198
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3199
|
+
[1m[35m (4.8ms)[0m [1m[35mCREATE 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)[0m
|
3200
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id")[0m
|
3201
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170906193506"]]
|
3202
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3203
|
+
Migrating to CreateCourses (20170914181345)
|
3204
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3205
|
+
[1m[35m (4.9ms)[0m [1m[35mCREATE 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)[0m
|
3206
|
+
[1m[35m (1.8ms)[0m [1m[35mCREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id")[0m
|
3207
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170914181345"]]
|
3208
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3209
|
+
Migrating to CreateCanvasSyncJobLog (20170915210836)
|
3210
|
+
[1m[35m (6.1ms)[0m [1m[35mBEGIN[0m
|
3211
|
+
[1m[35m (23.0ms)[0m [1m[35mCREATE 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)[0m
|
3212
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170915210836"]]
|
3213
|
+
[1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
|
3214
|
+
Migrating to CreateUsers (20170918221413)
|
3215
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
3216
|
+
[1m[35m (5.1ms)[0m [1m[35mCREATE 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)[0m
|
3217
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id")[0m
|
3218
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20170918221413"]]
|
3219
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3220
|
+
Migrating to CreateSections (20171107213207)
|
3221
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3222
|
+
[1m[35m (4.5ms)[0m [1m[35mCREATE 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)[0m
|
3223
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")[0m
|
3224
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")[0m
|
3225
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20171107213207"]]
|
3226
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3227
|
+
Migrating to CreateRoles (20180103162102)
|
3228
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3229
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE 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)[0m
|
3230
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id")[0m
|
3231
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180103162102"]]
|
3232
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3233
|
+
Migrating to CreateAdmins (20180109210452)
|
3234
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3235
|
+
[1m[35m (4.5ms)[0m [1m[35mCREATE 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)[0m
|
3236
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id")[0m
|
3237
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180109210452"]]
|
3238
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3239
|
+
Migrating to CreateAssignments (20180215214227)
|
3240
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3241
|
+
[1m[35m (4.6ms)[0m [1m[35mCREATE 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)[0m
|
3242
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")[0m
|
3243
|
+
[1m[35m (2.0ms)[0m [1m[35mCREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type")[0m
|
3244
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180215214227"]]
|
3245
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3246
|
+
Migrating to CreateSubmissions (20180216171618)
|
3247
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3248
|
+
[1m[35m (5.3ms)[0m [1m[35mCREATE 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)[0m
|
3249
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")[0m
|
3250
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")[0m
|
3251
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")[0m
|
3252
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")[0m
|
3253
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180216171618"]]
|
3254
|
+
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
|
3255
|
+
Migrating to CreateAccounts (20180220172559)
|
3256
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3257
|
+
[1m[35m (4.6ms)[0m [1m[35mCREATE 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)[0m
|
3258
|
+
[1m[35m (2.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_accounts_on_canvas_account_id" ON "accounts" ("canvas_account_id")[0m
|
3259
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180220172559"]]
|
3260
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
3261
|
+
Migrating to CreateAssignmentGroups (20180222163506)
|
3262
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
3263
|
+
[1m[35m (4.5ms)[0m [1m[35mCREATE 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)[0m
|
3264
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")[0m
|
3265
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")[0m
|
3266
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180222163506"]]
|
3267
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3268
|
+
Migrating to CreateContextModules (20180411215348)
|
3269
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3270
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_context_module_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3271
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_modules_on_canvas_context_module_id" ON "context_modules" ("canvas_context_module_id")[0m
|
3272
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")[0m
|
3273
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215348"]]
|
3274
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3275
|
+
Migrating to CreateContextModuleItems (20180411215633)
|
3276
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3277
|
+
[1m[35m (4.6ms)[0m [1m[35mCREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_context_module_item_id" bigint, "canvas_context_module_id" bigint, "position" integer, "content_type" character varying, "content_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
|
3278
|
+
[1m[35m (1.6ms)[0m [1m[35mCREATE UNIQUE INDEX "index_context_module_items_on_canvas_context_module_item_id" ON "context_module_items" ("canvas_context_module_item_id")[0m
|
3279
|
+
[1m[35m (1.4ms)[0m [1m[35mCREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")[0m
|
3280
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"[0m [["version", "20180411215633"]]
|
3281
|
+
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
|
3282
|
+
[1m[36mActiveRecord::InternalMetadata Load (1.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
3283
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
3284
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2018-05-02 19:21:57.868306"], ["updated_at", "2018-05-02 19:21:57.868306"]]
|
3285
|
+
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
|
3286
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT pg_advisory_unlock(1438354376499275445)[0m
|
3287
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|