canvas_sync 0.17.0.beta12 → 0.17.0.beta13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15dd14f4944009bc0b3415acce0230b3c466deb05d6842dc492f878b56aca4f8
4
- data.tar.gz: 7beb66a20e2abbaf5016bf7991606680519d2417fe74e4e65c867ded4fa33e54
3
+ metadata.gz: d7b76bf6c25022960d7ca9605aac613424a763171df506e19bb71ddfe7afac9c
4
+ data.tar.gz: 37919cedb89d90f6589cb049775c9a7399c7d94a5c95aeb8a5b40f02de27496d
5
5
  SHA512:
6
- metadata.gz: 1adc5820509c6395225375c7cb736c02620f06beb974817c58de7fefefeba026d66e8384bb7f8a802fc3bf6c609bdbcb0ab705c77f055aeac41598be7ccd7c27
7
- data.tar.gz: a3f48270de430e38c42301f918248f17de468d243e83f011896cc3b0e5f28fcf4b5f5a49220446c138c7ee720d59e41ced118d7e193aacde6a644ee57f14c555
6
+ metadata.gz: ef40e571c7b24b98102a6278f656fcb98f9f3ec960c3951df3152601cb7dedbee554991bfa5f073fb32a5ac9424da89bdab1030afe0b73b68f41c203babf6771
7
+ data.tar.gz: 674b086a5b0b5ab0e2aaefa0aa3df4a7c3efd437db171f20c96b09005b3c914e7d9abec5df215b838f07515fa7d9abba54f046b347f0a4e1b4137f0e14f1e348
data/README.md CHANGED
@@ -112,6 +112,11 @@ If you pass a date to `updated_after`, this logic will be disabled unless you ex
112
112
  - `sunday` - A full sync will run every Sunday
113
113
  - `saturday/4` - A full sync will run every fourth Saturday
114
114
 
115
+ #### Multiple Sync Chains
116
+ If your app uses multiple Sync Chains, you may run into issues with the automatic `updated_after` and `full_sync_every` logic.
117
+ You can fix this by using custom logic or by setting the `batch_genre` parameter when creating the Job Chain. Chains will only
118
+ use chains of the same genre when computing `updated_after` and `full_sync_every`.
119
+
115
120
  ### Extensible chain
116
121
  It is sometimes desired to extend or customize the chain of jobs that are run with CanvasSync.
117
122
  This can be achieved with the following pattern:
@@ -1,5 +1,7 @@
1
1
  class AddFullSyncToCanvasSyncSyncBatch < CanvasSync::MiscHelper::MigrationClass
2
2
  def change
3
3
  add_column :canvas_sync_sync_batches, :full_sync, :boolean, default: false
4
+ add_column :canvas_sync_sync_batches, :batch_genre, :string
5
+ add_column :canvas_sync_sync_batches, :batch_bid, :string
4
6
  end
5
7
  end
@@ -113,7 +113,8 @@ module CanvasSync
113
113
  account_id: nil,
114
114
  updated_after: nil,
115
115
  full_sync_every: nil,
116
- options: {},
116
+ batch_genre: nil,
117
+ options: {}
117
118
  ) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Metrics/LineLength
118
119
  return unless models.present?
119
120
  models.map! &:to_s
@@ -191,6 +192,7 @@ module CanvasSync
191
192
  legacy_support: legacy_support,
192
193
  updated_after: updated_after,
193
194
  full_sync_every: full_sync_every,
195
+ batch_genre: batch_genre,
194
196
  }
195
197
  global_options[:account_id] = account_id if account_id.present?
196
198
  global_options.merge!(options[:global]) if options[:global].present?
@@ -1,9 +1,13 @@
1
1
  module CanvasSync
2
2
  module Jobs
3
3
  class BeginSyncChainJob < CanvasSync::Job
4
+ attr_reader :globals
5
+
4
6
  def perform(chain_definition, globals = {})
7
+ @globals = globals
8
+
5
9
  if !globals[:updated_after].present? || globals[:updated_after] == true
6
- last_batch = SyncBatch.where(status: 'completed').last
10
+ last_batch = SyncBatch.where(status: 'completed', batch_genre: genre).last
7
11
  globals[:full_sync_every] ||= "sunday/2"
8
12
  globals[:updated_after] = last_batch&.started_at&.iso8601
9
13
  end
@@ -15,17 +19,19 @@ module CanvasSync
15
19
  sync_batch = SyncBatch.create!(
16
20
  started_at: DateTime.now,
17
21
  full_sync: globals[:updated_after] == nil,
22
+ batch_genre: genre,
18
23
  status: 'processing',
19
24
  )
20
25
 
21
26
  JobBatches::Batch.new.tap do |b|
22
- b.description = "CanvasSync Root Batch"
27
+ b.description = "CanvasSync Root Batch (SyncBatch##{sync_batch.id})"
23
28
  b.on(:complete, "#{self.class.to_s}.batch_completed", sync_batch_id: sync_batch.id)
24
29
  b.on(:success, "#{self.class.to_s}.batch_completed", sync_batch_id: sync_batch.id)
25
30
  b.context = globals
26
31
  b.jobs do
27
32
  JobBatches::SerialBatchJob.perform_now(chain_definition)
28
33
  end
34
+ sync_batch.update(batch_bid: b.bid)
29
35
  end
30
36
  end
31
37
 
@@ -52,13 +58,17 @@ module CanvasSync
52
58
  end
53
59
 
54
60
  def last_full_sync_record
55
- @last_full_sync_record ||= SyncBatch.where(status: 'completed', full_sync: true).last
61
+ @last_full_sync_record ||= SyncBatch.where(status: 'completed', full_sync: true, batch_genre: genre).last
56
62
  end
57
63
 
58
64
  def last_full_sync
59
65
  last_full_sync_record.started_at
60
66
  end
61
67
 
68
+ def genre
69
+ globals[:batch_genre] || "default"
70
+ end
71
+
62
72
  def self.batch_completed(status, options)
63
73
  sbatch = SyncBatch.find(options['sync_batch_id'])
64
74
  sbatch.update!(
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.17.0.beta12".freeze
2
+ VERSION = "0.17.0.beta13".freeze
3
3
  end
@@ -42,7 +42,7 @@ RSpec.describe CanvasSync do
42
42
  ]
43
43
  }]}
44
44
  ]]}
45
- ], {:legacy_support=>false, :updated_after=>nil, :d=>4}],
45
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil, :d=>4}],
46
46
  })
47
47
  end
48
48
 
@@ -61,7 +61,7 @@ RSpec.describe CanvasSync do
61
61
  ]
62
62
  }]}
63
63
  ]]}
64
- ], {:legacy_support=>false, :updated_after=>nil}]
64
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}]
65
65
  })
66
66
  end
67
67
  end
@@ -80,7 +80,7 @@ RSpec.describe CanvasSync do
80
80
  ]
81
81
  }]}
82
82
  ]]}
83
- ], {:legacy_support=>false, :updated_after=>nil}],
83
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
84
84
  })
85
85
  end
86
86
  end
@@ -100,7 +100,7 @@ RSpec.describe CanvasSync do
100
100
  ]
101
101
  }]}
102
102
  ]]}
103
- ], {:legacy_support=>false, :updated_after=>nil}],
103
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
104
104
  })
105
105
  end
106
106
  end
@@ -120,7 +120,7 @@ RSpec.describe CanvasSync do
120
120
  ]
121
121
  }]}
122
122
  ]]}
123
- ], {:legacy_support=>false, :updated_after=>nil}],
123
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
124
124
  })
125
125
  end
126
126
  end
@@ -140,7 +140,7 @@ RSpec.describe CanvasSync do
140
140
  ]
141
141
  }]}
142
142
  ]]}
143
- ], {:legacy_support=>false, :updated_after=>nil}],
143
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
144
144
  })
145
145
  end
146
146
  end
@@ -160,7 +160,7 @@ RSpec.describe CanvasSync do
160
160
  ]
161
161
  }]}
162
162
  ]]}
163
- ], {:legacy_support=>false, :updated_after=>nil}],
163
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
164
164
  })
165
165
  end
166
166
  end
@@ -181,7 +181,7 @@ RSpec.describe CanvasSync do
181
181
  ]
182
182
  }]}
183
183
  ]]}
184
- ], {:legacy_support=>false, :updated_after=>nil}],
184
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
185
185
  )
186
186
  end
187
187
  end
@@ -202,7 +202,7 @@ RSpec.describe CanvasSync do
202
202
  ]
203
203
  }]}
204
204
  ]]}
205
- ], {:legacy_support=>false, :updated_after=>nil}],
205
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
206
206
  )
207
207
  end
208
208
  end
@@ -223,7 +223,7 @@ RSpec.describe CanvasSync do
223
223
  ]
224
224
  }]}
225
225
  ]]}
226
- ], {:legacy_support=>false, :updated_after=>nil}],
226
+ ], {:legacy_support=>false, :updated_after=>nil, :full_sync_every=>nil}],
227
227
  )
228
228
  end
229
229
  end
@@ -106,6 +106,8 @@ ActiveRecord::Schema.define(version: 2020_10_30_210836) do
106
106
  t.datetime "created_at"
107
107
  t.datetime "updated_at"
108
108
  t.boolean "full_sync", default: false
109
+ t.string "batch_genre"
110
+ t.string "batch_bid"
109
111
  end
110
112
 
111
113
  create_table "context_module_items", force: :cascade do |t|
@@ -4134,3 +4134,320 @@ Migrating to AddFullSyncToCanvasSyncSyncBatch (20201030210836)
4134
4134
   (0.5ms) COMMIT
4135
4135
   (0.3ms) SELECT pg_advisory_unlock(1438354376499275445)
4136
4136
   (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4137
+  (27.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4138
+  (13.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
4139
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4140
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
4141
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4142
+  (0.3ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
4143
+  (355.0ms) DROP DATABASE IF EXISTS "canvas_sync_development"
4144
+  (244.9ms) DROP DATABASE IF EXISTS "canvas_sync_test"
4145
+  (803.9ms) CREATE DATABASE "canvas_sync_development" ENCODING = 'unicode'
4146
+  (753.2ms) CREATE DATABASE "canvas_sync_test" ENCODING = 'unicode'
4147
+  (287.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
4148
+  (51.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)
4149
+  (3.8ms) SELECT pg_try_advisory_lock(1438354376499275445)
4150
+  (22.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4151
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
4152
+  (0.2ms) BEGIN
4153
+  (64.9ms) CREATE TABLE "canvas_sync_job_logs" ("id" serial NOT NULL 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, "updated_at" timestamp)
4154
+ ActiveRecord::SchemaMigration Create (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
4155
+  (1.0ms) COMMIT
4156
+ Migrating to AddJobIdToCanvasSyncJobLogs (20180725155729)
4157
+  (5.7ms) BEGIN
4158
+  (0.4ms) ALTER TABLE "canvas_sync_job_logs" ADD "job_id" character varying
4159
+  (1.5ms) CREATE INDEX "index_canvas_sync_job_logs_on_job_id" ON "canvas_sync_job_logs" ("job_id")
4160
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180725155729"]]
4161
+  (0.5ms) COMMIT
4162
+ Migrating to CreateUsers (20190702203620)
4163
+  (0.2ms) BEGIN
4164
+  (21.4ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "workflow_state" character varying, "login_id" character varying, "name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4165
+  (15.2ms) CREATE UNIQUE INDEX "index_users_on_canvas_id" ON "users" ("canvas_id")
4166
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203620"]]
4167
+  (4.6ms) COMMIT
4168
+ Migrating to CreateCourses (20190702203621)
4169
+  (12.0ms) BEGIN
4170
+  (21.9ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "course_code" character varying, "name" character varying, "workflow_state" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "start_at" timestamp, "end_at" timestamp, "grading_standard_id" bigint, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4171
+  (7.7ms) CREATE UNIQUE INDEX "index_courses_on_canvas_id" ON "courses" ("canvas_id")
4172
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203621"]]
4173
+  (11.7ms) COMMIT
4174
+ Migrating to CreateAccounts (20190702203622)
4175
+  (11.2ms) BEGIN
4176
+  (17.8ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "canvas_parent_account_id" bigint, "sis_parent_account_id" character varying, "name" character varying, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4177
+  (1.4ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_id" ON "accounts" ("canvas_id")
4178
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203622"]]
4179
+  (1.1ms) COMMIT
4180
+ Migrating to CreateTerms (20190702203623)
4181
+  (5.9ms) BEGIN
4182
+  (22.2ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_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)
4183
+  (2.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_id" ON "terms" ("canvas_id")
4184
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203623"]]
4185
+  (0.4ms) COMMIT
4186
+ Migrating to CreateEnrollments (20190702203624)
4187
+  (5.5ms) BEGIN
4188
+  (32.1ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_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, "canvas_role_id" integer, "canvas_section_id" bigint, "workflow_state" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4189
+  (13.9ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_id" ON "enrollments" ("canvas_id")
4190
+  (15.8ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
4191
+  (13.4ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
4192
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203624"]]
4193
+  (16.0ms) COMMIT
4194
+ Migrating to CreateSections (20190702203625)
4195
+  (14.9ms) BEGIN
4196
+  (60.4ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "workflow_state" character varying, "start_at" timestamp, "end_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4197
+  (7.6ms) CREATE UNIQUE INDEX "index_sections_on_canvas_id" ON "sections" ("canvas_id")
4198
+  (4.0ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
4199
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203625"]]
4200
+  (0.7ms) COMMIT
4201
+ Migrating to CreateAssignments (20190702203626)
4202
+  (6.3ms) BEGIN
4203
+  (27.6ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" float, "min_score" float, "max_score" float, "mastery_score" float, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "canvas_context_id" integer, "canvas_context_type" character varying, "canvas_assignment_group_id" integer, "canvas_grading_scheme_id" integer, "canvas_grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4204
+  (1.5ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_id" ON "assignments" ("canvas_id")
4205
+  (3.2ms) CREATE INDEX "index_assignments_on_canvas_context_id_and_canvas_context_type" ON "assignments" ("canvas_context_id", "canvas_context_type")
4206
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203626"]]
4207
+  (0.8ms) COMMIT
4208
+ Migrating to CreateSubmissions (20190702203627)
4209
+  (5.8ms) BEGIN
4210
+  (23.9ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "due_at" timestamp, "graded_at" timestamp, "score" float, "points_possible" float, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4211
+  (1.6ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_id" ON "submissions" ("canvas_id")
4212
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
4213
+  (1.7ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
4214
+  (1.8ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
4215
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203627"]]
4216
+  (0.6ms) COMMIT
4217
+ Migrating to CreateAssignmentGroups (20190702203630)
4218
+  (12.1ms) BEGIN
4219
+  (17.4ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4220
+  (1.5ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_id" ON "assignment_groups" ("canvas_id")
4221
+  (1.7ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
4222
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203630"]]
4223
+  (0.5ms) COMMIT
4224
+ Migrating to CreateContextModules (20190702203631)
4225
+  (10.2ms) BEGIN
4226
+  (19.3ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4227
+  (2.0ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_id" ON "context_modules" ("canvas_id")
4228
+  (1.3ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
4229
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203631"]]
4230
+  (0.4ms) COMMIT
4231
+ Migrating to CreateContextModuleItems (20190702203632)
4232
+  (6.1ms) BEGIN
4233
+  (34.4ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_id" bigint, "canvas_context_module_id" bigint, "position" integer, "canvas_content_id" bigint, "canvas_content_type" character varying, "canvas_assignment_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4234
+  (7.4ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_id" ON "context_module_items" ("canvas_id")
4235
+  (20.2ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
4236
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203632"]]
4237
+  (22.1ms) COMMIT
4238
+ Migrating to AddForkCountToCanvasSyncJobLogs (20190916154829)
4239
+  (21.5ms) BEGIN
4240
+  (0.4ms) ALTER TABLE "canvas_sync_job_logs" ADD "fork_count" integer
4241
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190916154829"]]
4242
+  (15.6ms) COMMIT
4243
+ Migrating to CreateRoles (20190927204545)
4244
+  (0.3ms) BEGIN
4245
+  (25.8ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_id" integer NOT NULL, "label" character varying, "base_role_type" character varying, "canvas_account_id" integer, "workflow_state" character varying, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4246
+  (21.9ms) CREATE UNIQUE INDEX "index_roles_on_canvas_id" ON "roles" ("canvas_id")
4247
+  (1.5ms) CREATE INDEX "index_roles_on_canvas_account_id" ON "roles" ("canvas_account_id")
4248
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190927204545"]]
4249
+  (0.5ms) COMMIT
4250
+ Migrating to CreateAdmins (20190927204546)
4251
+  (6.7ms) BEGIN
4252
+  (24.3ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "role_name" character varying, "canvas_account_id" bigint, "canvas_role_id" bigint, "canvas_user_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4253
+  (14.3ms) CREATE UNIQUE INDEX "index_admins_on_canvas_id" ON "admins" ("canvas_id")
4254
+  (13.4ms) CREATE INDEX "index_admins_on_canvas_role_id" ON "admins" ("canvas_role_id")
4255
+  (4.4ms) CREATE INDEX "index_admins_on_canvas_user_id" ON "admins" ("canvas_user_id")
4256
+  (1.3ms) CREATE INDEX "index_admins_on_canvas_account_id" ON "admins" ("canvas_account_id")
4257
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190927204546"]]
4258
+  (0.5ms) COMMIT
4259
+ Migrating to CreateGroups (20200415171620)
4260
+  (5.7ms) BEGIN
4261
+  (41.2ms) CREATE TABLE "groups" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "canvas_group_category_id" bigint, "group_category_sis_id" character varying, "canvas_account_id" bigint, "canvas_course_id" bigint, "name" character varying, "workflow_state" character varying, "context_id" bigint, "context_type" character varying, "max_membership" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4262
+  (5.1ms) CREATE UNIQUE INDEX "index_groups_on_canvas_id" ON "groups" ("canvas_id")
4263
+ ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200415171620"]]
4264
+  (0.6ms) COMMIT
4265
+ Migrating to CreateGroupMemberships (20200416214248)
4266
+  (11.1ms) BEGIN
4267
+  (16.0ms) CREATE TABLE "group_memberships" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_user_id" bigint NOT NULL, "canvas_group_id" bigint NOT NULL, "group_sis_id" character varying, "user_sis_id" character varying, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4268
+  (1.7ms) CREATE UNIQUE INDEX "index_group_memberships_on_canvas_id" ON "group_memberships" ("canvas_id")
4269
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200416214248"]]
4270
+  (0.6ms) COMMIT
4271
+ Migrating to CreatePseudonyms (20201016181346)
4272
+  (10.3ms) BEGIN
4273
+  (31.0ms) CREATE TABLE "pseudonyms" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_user_id" bigint, "sis_id" character varying, "unique_id" character varying, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4274
+  (14.2ms) CREATE UNIQUE INDEX "index_pseudonyms_on_canvas_id" ON "pseudonyms" ("canvas_id")
4275
+  (15.9ms) CREATE INDEX "index_pseudonyms_on_canvas_user_id" ON "pseudonyms" ("canvas_user_id")
4276
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201016181346"]]
4277
+  (14.6ms) COMMIT
4278
+ Migrating to CreateCanvasSyncSyncBatches (20201018210836)
4279
+  (6.2ms) BEGIN
4280
+  (22.1ms) CREATE TABLE "canvas_sync_sync_batches" ("id" serial NOT NULL PRIMARY KEY, "started_at" timestamp, "completed_at" timestamp, "status" character varying, "created_at" timestamp, "updated_at" timestamp)
4281
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201018210836"]]
4282
+  (12.2ms) COMMIT
4283
+ Migrating to AddFullSyncToCanvasSyncSyncBatch (20201030210836)
4284
+  (11.6ms) BEGIN
4285
+  (0.6ms) ALTER TABLE "canvas_sync_sync_batches" ADD "full_sync" boolean DEFAULT FALSE
4286
+  (0.3ms) ALTER TABLE "canvas_sync_sync_batches" ADD "batch_bid" character varying
4287
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201030210836"]]
4288
+  (6.2ms) COMMIT
4289
+ 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]]
4290
+  (0.2ms) BEGIN
4291
+ ActiveRecord::InternalMetadata Create (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", "2020-10-30 22:25:07.136658"], ["updated_at", "2020-10-30 22:25:07.136658"]]
4292
+  (6.3ms) COMMIT
4293
+  (0.4ms) SELECT pg_advisory_unlock(1438354376499275445)
4294
+  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4295
+  (2.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4296
+  (1.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
4297
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4298
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
4299
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4300
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 [["key", "environment"]]
4301
+  (381.8ms) DROP DATABASE IF EXISTS "canvas_sync_development"
4302
+  (352.4ms) DROP DATABASE IF EXISTS "canvas_sync_test"
4303
+  (1221.3ms) CREATE DATABASE "canvas_sync_development" ENCODING = 'unicode'
4304
+  (630.6ms) CREATE DATABASE "canvas_sync_test" ENCODING = 'unicode'
4305
+  (145.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
4306
+  (24.2ms) 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)
4307
+  (0.3ms) SELECT pg_try_advisory_lock(1438354376499275445)
4308
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4309
+ Migrating to CreateCanvasSyncJobLog (20170915210836)
4310
+  (0.1ms) BEGIN
4311
+  (54.9ms) CREATE TABLE "canvas_sync_job_logs" ("id" serial NOT NULL 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, "updated_at" timestamp)
4312
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20170915210836"]]
4313
+  (1.5ms) COMMIT
4314
+ Migrating to AddJobIdToCanvasSyncJobLogs (20180725155729)
4315
+  (6.0ms) BEGIN
4316
+  (0.3ms) ALTER TABLE "canvas_sync_job_logs" ADD "job_id" character varying
4317
+  (2.8ms) CREATE INDEX "index_canvas_sync_job_logs_on_job_id" ON "canvas_sync_job_logs" ("job_id")
4318
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20180725155729"]]
4319
+  (0.5ms) COMMIT
4320
+ Migrating to CreateUsers (20190702203620)
4321
+  (0.5ms) BEGIN
4322
+  (26.6ms) CREATE TABLE "users" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "email" character varying, "first_name" character varying, "last_name" character varying, "workflow_state" character varying, "login_id" character varying, "name" character varying, "sortable_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4323
+  (2.5ms) CREATE UNIQUE INDEX "index_users_on_canvas_id" ON "users" ("canvas_id")
4324
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203620"]]
4325
+  (0.5ms) COMMIT
4326
+ Migrating to CreateCourses (20190702203621)
4327
+  (6.0ms) BEGIN
4328
+  (23.5ms) CREATE TABLE "courses" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "course_code" character varying, "name" character varying, "workflow_state" character varying, "canvas_account_id" integer, "canvas_term_id" integer, "start_at" timestamp, "end_at" timestamp, "grading_standard_id" bigint, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4329
+  (1.4ms) CREATE UNIQUE INDEX "index_courses_on_canvas_id" ON "courses" ("canvas_id")
4330
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203621"]]
4331
+  (0.6ms) COMMIT
4332
+ Migrating to CreateAccounts (20190702203622)
4333
+  (6.3ms) BEGIN
4334
+  (37.8ms) CREATE TABLE "accounts" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "canvas_parent_account_id" bigint, "sis_parent_account_id" character varying, "name" character varying, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4335
+  (1.4ms) CREATE UNIQUE INDEX "index_accounts_on_canvas_id" ON "accounts" ("canvas_id")
4336
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203622"]]
4337
+  (0.4ms) COMMIT
4338
+ Migrating to CreateTerms (20190702203623)
4339
+  (15.2ms) BEGIN
4340
+  (13.1ms) CREATE TABLE "terms" ("id" bigserial primary key, "canvas_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)
4341
+  (1.1ms) CREATE UNIQUE INDEX "index_terms_on_canvas_id" ON "terms" ("canvas_id")
4342
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203623"]]
4343
+  (0.4ms) COMMIT
4344
+ Migrating to CreateEnrollments (20190702203624)
4345
+  (16.2ms) BEGIN
4346
+  (12.1ms) CREATE TABLE "enrollments" ("id" bigserial primary key, "canvas_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, "canvas_role_id" integer, "canvas_section_id" bigint, "workflow_state" character varying, "base_role_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4347
+  (1.4ms) CREATE UNIQUE INDEX "index_enrollments_on_canvas_id" ON "enrollments" ("canvas_id")
4348
+  (7.1ms) CREATE INDEX "index_enrollments_on_canvas_course_id" ON "enrollments" ("canvas_course_id")
4349
+  (18.1ms) CREATE INDEX "index_enrollments_on_canvas_user_id" ON "enrollments" ("canvas_user_id")
4350
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203624"]]
4351
+  (0.5ms) COMMIT
4352
+ Migrating to CreateSections (20190702203625)
4353
+  (11.3ms) BEGIN
4354
+  (40.5ms) CREATE TABLE "sections" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "canvas_course_id" bigint, "canvas_nonxlist_course_id" bigint, "name" character varying, "workflow_state" character varying, "start_at" timestamp, "end_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4355
+  (1.5ms) CREATE UNIQUE INDEX "index_sections_on_canvas_id" ON "sections" ("canvas_id")
4356
+  (1.5ms) CREATE INDEX "index_sections_on_canvas_course_id" ON "sections" ("canvas_course_id")
4357
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203625"]]
4358
+  (0.7ms) COMMIT
4359
+ Migrating to CreateAssignments (20190702203626)
4360
+  (5.6ms) BEGIN
4361
+  (22.6ms) CREATE TABLE "assignments" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "title" character varying, "description" text, "due_at" timestamp, "unlock_at" timestamp, "lock_at" timestamp, "points_possible" float, "min_score" float, "max_score" float, "mastery_score" float, "grading_type" character varying, "submission_types" character varying, "workflow_state" character varying, "canvas_context_id" integer, "canvas_context_type" character varying, "canvas_assignment_group_id" integer, "canvas_grading_scheme_id" integer, "canvas_grading_standard_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4362
+  (1.5ms) CREATE UNIQUE INDEX "index_assignments_on_canvas_id" ON "assignments" ("canvas_id")
4363
+  (7.0ms) CREATE INDEX "index_assignments_on_canvas_context_id_and_canvas_context_type" ON "assignments" ("canvas_context_id", "canvas_context_type")
4364
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203626"]]
4365
+  (27.8ms) COMMIT
4366
+ Migrating to CreateSubmissions (20190702203627)
4367
+  (11.1ms) BEGIN
4368
+  (39.2ms) CREATE TABLE "submissions" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_course_id" bigint, "canvas_assignment_id" bigint, "canvas_user_id" bigint, "submitted_at" timestamp, "due_at" timestamp, "graded_at" timestamp, "score" float, "points_possible" float, "excused" boolean, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4369
+  (18.6ms) CREATE UNIQUE INDEX "index_submissions_on_canvas_id" ON "submissions" ("canvas_id")
4370
+  (7.9ms) CREATE INDEX "index_submissions_on_canvas_assignment_id" ON "submissions" ("canvas_assignment_id")
4371
+  (9.9ms) CREATE INDEX "index_submissions_on_canvas_course_id" ON "submissions" ("canvas_course_id")
4372
+  (12.8ms) CREATE INDEX "index_submissions_on_canvas_user_id" ON "submissions" ("canvas_user_id")
4373
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203627"]]
4374
+  (21.7ms) COMMIT
4375
+ Migrating to CreateAssignmentGroups (20190702203630)
4376
+  (14.4ms) BEGIN
4377
+  (80.7ms) CREATE TABLE "assignment_groups" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_course_id" bigint, "name" character varying, "rules" text, "position" integer, "group_weight" float, "workflow_state" character varying, "canvas_created_at" timestamp, "canvas_updated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4378
+  (7.9ms) CREATE UNIQUE INDEX "index_assignment_groups_on_canvas_id" ON "assignment_groups" ("canvas_id")
4379
+  (7.2ms) CREATE INDEX "index_assignment_groups_on_canvas_course_id" ON "assignment_groups" ("canvas_course_id")
4380
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203630"]]
4381
+  (6.1ms) COMMIT
4382
+ Migrating to CreateContextModules (20190702203631)
4383
+  (6.0ms) BEGIN
4384
+  (22.7ms) CREATE TABLE "context_modules" ("id" bigserial primary key, "canvas_id" bigint, "canvas_context_id" bigint, "canvas_context_type" character varying, "position" integer, "name" character varying, "workflow_state" character varying, "deleted_at" timestamp, "unlock_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4385
+  (9.6ms) CREATE UNIQUE INDEX "index_context_modules_on_canvas_id" ON "context_modules" ("canvas_id")
4386
+  (13.6ms) CREATE INDEX "index_context_modules_on_context" ON "context_modules" ("canvas_context_id", "canvas_context_type")
4387
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203631"]]
4388
+  (11.4ms) COMMIT
4389
+ Migrating to CreateContextModuleItems (20190702203632)
4390
+  (15.2ms) BEGIN
4391
+  (32.0ms) CREATE TABLE "context_module_items" ("id" bigserial primary key, "canvas_id" bigint, "canvas_context_module_id" bigint, "position" integer, "canvas_content_id" bigint, "canvas_content_type" character varying, "canvas_assignment_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4392
+  (32.6ms) CREATE UNIQUE INDEX "index_context_module_items_on_canvas_id" ON "context_module_items" ("canvas_id")
4393
+  (12.9ms) CREATE INDEX "index_context_module_items_on_canvas_context_module_id" ON "context_module_items" ("canvas_context_module_id")
4394
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190702203632"]]
4395
+  (6.7ms) COMMIT
4396
+ Migrating to AddForkCountToCanvasSyncJobLogs (20190916154829)
4397
+  (21.7ms) BEGIN
4398
+  (0.4ms) ALTER TABLE "canvas_sync_job_logs" ADD "fork_count" integer
4399
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190916154829"]]
4400
+  (13.5ms) COMMIT
4401
+ Migrating to CreateRoles (20190927204545)
4402
+  (0.3ms) BEGIN
4403
+  (36.2ms) CREATE TABLE "roles" ("id" bigserial primary key, "canvas_id" integer NOT NULL, "label" character varying, "base_role_type" character varying, "canvas_account_id" integer, "workflow_state" character varying, "permissions" json, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4404
+  (14.9ms) CREATE UNIQUE INDEX "index_roles_on_canvas_id" ON "roles" ("canvas_id")
4405
+  (2.0ms) CREATE INDEX "index_roles_on_canvas_account_id" ON "roles" ("canvas_account_id")
4406
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190927204545"]]
4407
+  (0.5ms) COMMIT
4408
+ Migrating to CreateAdmins (20190927204546)
4409
+  (5.6ms) BEGIN
4410
+  (43.8ms) CREATE TABLE "admins" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "role_name" character varying, "canvas_account_id" bigint, "canvas_role_id" bigint, "canvas_user_id" bigint, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4411
+  (21.2ms) CREATE UNIQUE INDEX "index_admins_on_canvas_id" ON "admins" ("canvas_id")
4412
+  (31.8ms) CREATE INDEX "index_admins_on_canvas_role_id" ON "admins" ("canvas_role_id")
4413
+  (1.4ms) CREATE INDEX "index_admins_on_canvas_user_id" ON "admins" ("canvas_user_id")
4414
+  (1.8ms) CREATE INDEX "index_admins_on_canvas_account_id" ON "admins" ("canvas_account_id")
4415
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20190927204546"]]
4416
+  (0.5ms) COMMIT
4417
+ Migrating to CreateGroups (20200415171620)
4418
+  (5.9ms) BEGIN
4419
+  (54.4ms) CREATE TABLE "groups" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "sis_id" character varying, "canvas_group_category_id" bigint, "group_category_sis_id" character varying, "canvas_account_id" bigint, "canvas_course_id" bigint, "name" character varying, "workflow_state" character varying, "context_id" bigint, "context_type" character varying, "max_membership" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4420
+  (13.4ms) CREATE UNIQUE INDEX "index_groups_on_canvas_id" ON "groups" ("canvas_id")
4421
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200415171620"]]
4422
+  (28.4ms) COMMIT
4423
+ Migrating to CreateGroupMemberships (20200416214248)
4424
+  (6.2ms) BEGIN
4425
+  (35.1ms) CREATE TABLE "group_memberships" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_user_id" bigint NOT NULL, "canvas_group_id" bigint NOT NULL, "group_sis_id" character varying, "user_sis_id" character varying, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4426
+  (17.4ms) CREATE UNIQUE INDEX "index_group_memberships_on_canvas_id" ON "group_memberships" ("canvas_id")
4427
+ ActiveRecord::SchemaMigration Create (8.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20200416214248"]]
4428
+  (19.1ms) COMMIT
4429
+ Migrating to CreatePseudonyms (20201016181346)
4430
+  (13.3ms) BEGIN
4431
+  (54.2ms) CREATE TABLE "pseudonyms" ("id" bigserial primary key, "canvas_id" bigint NOT NULL, "canvas_user_id" bigint, "sis_id" character varying, "unique_id" character varying, "workflow_state" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4432
+  (14.9ms) CREATE UNIQUE INDEX "index_pseudonyms_on_canvas_id" ON "pseudonyms" ("canvas_id")
4433
+  (13.0ms) CREATE INDEX "index_pseudonyms_on_canvas_user_id" ON "pseudonyms" ("canvas_user_id")
4434
+ ActiveRecord::SchemaMigration Create (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201016181346"]]
4435
+  (11.4ms) COMMIT
4436
+ Migrating to CreateCanvasSyncSyncBatches (20201018210836)
4437
+  (15.2ms) BEGIN
4438
+  (61.8ms) CREATE TABLE "canvas_sync_sync_batches" ("id" serial NOT NULL PRIMARY KEY, "started_at" timestamp, "completed_at" timestamp, "status" character varying, "created_at" timestamp, "updated_at" timestamp)
4439
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201018210836"]]
4440
+  (4.5ms) COMMIT
4441
+ Migrating to AddFullSyncToCanvasSyncSyncBatch (20201030210836)
4442
+  (36.7ms) BEGIN
4443
+  (0.4ms) ALTER TABLE "canvas_sync_sync_batches" ADD "full_sync" boolean DEFAULT FALSE
4444
+  (0.2ms) ALTER TABLE "canvas_sync_sync_batches" ADD "batch_genre" character varying
4445
+  (0.2ms) ALTER TABLE "canvas_sync_sync_batches" ADD "batch_bid" character varying
4446
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version" [["version", "20201030210836"]]
4447
+  (24.5ms) COMMIT
4448
+ 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]]
4449
+  (0.5ms) BEGIN
4450
+ ActiveRecord::InternalMetadata Create (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key" [["key", "environment"], ["value", "development"], ["created_at", "2020-10-30 22:38:37.668477"], ["updated_at", "2020-10-30 22:38:37.668477"]]
4451
+  (26.0ms) COMMIT
4452
+  (0.4ms) SELECT pg_advisory_unlock(1438354376499275445)
4453
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC