(16.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (19.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.3ms) BEGIN  (25.6ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.8ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (4.2ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (2.0ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.3ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.3ms) BEGIN  (4.3ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.7ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.2ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (8.2ms) BEGIN  (41.4ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.4ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (4.6ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (1.2ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (4.1ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.4ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (10.7ms) BEGIN  (16.2ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-01-03 16:29:37.282741"], ["updated_at", "2018-01-03 16:29:37.282741"]]  (0.2ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.8ms) SELECT pg_try_advisory_lock(1438354376499275445)  (11.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateAdmins (20180109210452)  (0.2ms) BEGIN  (23.4ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role" character varying, "canvas_role_id" bigint NOT NULL, "user" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (1.7ms) COMMIT ActiveRecord::InternalMetadata Load (2.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateAdmins (20180109210452)  (0.2ms) BEGIN  (3.1ms) DROP INDEX "index_admins_on_canvas_admin_id"  (3.3ms) DROP TABLE "admins" SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20180109210452"]]  (6.0ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT pg_try_advisory_lock(1438354376499275445)  (0.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (10.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role" character varying, "canvas_role_id" bigint NOT NULL, "user" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (1.0ms) COMMIT ActiveRecord::InternalMetadata Load (1.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT pg_try_advisory_lock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (0.5ms) DROP INDEX "index_admins_on_canvas_admin_id"  (0.7ms) DROP TABLE "admins" SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20180109210452"]]  (22.8ms) COMMIT  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT pg_try_advisory_lock(1438354376499275445)  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (9.0ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (1.0ms) COMMIT ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC ActiveRecord::InternalMetadata Load (0.7ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN  (0.1ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (8.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (165.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (127.0ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (28.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (5.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (5.3ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.4ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (4.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.8ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.2ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.3ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.3ms) COMMIT Migrating to CreateAssignments (20180212204530)  (0.2ms) BEGIN  (4.5ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]  (0.3ms) COMMIT Migrating to CreateSubmissions (20180213232302)  (0.1ms) BEGIN  (2.3ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint NOT NULL, "canvas_assignment_id" bigint NOT NULL, "canvas_user_id" bigint NOT NULL, "submission_date" timestamp, "graded_date" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.9ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213232302"]]  (0.4ms) COMMIT ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:23:14.681205"], ["updated_at", "2018-02-13 23:23:14.681205"]]  (0.3ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (15.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (138.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (126.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (14.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (4.4ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (15.6ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (5.2ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.3ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (6.1ms) BEGIN  (21.2ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.4ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (5.1ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.7ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.2ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.2ms) COMMIT Migrating to CreateAssignments (20180212204530)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]  (0.3ms) COMMIT Migrating to CreateSubmissions (20180213234230)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint NOT NULL, "canvas_assignment_id" bigint NOT NULL, "canvas_user_id" bigint NOT NULL, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.5ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213234230"]]  (0.4ms) COMMIT ActiveRecord::InternalMetadata Load (1.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:42:42.931090"], ["updated_at", "2018-02-13 23:42:42.931090"]]  (0.3ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.9ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (140.2ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (126.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (19.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (4.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (16.7ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (4.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (7.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (7.6ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (5.9ms) COMMIT Migrating to CreateTerms (20170906193506)  (9.7ms) BEGIN  (5.6ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.8ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (5.7ms) BEGIN  (17.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.5ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (5.1ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.4ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.3ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.2ms) BEGIN  (4.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.3ms) COMMIT Migrating to CreateAssignments (20180212204530)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]  (0.3ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.5ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:55:56.536565"], ["updated_at", "2018-02-13 23:55:56.536565"]]  (0.3ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (1.8ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (125.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (128.6ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (13.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (4.1ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.2ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.3ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.4ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (4.4ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.2ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.1ms) BEGIN  (3.8ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.2ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.3ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.9ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.4ms) COMMIT Migrating to CreateAssignments (20180212204530)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]  (0.3ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.2ms) BEGIN  (2.6ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-13 23:57:20.233403"], ["updated_at", "2018-02-13 23:57:20.233403"]]  (0.3ms) COMMIT  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (1.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (14.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (127.6ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (129.8ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (13.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (3.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (4.2ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.7ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.3ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (4.8ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.3ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.3ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.2ms) BEGIN  (5.7ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.3ms) COMMIT Migrating to CreateAssignments (20180212204530)  (0.1ms) BEGIN  (4.3ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.5ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180212204530"]]  (0.2ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.2ms) BEGIN  (2.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.6ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-14 00:29:53.010574"], ["updated_at", "2018-02-14 00:29:53.010574"]]  (0.3ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (7.5ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (126.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (117.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (13.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (3.7ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (5.2ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.3ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.1ms) BEGIN  (4.5ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (1.8ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.2ms) BEGIN  (6.4ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.8ms) COMMIT Migrating to CreateSections (20171107213207)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.2ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (3.9ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.2ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.1ms) BEGIN  (3.0ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.1ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.2ms) COMMIT Migrating to CreateAssignments (20180215214227)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]  (0.2ms) COMMIT ActiveRecord::InternalMetadata Load (1.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-15 21:42:39.178681"], ["updated_at", "2018-02-15 21:42:39.178681"]]  (0.3ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (8.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (123.6ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (123.0ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (13.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (3.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.2ms) BEGIN  (21.7ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.8ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.4ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (6.0ms) BEGIN  (19.4ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (3.8ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.2ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.2ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.2ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.2ms) BEGIN  (2.4ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.2ms) COMMIT Migrating to CreateAssignments (20180215214227)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-15 21:59:29.557046"], ["updated_at", "2018-02-15 21:59:29.557046"]]  (0.3ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (8.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (123.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (121.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (11.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (21.3ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (15.2ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.4ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.2ms) BEGIN  (4.0ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.1ms) BEGIN  (3.6ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.2ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.1ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.2ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.1ms) BEGIN  (3.4ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.2ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.1ms) BEGIN  (3.5ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.3ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (5.5ms) BEGIN  (8.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (12.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.4ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.5ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.3ms) COMMIT Migrating to CreateAssignments (20180215214227)  (0.2ms) BEGIN  (4.3ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.2ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-15 22:00:57.501540"], ["updated_at", "2018-02-15 22:00:57.501540"]]  (0.3ms) COMMIT  (0.2ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (1.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (3.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (124.5ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (119.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (33.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (4.0ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (9.6ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.3ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (6.9ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (6.0ms) COMMIT Migrating to CreateTerms (20170906193506)  (6.2ms) BEGIN  (4.7ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.1ms) BEGIN  (3.7ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.1ms) BEGIN  (10.9ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (5.7ms) COMMIT Migrating to CreateUsers (20170918221413)  (5.5ms) BEGIN  (7.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (6.8ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (6.0ms) COMMIT Migrating to CreateAdmins (20180109210452)  (11.8ms) BEGIN  (4.9ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.3ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.1ms) BEGIN  (2.6ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.1ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.1ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.1ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.2ms) COMMIT Migrating to CreateAssignments (20180215214227)  (0.1ms) BEGIN  (4.4ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.4ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (1.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-15 22:01:29.506349"], ["updated_at", "2018-02-15 22:01:29.506349"]]  (0.2ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (8.6ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (124.9ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (119.1ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (12.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (3.5ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (22.0ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.5ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (2.0ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (6.0ms) COMMIT Migrating to CreateTerms (20170906193506)  (11.0ms) BEGIN  (5.9ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.3ms) BEGIN  (4.3ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.2ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (5.9ms) BEGIN  (21.1ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.5ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (4.5ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.4ms) COMMIT Migrating to CreateSections (20171107213207)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.2ms) COMMIT Migrating to CreateRoles (20180103162102)  (6.2ms) BEGIN  (23.5ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.4ms) COMMIT Migrating to CreateAdmins (20180109210452)  (6.1ms) BEGIN  (18.7ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.4ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (11.6ms) BEGIN  (9.5ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.8ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (2.0ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (7.4ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (14.5ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.4ms) COMMIT Migrating to CreateAssignments (20180215214227)  (15.5ms) BEGIN  (12.1ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (2.1ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-15 22:04:30.044556"], ["updated_at", "2018-02-15 22:04:30.044556"]]  (0.3ms) COMMIT  (0.1ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (2.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (7.7ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]  (124.7ms) DROP DATABASE IF EXISTS "canvas_sync_development"  (120.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"  (8.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)  (3.8ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (0.2ms) SELECT pg_try_advisory_lock(1438354376499275445)  (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to CreateEnrollments (20170905192509)  (0.1ms) BEGIN  (21.8ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_enrollment_id" bigint NOT NULL, "canvas_course_id" bigint, "course_sis_id" character varying, "canvas_user_id" bigint, "user_sis_id" character varying, "role" character varying, "role_id" integer, "canvas_section_id" bigint, "section_sis_id" character varying, "status" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.6ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_enrollment_id" ON "enrollments" ("canvas_enrollment_id")  (1.4ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")  (1.6ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170905192509"]]  (0.3ms) COMMIT Migrating to CreateTerms (20170906193506)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_term_id" integer NOT NULL, "name" character varying, "start_at" timestamp, "end_at" timestamp, "workflow_state" character varying, "grading_period_group_id" integer, "sis_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.5ms) CREATE UNIQUE INDEX "index_terms_on_canvas_term_id" ON "terms" ("canvas_term_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170906193506"]]  (0.3ms) COMMIT Migrating to CreateCourses (20170914181345)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_course_id" bigint NOT NULL, "sis_id" character varying, "short_name" character varying, "long_name" character varying, "status" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "term_sis_id" integer, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_courses_on_canvas_course_id" ON "courses" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170914181345"]]  (0.3ms) COMMIT Migrating to CreateCanvasSyncJobLog (20170915210836)  (0.2ms) BEGIN  (3.9ms) CREATE TABLE "canvas_sync_job_logs" ("id" bigserial primary key, "started_at" timestamp, "completed_at" timestamp, "exception" character varying, "backtrace" text, "job_class" character varying, "status" character varying, "metadata" text, "job_arguments" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]  (0.3ms) COMMIT Migrating to CreateUsers (20170918221413)  (0.2ms) BEGIN  (3.7ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_user_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "status" character varying, "login_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_user_id" ON "users" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170918221413"]]  (0.3ms) COMMIT Migrating to CreateSections (20171107213207)  (0.1ms) BEGIN  (3.3ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_section_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "status" character varying, "start_date" timestamp, "end_date" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_sections_on_canvas_section_id" ON "sections" ("canvas_section_id")  (1.2ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20171107213207"]]  (0.3ms) COMMIT Migrating to CreateRoles (20180103162102)  (0.2ms) BEGIN  (3.6ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_role_id" integer NOT NULL, "label" character varying NOT NULL, "base_role_type" character varying NOT NULL, "account" json, "workflow_state" character varying NOT NULL, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "index_roles_on_canvas_role_id" ON "roles" ("canvas_role_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180103162102"]]  (0.2ms) COMMIT Migrating to CreateAdmins (20180109210452)  (0.2ms) BEGIN  (3.5ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_admin_id" bigint NOT NULL, "role_name" character varying, "canvas_role_id" bigint NOT NULL, "user_data" json, "canvas_user_id" bigint NOT NULL, "workflow_state" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_admin_id" ON "admins" ("canvas_admin_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180109210452"]]  (0.2ms) COMMIT Migrating to CreateSubmissions (20180213235544)  (0.2ms) BEGIN  (2.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_submission_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "graded_at" timestamp, "score" integer, "points_possible" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_submission_id" ON "submissions" ("canvas_submission_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")  (1.2ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")  (1.3ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180213235544"]]  (0.3ms) COMMIT Migrating to CreateAssignments (20180215214227)  (0.1ms) BEGIN  (4.0ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_assignment_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" integer, "min_score" integer, "max_score" integer, "mastery_score" integer, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "context_id" integer, "context_type" character varying, "canvas_assignment_group_id" integer, "grading_scheme_id" integer, "grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_assignment_id" ON "assignments" ("canvas_assignment_id")  (1.3ms) CREATE INDEX "index_assignments_on_context_id_and_context_type" ON "assignments" ("context_id", "context_type") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215214227"]]  (0.3ms) COMMIT Migrating to CreateAssignmentGroups (20180215220605)  (0.2ms) BEGIN  (4.1ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_assignment_group_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "default_assignment_name" character varying, "position" integer, "assignment_weighting_scheme" text, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_assignment_group_id" ON "assignment_groups" ("canvas_assignment_group_id")  (1.2ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180215220605"]]  (0.3ms) COMMIT ActiveRecord::InternalMetadata Load (0.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2 [["key", "environment"], ["LIMIT", 1]]  (0.1ms) BEGIN SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2018-02-15 22:06:17.250893"], ["updated_at", "2018-02-15 22:06:17.250893"]]  (0.4ms) COMMIT  (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC