openstax_accounts 6.4.2 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/handlers/openstax/accounts/sessions_callback.rb +9 -0
- data/app/models/openstax/accounts/account.rb +4 -0
- data/app/routines/openstax/accounts/sync_accounts.rb +1 -1
- data/db/migrate/5_add_faculty_status_to_accounts_accounts.rb +6 -0
- data/lib/omniauth/strategies/openstax.rb +7 -0
- data/lib/openstax/accounts/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{5_create_users.rb → 1000_create_users.rb} +0 -0
- data/spec/dummy/db/migrate/{6_create_ownerships.rb → 1001_create_ownerships.rb} +0 -0
- data/spec/dummy/db/schema.rb +12 -10
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1128 -0
- data/spec/dummy/log/test.log +11421 -0
- data/spec/factories/openstax_accounts_account.rb +1 -0
- data/spec/handlers/openstax/accounts/sessions_callback_spec.rb +25 -0
- data/spec/spec_helper.rb +33 -0
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22e1be41b7627137aaaf8e9dc2c220074c8e1e1c
|
4
|
+
data.tar.gz: 91e61344bca03f2b494c4db4372bd83322290664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca834906e37fbfc0f2c732ef60b902ef0375688e5415c9beaae56cac331f4f70c5b4da954526738732972e08f1d74e346c02d179b5ee97d619fde9b196ed7665
|
7
|
+
data.tar.gz: 74e3fed4c8a2359303dff1c142b941f42edc775fc13f4510fdc880effb6785658e4709883884e2b96e36f9ad2e45e20f747f6f631768f10607ae6cee7d671f09
|
@@ -28,6 +28,15 @@ module OpenStax
|
|
28
28
|
account.full_name = @auth_data.info.name
|
29
29
|
account.title = @auth_data.info.title
|
30
30
|
account.access_token = @auth_data.credentials.token
|
31
|
+
|
32
|
+
# Gracefully handle absent and unknown faculty status info
|
33
|
+
if @auth_data.extra.raw_info.present?
|
34
|
+
begin
|
35
|
+
account.faculty_status = @auth_data.extra.raw_info['faculty_status'] || :no_faculty_info
|
36
|
+
rescue ArgumentError => ee
|
37
|
+
account.faculty_status = :no_faculty_info
|
38
|
+
end
|
39
|
+
end
|
31
40
|
end
|
32
41
|
rescue ActiveRecord::RecordNotUnique
|
33
42
|
retry
|
@@ -20,6 +20,10 @@ module OpenStax::Accounts
|
|
20
20
|
inverse_of: :user
|
21
21
|
has_many :groups_as_member, through: :group_members, source: :group
|
22
22
|
|
23
|
+
enum faculty_status: [:no_faculty_info, :pending_faculty, :confirmed_faculty, :rejected_faculty]
|
24
|
+
after_initialize { self.faculty_status ||= :no_faculty_info }
|
25
|
+
validates :faculty_status, presence: true
|
26
|
+
|
23
27
|
validates :openstax_uid, :presence => true, :uniqueness => true
|
24
28
|
validates :username, :presence => true, :uniqueness => true,
|
25
29
|
:unless => :syncing_or_stubbing
|
@@ -7,7 +7,7 @@ module OpenStax
|
|
7
7
|
|
8
8
|
class SyncAccounts
|
9
9
|
|
10
|
-
SYNC_ATTRIBUTES = ['username', 'first_name', 'last_name', 'full_name', 'title']
|
10
|
+
SYNC_ATTRIBUTES = ['username', 'first_name', 'last_name', 'full_name', 'title', 'faculty_status']
|
11
11
|
|
12
12
|
lev_routine transaction: :no_transaction
|
13
13
|
|
Binary file
|
File without changes
|
File without changes
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,11 +11,11 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 1001) do
|
15
15
|
|
16
|
-
create_table "openstax_accounts_accounts", force:
|
17
|
-
t.integer "openstax_uid",
|
18
|
-
t.string "username",
|
16
|
+
create_table "openstax_accounts_accounts", force: true do |t|
|
17
|
+
t.integer "openstax_uid", null: false
|
18
|
+
t.string "username", null: false
|
19
19
|
t.string "access_token"
|
20
20
|
t.string "first_name"
|
21
21
|
t.string "last_name"
|
@@ -23,16 +23,18 @@ ActiveRecord::Schema.define(version: 6) do
|
|
23
23
|
t.string "title"
|
24
24
|
t.datetime "created_at"
|
25
25
|
t.datetime "updated_at"
|
26
|
+
t.integer "faculty_status", default: 0, null: false
|
26
27
|
end
|
27
28
|
|
28
29
|
add_index "openstax_accounts_accounts", ["access_token"], name: "index_openstax_accounts_accounts_on_access_token", unique: true
|
30
|
+
add_index "openstax_accounts_accounts", ["faculty_status"], name: "index_openstax_accounts_accounts_on_faculty_status"
|
29
31
|
add_index "openstax_accounts_accounts", ["first_name"], name: "index_openstax_accounts_accounts_on_first_name"
|
30
32
|
add_index "openstax_accounts_accounts", ["full_name"], name: "index_openstax_accounts_accounts_on_full_name"
|
31
33
|
add_index "openstax_accounts_accounts", ["last_name"], name: "index_openstax_accounts_accounts_on_last_name"
|
32
34
|
add_index "openstax_accounts_accounts", ["openstax_uid"], name: "index_openstax_accounts_accounts_on_openstax_uid", unique: true
|
33
35
|
add_index "openstax_accounts_accounts", ["username"], name: "index_openstax_accounts_accounts_on_username", unique: true
|
34
36
|
|
35
|
-
create_table "openstax_accounts_group_members", force:
|
37
|
+
create_table "openstax_accounts_group_members", force: true do |t|
|
36
38
|
t.integer "group_id", null: false
|
37
39
|
t.integer "user_id", null: false
|
38
40
|
t.datetime "created_at"
|
@@ -42,7 +44,7 @@ ActiveRecord::Schema.define(version: 6) do
|
|
42
44
|
add_index "openstax_accounts_group_members", ["group_id", "user_id"], name: "index_openstax_accounts_group_members_on_group_id_and_user_id", unique: true
|
43
45
|
add_index "openstax_accounts_group_members", ["user_id"], name: "index_openstax_accounts_group_members_on_user_id"
|
44
46
|
|
45
|
-
create_table "openstax_accounts_group_nestings", force:
|
47
|
+
create_table "openstax_accounts_group_nestings", force: true do |t|
|
46
48
|
t.integer "member_group_id", null: false
|
47
49
|
t.integer "container_group_id", null: false
|
48
50
|
t.datetime "created_at"
|
@@ -52,7 +54,7 @@ ActiveRecord::Schema.define(version: 6) do
|
|
52
54
|
add_index "openstax_accounts_group_nestings", ["container_group_id"], name: "index_openstax_accounts_group_nestings_on_container_group_id"
|
53
55
|
add_index "openstax_accounts_group_nestings", ["member_group_id"], name: "index_openstax_accounts_group_nestings_on_member_group_id", unique: true
|
54
56
|
|
55
|
-
create_table "openstax_accounts_group_owners", force:
|
57
|
+
create_table "openstax_accounts_group_owners", force: true do |t|
|
56
58
|
t.integer "group_id", null: false
|
57
59
|
t.integer "user_id", null: false
|
58
60
|
t.datetime "created_at"
|
@@ -62,7 +64,7 @@ ActiveRecord::Schema.define(version: 6) do
|
|
62
64
|
add_index "openstax_accounts_group_owners", ["group_id", "user_id"], name: "index_openstax_accounts_group_owners_on_group_id_and_user_id", unique: true
|
63
65
|
add_index "openstax_accounts_group_owners", ["user_id"], name: "index_openstax_accounts_group_owners_on_user_id"
|
64
66
|
|
65
|
-
create_table "openstax_accounts_groups", force:
|
67
|
+
create_table "openstax_accounts_groups", force: true do |t|
|
66
68
|
t.integer "openstax_uid", null: false
|
67
69
|
t.boolean "is_public", default: false, null: false
|
68
70
|
t.string "name"
|
@@ -75,7 +77,7 @@ ActiveRecord::Schema.define(version: 6) do
|
|
75
77
|
add_index "openstax_accounts_groups", ["is_public"], name: "index_openstax_accounts_groups_on_is_public"
|
76
78
|
add_index "openstax_accounts_groups", ["openstax_uid"], name: "index_openstax_accounts_groups_on_openstax_uid", unique: true
|
77
79
|
|
78
|
-
create_table "ownerships", force:
|
80
|
+
create_table "ownerships", force: true do |t|
|
79
81
|
t.integer "owner_id", null: false
|
80
82
|
t.string "owner_type", null: false
|
81
83
|
t.datetime "created_at"
|
@@ -84,7 +86,7 @@ ActiveRecord::Schema.define(version: 6) do
|
|
84
86
|
|
85
87
|
add_index "ownerships", ["owner_id", "owner_type"], name: "index_ownerships_on_owner_id_and_owner_type", unique: true
|
86
88
|
|
87
|
-
create_table "users", force:
|
89
|
+
create_table "users", force: true do |t|
|
88
90
|
t.integer "account_id", null: false
|
89
91
|
t.datetime "created_at"
|
90
92
|
t.datetime "updated_at"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -184,3 +184,1131 @@
|
|
184
184
|
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140811182433')[0m
|
185
185
|
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140811182505')
|
186
186
|
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140811182527')[0m
|
187
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "openstax_accounts_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "openstax_uid" integer NOT NULL, "username" varchar(255) NOT NULL, "access_token" varchar(255), "first_name" varchar(255), "last_name" varchar(255), "full_name" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
188
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
189
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_access_token" ON "openstax_accounts_accounts" ("access_token")[0m
|
190
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
191
|
+
FROM sqlite_master
|
192
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
193
|
+
UNION ALL
|
194
|
+
SELECT sql
|
195
|
+
FROM sqlite_temp_master
|
196
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
197
|
+
|
198
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_first_name" ON "openstax_accounts_accounts" ("first_name")[0m
|
199
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
200
|
+
FROM sqlite_master
|
201
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
202
|
+
UNION ALL
|
203
|
+
SELECT sql
|
204
|
+
FROM sqlite_temp_master
|
205
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
206
|
+
|
207
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
208
|
+
FROM sqlite_master
|
209
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
210
|
+
UNION ALL
|
211
|
+
SELECT sql
|
212
|
+
FROM sqlite_temp_master
|
213
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
214
|
+
[0m
|
215
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_full_name" ON "openstax_accounts_accounts" ("full_name")
|
216
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
217
|
+
FROM sqlite_master
|
218
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
219
|
+
UNION ALL
|
220
|
+
SELECT sql
|
221
|
+
FROM sqlite_temp_master
|
222
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
223
|
+
[0m
|
224
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
225
|
+
FROM sqlite_master
|
226
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
227
|
+
UNION ALL
|
228
|
+
SELECT sql
|
229
|
+
FROM sqlite_temp_master
|
230
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
231
|
+
|
232
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
233
|
+
FROM sqlite_master
|
234
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
235
|
+
UNION ALL
|
236
|
+
SELECT sql
|
237
|
+
FROM sqlite_temp_master
|
238
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
239
|
+
[0m
|
240
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_last_name" ON "openstax_accounts_accounts" ("last_name")
|
241
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
242
|
+
FROM sqlite_master
|
243
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
244
|
+
UNION ALL
|
245
|
+
SELECT sql
|
246
|
+
FROM sqlite_temp_master
|
247
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
248
|
+
[0m
|
249
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
250
|
+
FROM sqlite_master
|
251
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
252
|
+
UNION ALL
|
253
|
+
SELECT sql
|
254
|
+
FROM sqlite_temp_master
|
255
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
256
|
+
|
257
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
258
|
+
FROM sqlite_master
|
259
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
260
|
+
UNION ALL
|
261
|
+
SELECT sql
|
262
|
+
FROM sqlite_temp_master
|
263
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
264
|
+
[0m
|
265
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
266
|
+
FROM sqlite_master
|
267
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
268
|
+
UNION ALL
|
269
|
+
SELECT sql
|
270
|
+
FROM sqlite_temp_master
|
271
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
272
|
+
|
273
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_openstax_uid" ON "openstax_accounts_accounts" ("openstax_uid")[0m
|
274
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
275
|
+
FROM sqlite_master
|
276
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
277
|
+
UNION ALL
|
278
|
+
SELECT sql
|
279
|
+
FROM sqlite_temp_master
|
280
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
281
|
+
|
282
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
283
|
+
FROM sqlite_master
|
284
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
285
|
+
UNION ALL
|
286
|
+
SELECT sql
|
287
|
+
FROM sqlite_temp_master
|
288
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
289
|
+
[0m
|
290
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
291
|
+
FROM sqlite_master
|
292
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
293
|
+
UNION ALL
|
294
|
+
SELECT sql
|
295
|
+
FROM sqlite_temp_master
|
296
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
297
|
+
|
298
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
299
|
+
FROM sqlite_master
|
300
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
301
|
+
UNION ALL
|
302
|
+
SELECT sql
|
303
|
+
FROM sqlite_temp_master
|
304
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
305
|
+
[0m
|
306
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
307
|
+
FROM sqlite_master
|
308
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
309
|
+
UNION ALL
|
310
|
+
SELECT sql
|
311
|
+
FROM sqlite_temp_master
|
312
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
313
|
+
|
314
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_username" ON "openstax_accounts_accounts" ("username")[0m
|
315
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "openstax_accounts_group_members" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
316
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_members_on_group_id_and_user_id" ON "openstax_accounts_group_members" ("group_id", "user_id")[0m
|
317
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
318
|
+
FROM sqlite_master
|
319
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
320
|
+
UNION ALL
|
321
|
+
SELECT sql
|
322
|
+
FROM sqlite_temp_master
|
323
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
324
|
+
|
325
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_members_on_user_id" ON "openstax_accounts_group_members" ("user_id")[0m
|
326
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "openstax_accounts_group_nestings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "member_group_id" integer NOT NULL, "container_group_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
327
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_nestings_on_container_group_id" ON "openstax_accounts_group_nestings" ("container_group_id")[0m
|
328
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
329
|
+
FROM sqlite_master
|
330
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
331
|
+
UNION ALL
|
332
|
+
SELECT sql
|
333
|
+
FROM sqlite_temp_master
|
334
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
335
|
+
|
336
|
+
[1m[36m (0.6ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_nestings_on_member_group_id" ON "openstax_accounts_group_nestings" ("member_group_id")[0m
|
337
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "openstax_accounts_group_owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
338
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_owners_on_group_id_and_user_id" ON "openstax_accounts_group_owners" ("group_id", "user_id")[0m
|
339
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
340
|
+
FROM sqlite_master
|
341
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
342
|
+
UNION ALL
|
343
|
+
SELECT sql
|
344
|
+
FROM sqlite_temp_master
|
345
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
346
|
+
|
347
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_owners_on_user_id" ON "openstax_accounts_group_owners" ("user_id")[0m
|
348
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "openstax_accounts_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "openstax_uid" integer NOT NULL, "is_public" boolean DEFAULT 'f' NOT NULL, "name" varchar(255), "cached_subtree_group_ids" text, "cached_supertree_group_ids" text, "created_at" datetime, "updated_at" datetime)
|
349
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_groups_on_is_public" ON "openstax_accounts_groups" ("is_public")[0m
|
350
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
351
|
+
FROM sqlite_master
|
352
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
353
|
+
UNION ALL
|
354
|
+
SELECT sql
|
355
|
+
FROM sqlite_temp_master
|
356
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
357
|
+
|
358
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_groups_on_openstax_uid" ON "openstax_accounts_groups" ("openstax_uid")[0m
|
359
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "ownerships" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer NOT NULL, "owner_type" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime)
|
360
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_ownerships_on_owner_id_and_owner_type" ON "ownerships" ("owner_id", "owner_type")[0m
|
361
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
362
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_account_id" ON "users" ("account_id")[0m
|
363
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
364
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
365
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
366
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('6')[0m
|
367
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('5')
|
368
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
369
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('1')
|
370
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('2')[0m
|
371
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('3')
|
372
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('4')[0m
|
373
|
+
[1m[36m (2.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
374
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
375
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
376
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
377
|
+
Migrating to CreateOpenStaxAccountsAccounts (0)
|
378
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
379
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "openstax_accounts_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "openstax_uid" integer NOT NULL, "username" varchar(255) NOT NULL, "access_token" varchar(255), "first_name" varchar(255), "last_name" varchar(255), "full_name" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime)
|
380
|
+
[1m[36m (1.1ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_openstax_uid" ON "openstax_accounts_accounts" ("openstax_uid")[0m
|
381
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
382
|
+
FROM sqlite_master
|
383
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
384
|
+
UNION ALL
|
385
|
+
SELECT sql
|
386
|
+
FROM sqlite_temp_master
|
387
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
388
|
+
|
389
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_username" ON "openstax_accounts_accounts" ("username")[0m
|
390
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
391
|
+
FROM sqlite_master
|
392
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
393
|
+
UNION ALL
|
394
|
+
SELECT sql
|
395
|
+
FROM sqlite_temp_master
|
396
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
397
|
+
|
398
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
399
|
+
FROM sqlite_master
|
400
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
401
|
+
UNION ALL
|
402
|
+
SELECT sql
|
403
|
+
FROM sqlite_temp_master
|
404
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
405
|
+
[0m
|
406
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_access_token" ON "openstax_accounts_accounts" ("access_token")
|
407
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
408
|
+
FROM sqlite_master
|
409
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
410
|
+
UNION ALL
|
411
|
+
SELECT sql
|
412
|
+
FROM sqlite_temp_master
|
413
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
414
|
+
[0m
|
415
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
416
|
+
FROM sqlite_master
|
417
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
418
|
+
UNION ALL
|
419
|
+
SELECT sql
|
420
|
+
FROM sqlite_temp_master
|
421
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
422
|
+
|
423
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
424
|
+
FROM sqlite_master
|
425
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
426
|
+
UNION ALL
|
427
|
+
SELECT sql
|
428
|
+
FROM sqlite_temp_master
|
429
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
430
|
+
[0m
|
431
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_first_name" ON "openstax_accounts_accounts" ("first_name")
|
432
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
433
|
+
FROM sqlite_master
|
434
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
435
|
+
UNION ALL
|
436
|
+
SELECT sql
|
437
|
+
FROM sqlite_temp_master
|
438
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
439
|
+
[0m
|
440
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
441
|
+
FROM sqlite_master
|
442
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
443
|
+
UNION ALL
|
444
|
+
SELECT sql
|
445
|
+
FROM sqlite_temp_master
|
446
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
447
|
+
|
448
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
449
|
+
FROM sqlite_master
|
450
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
451
|
+
UNION ALL
|
452
|
+
SELECT sql
|
453
|
+
FROM sqlite_temp_master
|
454
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
455
|
+
[0m
|
456
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
457
|
+
FROM sqlite_master
|
458
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
459
|
+
UNION ALL
|
460
|
+
SELECT sql
|
461
|
+
FROM sqlite_temp_master
|
462
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
463
|
+
|
464
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_last_name" ON "openstax_accounts_accounts" ("last_name")[0m
|
465
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
466
|
+
FROM sqlite_master
|
467
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
468
|
+
UNION ALL
|
469
|
+
SELECT sql
|
470
|
+
FROM sqlite_temp_master
|
471
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
472
|
+
|
473
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
474
|
+
FROM sqlite_master
|
475
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
476
|
+
UNION ALL
|
477
|
+
SELECT sql
|
478
|
+
FROM sqlite_temp_master
|
479
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
480
|
+
[0m
|
481
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
482
|
+
FROM sqlite_master
|
483
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
484
|
+
UNION ALL
|
485
|
+
SELECT sql
|
486
|
+
FROM sqlite_temp_master
|
487
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
488
|
+
|
489
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
490
|
+
FROM sqlite_master
|
491
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
492
|
+
UNION ALL
|
493
|
+
SELECT sql
|
494
|
+
FROM sqlite_temp_master
|
495
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
496
|
+
[0m
|
497
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
498
|
+
FROM sqlite_master
|
499
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
500
|
+
UNION ALL
|
501
|
+
SELECT sql
|
502
|
+
FROM sqlite_temp_master
|
503
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
504
|
+
|
505
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_full_name" ON "openstax_accounts_accounts" ("full_name")[0m
|
506
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
|
507
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
508
|
+
Migrating to CreateOpenStaxAccountsGroups (1)
|
509
|
+
[1m[35m (0.0ms)[0m begin transaction
|
510
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "openstax_accounts_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "openstax_uid" integer NOT NULL, "is_public" boolean DEFAULT 'f' NOT NULL, "name" varchar(255), "cached_subtree_group_ids" text, "cached_supertree_group_ids" text, "created_at" datetime, "updated_at" datetime) [0m
|
511
|
+
[1m[35m (0.3ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_groups_on_openstax_uid" ON "openstax_accounts_groups" ("openstax_uid")
|
512
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
513
|
+
FROM sqlite_master
|
514
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
515
|
+
UNION ALL
|
516
|
+
SELECT sql
|
517
|
+
FROM sqlite_temp_master
|
518
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
519
|
+
[0m
|
520
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_groups_on_is_public" ON "openstax_accounts_groups" ("is_public")
|
521
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1"]]
|
522
|
+
[1m[35m (0.9ms)[0m commit transaction
|
523
|
+
Migrating to CreateOpenStaxAccountsGroupMembers (2)
|
524
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
525
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "openstax_accounts_group_members" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
526
|
+
[1m[36m (0.4ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_members_on_group_id_and_user_id" ON "openstax_accounts_group_members" ("group_id", "user_id")[0m
|
527
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
528
|
+
FROM sqlite_master
|
529
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
530
|
+
UNION ALL
|
531
|
+
SELECT sql
|
532
|
+
FROM sqlite_temp_master
|
533
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
534
|
+
|
535
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_members_on_user_id" ON "openstax_accounts_group_members" ("user_id")[0m
|
536
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "2"]]
|
537
|
+
[1m[36m (2.1ms)[0m [1mcommit transaction[0m
|
538
|
+
Migrating to CreateOpenStaxAccountsGroupOwners (3)
|
539
|
+
[1m[35m (0.0ms)[0m begin transaction
|
540
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "openstax_accounts_group_owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
541
|
+
[1m[35m (0.3ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_owners_on_group_id_and_user_id" ON "openstax_accounts_group_owners" ("group_id", "user_id")
|
542
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
543
|
+
FROM sqlite_master
|
544
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
545
|
+
UNION ALL
|
546
|
+
SELECT sql
|
547
|
+
FROM sqlite_temp_master
|
548
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
549
|
+
[0m
|
550
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_group_owners_on_user_id" ON "openstax_accounts_group_owners" ("user_id")
|
551
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "3"]]
|
552
|
+
[1m[35m (2.7ms)[0m commit transaction
|
553
|
+
Migrating to CreateOpenStaxAccountsGroupNestings (4)
|
554
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
555
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "openstax_accounts_group_nestings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "member_group_id" integer NOT NULL, "container_group_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
556
|
+
[1m[36m (0.5ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_nestings_on_member_group_id" ON "openstax_accounts_group_nestings" ("member_group_id")[0m
|
557
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
558
|
+
FROM sqlite_master
|
559
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
560
|
+
UNION ALL
|
561
|
+
SELECT sql
|
562
|
+
FROM sqlite_temp_master
|
563
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
564
|
+
|
565
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_nestings_on_container_group_id" ON "openstax_accounts_group_nestings" ("container_group_id")[0m
|
566
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "4"]]
|
567
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
568
|
+
Migrating to AddFacultyStatusToAccountsAccounts (5)
|
569
|
+
[1m[35m (0.1ms)[0m begin transaction
|
570
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "faculty_status" integer DEFAULT 0 NOT NULL[0m
|
571
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
572
|
+
FROM sqlite_master
|
573
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
574
|
+
UNION ALL
|
575
|
+
SELECT sql
|
576
|
+
FROM sqlite_temp_master
|
577
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
578
|
+
|
579
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
580
|
+
FROM sqlite_master
|
581
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
582
|
+
UNION ALL
|
583
|
+
SELECT sql
|
584
|
+
FROM sqlite_temp_master
|
585
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
586
|
+
[0m
|
587
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
588
|
+
FROM sqlite_master
|
589
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
590
|
+
UNION ALL
|
591
|
+
SELECT sql
|
592
|
+
FROM sqlite_temp_master
|
593
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
594
|
+
|
595
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
596
|
+
FROM sqlite_master
|
597
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
598
|
+
UNION ALL
|
599
|
+
SELECT sql
|
600
|
+
FROM sqlite_temp_master
|
601
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
602
|
+
[0m
|
603
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
604
|
+
FROM sqlite_master
|
605
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
606
|
+
UNION ALL
|
607
|
+
SELECT sql
|
608
|
+
FROM sqlite_temp_master
|
609
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
610
|
+
|
611
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
612
|
+
FROM sqlite_master
|
613
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
614
|
+
UNION ALL
|
615
|
+
SELECT sql
|
616
|
+
FROM sqlite_temp_master
|
617
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
618
|
+
[0m
|
619
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_faculty_status" ON "openstax_accounts_accounts" ("faculty_status")
|
620
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "5"]]
|
621
|
+
[1m[35m (0.7ms)[0m commit transaction
|
622
|
+
Migrating to CreateUsers (1000)
|
623
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
624
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
625
|
+
[1m[36m (0.4ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_account_id" ON "users" ("account_id")[0m
|
626
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1000"]]
|
627
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
628
|
+
Migrating to CreateOwnerships (1001)
|
629
|
+
[1m[35m (0.0ms)[0m begin transaction
|
630
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "ownerships" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer NOT NULL, "owner_type" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
631
|
+
[1m[35m (0.3ms)[0m CREATE UNIQUE INDEX "index_ownerships_on_owner_id_and_owner_type" ON "ownerships" ("owner_id", "owner_type")
|
632
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1001"]]
|
633
|
+
[1m[35m (0.8ms)[0m commit transaction
|
634
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
635
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
636
|
+
FROM sqlite_master
|
637
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
638
|
+
UNION ALL
|
639
|
+
SELECT sql
|
640
|
+
FROM sqlite_temp_master
|
641
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
642
|
+
|
643
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
644
|
+
FROM sqlite_master
|
645
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
646
|
+
UNION ALL
|
647
|
+
SELECT sql
|
648
|
+
FROM sqlite_temp_master
|
649
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
650
|
+
[0m
|
651
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
652
|
+
FROM sqlite_master
|
653
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
654
|
+
UNION ALL
|
655
|
+
SELECT sql
|
656
|
+
FROM sqlite_temp_master
|
657
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
658
|
+
|
659
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
660
|
+
FROM sqlite_master
|
661
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
662
|
+
UNION ALL
|
663
|
+
SELECT sql
|
664
|
+
FROM sqlite_temp_master
|
665
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
666
|
+
[0m
|
667
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
668
|
+
FROM sqlite_master
|
669
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
670
|
+
UNION ALL
|
671
|
+
SELECT sql
|
672
|
+
FROM sqlite_temp_master
|
673
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
674
|
+
|
675
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
676
|
+
FROM sqlite_master
|
677
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
678
|
+
UNION ALL
|
679
|
+
SELECT sql
|
680
|
+
FROM sqlite_temp_master
|
681
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
682
|
+
[0m
|
683
|
+
[1m[35m (0.2ms)[0m SELECT sql
|
684
|
+
FROM sqlite_master
|
685
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
686
|
+
UNION ALL
|
687
|
+
SELECT sql
|
688
|
+
FROM sqlite_temp_master
|
689
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
690
|
+
|
691
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
692
|
+
FROM sqlite_master
|
693
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
694
|
+
UNION ALL
|
695
|
+
SELECT sql
|
696
|
+
FROM sqlite_temp_master
|
697
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
698
|
+
[0m
|
699
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
700
|
+
FROM sqlite_master
|
701
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
702
|
+
UNION ALL
|
703
|
+
SELECT sql
|
704
|
+
FROM sqlite_temp_master
|
705
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
706
|
+
|
707
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
708
|
+
FROM sqlite_master
|
709
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
710
|
+
UNION ALL
|
711
|
+
SELECT sql
|
712
|
+
FROM sqlite_temp_master
|
713
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
714
|
+
[0m
|
715
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
716
|
+
FROM sqlite_master
|
717
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
718
|
+
UNION ALL
|
719
|
+
SELECT sql
|
720
|
+
FROM sqlite_temp_master
|
721
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
722
|
+
|
723
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
724
|
+
FROM sqlite_master
|
725
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
726
|
+
UNION ALL
|
727
|
+
SELECT sql
|
728
|
+
FROM sqlite_temp_master
|
729
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
730
|
+
[0m
|
731
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
732
|
+
FROM sqlite_master
|
733
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
734
|
+
UNION ALL
|
735
|
+
SELECT sql
|
736
|
+
FROM sqlite_temp_master
|
737
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
738
|
+
|
739
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
740
|
+
FROM sqlite_master
|
741
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
742
|
+
UNION ALL
|
743
|
+
SELECT sql
|
744
|
+
FROM sqlite_temp_master
|
745
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
746
|
+
[0m
|
747
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
748
|
+
FROM sqlite_master
|
749
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
750
|
+
UNION ALL
|
751
|
+
SELECT sql
|
752
|
+
FROM sqlite_temp_master
|
753
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
754
|
+
|
755
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
756
|
+
FROM sqlite_master
|
757
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
758
|
+
UNION ALL
|
759
|
+
SELECT sql
|
760
|
+
FROM sqlite_temp_master
|
761
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
762
|
+
[0m
|
763
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
764
|
+
FROM sqlite_master
|
765
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
766
|
+
UNION ALL
|
767
|
+
SELECT sql
|
768
|
+
FROM sqlite_temp_master
|
769
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
770
|
+
|
771
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
772
|
+
Migrating to Test (6)
|
773
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
774
|
+
Migrating to AddBoo (6)
|
775
|
+
[1m[35m (0.1ms)[0m begin transaction
|
776
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "boo" integer DEFAULT 0 NOT NULL[0m
|
777
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "6"]]
|
778
|
+
[1m[36m (2.6ms)[0m [1mcommit transaction[0m
|
779
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
780
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
781
|
+
FROM sqlite_master
|
782
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
783
|
+
UNION ALL
|
784
|
+
SELECT sql
|
785
|
+
FROM sqlite_temp_master
|
786
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
787
|
+
[0m
|
788
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
789
|
+
FROM sqlite_master
|
790
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
791
|
+
UNION ALL
|
792
|
+
SELECT sql
|
793
|
+
FROM sqlite_temp_master
|
794
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
795
|
+
|
796
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
797
|
+
FROM sqlite_master
|
798
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
799
|
+
UNION ALL
|
800
|
+
SELECT sql
|
801
|
+
FROM sqlite_temp_master
|
802
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
803
|
+
[0m
|
804
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
805
|
+
FROM sqlite_master
|
806
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
807
|
+
UNION ALL
|
808
|
+
SELECT sql
|
809
|
+
FROM sqlite_temp_master
|
810
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
811
|
+
|
812
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
813
|
+
FROM sqlite_master
|
814
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
815
|
+
UNION ALL
|
816
|
+
SELECT sql
|
817
|
+
FROM sqlite_temp_master
|
818
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
819
|
+
[0m
|
820
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
821
|
+
FROM sqlite_master
|
822
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
823
|
+
UNION ALL
|
824
|
+
SELECT sql
|
825
|
+
FROM sqlite_temp_master
|
826
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
827
|
+
|
828
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
829
|
+
FROM sqlite_master
|
830
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
831
|
+
UNION ALL
|
832
|
+
SELECT sql
|
833
|
+
FROM sqlite_temp_master
|
834
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
835
|
+
[0m
|
836
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
837
|
+
FROM sqlite_master
|
838
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
839
|
+
UNION ALL
|
840
|
+
SELECT sql
|
841
|
+
FROM sqlite_temp_master
|
842
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
843
|
+
|
844
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
845
|
+
FROM sqlite_master
|
846
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
847
|
+
UNION ALL
|
848
|
+
SELECT sql
|
849
|
+
FROM sqlite_temp_master
|
850
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
851
|
+
[0m
|
852
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
853
|
+
FROM sqlite_master
|
854
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
855
|
+
UNION ALL
|
856
|
+
SELECT sql
|
857
|
+
FROM sqlite_temp_master
|
858
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
859
|
+
|
860
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
861
|
+
FROM sqlite_master
|
862
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
863
|
+
UNION ALL
|
864
|
+
SELECT sql
|
865
|
+
FROM sqlite_temp_master
|
866
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
867
|
+
[0m
|
868
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
869
|
+
FROM sqlite_master
|
870
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
871
|
+
UNION ALL
|
872
|
+
SELECT sql
|
873
|
+
FROM sqlite_temp_master
|
874
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
875
|
+
|
876
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
877
|
+
FROM sqlite_master
|
878
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
879
|
+
UNION ALL
|
880
|
+
SELECT sql
|
881
|
+
FROM sqlite_temp_master
|
882
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
883
|
+
[0m
|
884
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
885
|
+
FROM sqlite_master
|
886
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
887
|
+
UNION ALL
|
888
|
+
SELECT sql
|
889
|
+
FROM sqlite_temp_master
|
890
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
891
|
+
|
892
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
893
|
+
FROM sqlite_master
|
894
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
895
|
+
UNION ALL
|
896
|
+
SELECT sql
|
897
|
+
FROM sqlite_temp_master
|
898
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
899
|
+
[0m
|
900
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
901
|
+
FROM sqlite_master
|
902
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
903
|
+
UNION ALL
|
904
|
+
SELECT sql
|
905
|
+
FROM sqlite_temp_master
|
906
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
907
|
+
|
908
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
909
|
+
FROM sqlite_master
|
910
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
911
|
+
UNION ALL
|
912
|
+
SELECT sql
|
913
|
+
FROM sqlite_temp_master
|
914
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
915
|
+
[0m
|
916
|
+
[1m[36m (2.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
917
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
918
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
919
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
920
|
+
Migrating to CreateOpenStaxAccountsAccounts (0)
|
921
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
922
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "openstax_accounts_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "openstax_uid" integer NOT NULL, "username" varchar(255) NOT NULL, "access_token" varchar(255), "first_name" varchar(255), "last_name" varchar(255), "full_name" varchar(255), "title" varchar(255), "created_at" datetime, "updated_at" datetime)
|
923
|
+
[1m[36m (1.0ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_openstax_uid" ON "openstax_accounts_accounts" ("openstax_uid")[0m
|
924
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
925
|
+
FROM sqlite_master
|
926
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
927
|
+
UNION ALL
|
928
|
+
SELECT sql
|
929
|
+
FROM sqlite_temp_master
|
930
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
931
|
+
|
932
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_username" ON "openstax_accounts_accounts" ("username")[0m
|
933
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
934
|
+
FROM sqlite_master
|
935
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
936
|
+
UNION ALL
|
937
|
+
SELECT sql
|
938
|
+
FROM sqlite_temp_master
|
939
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
940
|
+
|
941
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
942
|
+
FROM sqlite_master
|
943
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
944
|
+
UNION ALL
|
945
|
+
SELECT sql
|
946
|
+
FROM sqlite_temp_master
|
947
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
948
|
+
[0m
|
949
|
+
[1m[35m (0.1ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_access_token" ON "openstax_accounts_accounts" ("access_token")
|
950
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
951
|
+
FROM sqlite_master
|
952
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
953
|
+
UNION ALL
|
954
|
+
SELECT sql
|
955
|
+
FROM sqlite_temp_master
|
956
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
957
|
+
[0m
|
958
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
959
|
+
FROM sqlite_master
|
960
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
961
|
+
UNION ALL
|
962
|
+
SELECT sql
|
963
|
+
FROM sqlite_temp_master
|
964
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
965
|
+
|
966
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
967
|
+
FROM sqlite_master
|
968
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
969
|
+
UNION ALL
|
970
|
+
SELECT sql
|
971
|
+
FROM sqlite_temp_master
|
972
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
973
|
+
[0m
|
974
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_first_name" ON "openstax_accounts_accounts" ("first_name")
|
975
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
976
|
+
FROM sqlite_master
|
977
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
978
|
+
UNION ALL
|
979
|
+
SELECT sql
|
980
|
+
FROM sqlite_temp_master
|
981
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
982
|
+
[0m
|
983
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
984
|
+
FROM sqlite_master
|
985
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
986
|
+
UNION ALL
|
987
|
+
SELECT sql
|
988
|
+
FROM sqlite_temp_master
|
989
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
990
|
+
|
991
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
992
|
+
FROM sqlite_master
|
993
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
994
|
+
UNION ALL
|
995
|
+
SELECT sql
|
996
|
+
FROM sqlite_temp_master
|
997
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
998
|
+
[0m
|
999
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
1000
|
+
FROM sqlite_master
|
1001
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1002
|
+
UNION ALL
|
1003
|
+
SELECT sql
|
1004
|
+
FROM sqlite_temp_master
|
1005
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1006
|
+
|
1007
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_last_name" ON "openstax_accounts_accounts" ("last_name")[0m
|
1008
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1009
|
+
FROM sqlite_master
|
1010
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
1011
|
+
UNION ALL
|
1012
|
+
SELECT sql
|
1013
|
+
FROM sqlite_temp_master
|
1014
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
1015
|
+
|
1016
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
1017
|
+
FROM sqlite_master
|
1018
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
1019
|
+
UNION ALL
|
1020
|
+
SELECT sql
|
1021
|
+
FROM sqlite_temp_master
|
1022
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
1023
|
+
[0m
|
1024
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
1025
|
+
FROM sqlite_master
|
1026
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
1027
|
+
UNION ALL
|
1028
|
+
SELECT sql
|
1029
|
+
FROM sqlite_temp_master
|
1030
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
1031
|
+
|
1032
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1033
|
+
FROM sqlite_master
|
1034
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
1035
|
+
UNION ALL
|
1036
|
+
SELECT sql
|
1037
|
+
FROM sqlite_temp_master
|
1038
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
1039
|
+
[0m
|
1040
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
1041
|
+
FROM sqlite_master
|
1042
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1043
|
+
UNION ALL
|
1044
|
+
SELECT sql
|
1045
|
+
FROM sqlite_temp_master
|
1046
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1047
|
+
|
1048
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_full_name" ON "openstax_accounts_accounts" ("full_name")[0m
|
1049
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
|
1050
|
+
[1m[36m (1.2ms)[0m [1mcommit transaction[0m
|
1051
|
+
Migrating to CreateOpenStaxAccountsGroups (1)
|
1052
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1053
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "openstax_accounts_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "openstax_uid" integer NOT NULL, "is_public" boolean DEFAULT 'f' NOT NULL, "name" varchar(255), "cached_subtree_group_ids" text, "cached_supertree_group_ids" text, "created_at" datetime, "updated_at" datetime) [0m
|
1054
|
+
[1m[35m (0.4ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_groups_on_openstax_uid" ON "openstax_accounts_groups" ("openstax_uid")
|
1055
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1056
|
+
FROM sqlite_master
|
1057
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
1058
|
+
UNION ALL
|
1059
|
+
SELECT sql
|
1060
|
+
FROM sqlite_temp_master
|
1061
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
1062
|
+
[0m
|
1063
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_groups_on_is_public" ON "openstax_accounts_groups" ("is_public")
|
1064
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1"]]
|
1065
|
+
[1m[35m (1.0ms)[0m commit transaction
|
1066
|
+
Migrating to CreateOpenStaxAccountsGroupMembers (2)
|
1067
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1068
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "openstax_accounts_group_members" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
1069
|
+
[1m[36m (0.3ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_members_on_group_id_and_user_id" ON "openstax_accounts_group_members" ("group_id", "user_id")[0m
|
1070
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1071
|
+
FROM sqlite_master
|
1072
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
1073
|
+
UNION ALL
|
1074
|
+
SELECT sql
|
1075
|
+
FROM sqlite_temp_master
|
1076
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
1077
|
+
|
1078
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_members_on_user_id" ON "openstax_accounts_group_members" ("user_id")[0m
|
1079
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "2"]]
|
1080
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
1081
|
+
Migrating to CreateOpenStaxAccountsGroupOwners (3)
|
1082
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1083
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "openstax_accounts_group_owners" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
1084
|
+
[1m[35m (0.4ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_owners_on_group_id_and_user_id" ON "openstax_accounts_group_owners" ("group_id", "user_id")
|
1085
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1086
|
+
FROM sqlite_master
|
1087
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
1088
|
+
UNION ALL
|
1089
|
+
SELECT sql
|
1090
|
+
FROM sqlite_temp_master
|
1091
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
1092
|
+
[0m
|
1093
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_group_owners_on_user_id" ON "openstax_accounts_group_owners" ("user_id")
|
1094
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "3"]]
|
1095
|
+
[1m[35m (0.9ms)[0m commit transaction
|
1096
|
+
Migrating to CreateOpenStaxAccountsGroupNestings (4)
|
1097
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1098
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "openstax_accounts_group_nestings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "member_group_id" integer NOT NULL, "container_group_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
1099
|
+
[1m[36m (0.4ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_group_nestings_on_member_group_id" ON "openstax_accounts_group_nestings" ("member_group_id")[0m
|
1100
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1101
|
+
FROM sqlite_master
|
1102
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
1103
|
+
UNION ALL
|
1104
|
+
SELECT sql
|
1105
|
+
FROM sqlite_temp_master
|
1106
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
1107
|
+
|
1108
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_nestings_on_container_group_id" ON "openstax_accounts_group_nestings" ("container_group_id")[0m
|
1109
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "4"]]
|
1110
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
1111
|
+
Migrating to AddFacultyStatusToAccountsAccounts (5)
|
1112
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1113
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "faculty_status" integer DEFAULT 0 NOT NULL[0m
|
1114
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1115
|
+
FROM sqlite_master
|
1116
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
1117
|
+
UNION ALL
|
1118
|
+
SELECT sql
|
1119
|
+
FROM sqlite_temp_master
|
1120
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
1121
|
+
|
1122
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1123
|
+
FROM sqlite_master
|
1124
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
1125
|
+
UNION ALL
|
1126
|
+
SELECT sql
|
1127
|
+
FROM sqlite_temp_master
|
1128
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
1129
|
+
[0m
|
1130
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1131
|
+
FROM sqlite_master
|
1132
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
1133
|
+
UNION ALL
|
1134
|
+
SELECT sql
|
1135
|
+
FROM sqlite_temp_master
|
1136
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
1137
|
+
|
1138
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1139
|
+
FROM sqlite_master
|
1140
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
1141
|
+
UNION ALL
|
1142
|
+
SELECT sql
|
1143
|
+
FROM sqlite_temp_master
|
1144
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
1145
|
+
[0m
|
1146
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1147
|
+
FROM sqlite_master
|
1148
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
1149
|
+
UNION ALL
|
1150
|
+
SELECT sql
|
1151
|
+
FROM sqlite_temp_master
|
1152
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
1153
|
+
|
1154
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1155
|
+
FROM sqlite_master
|
1156
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1157
|
+
UNION ALL
|
1158
|
+
SELECT sql
|
1159
|
+
FROM sqlite_temp_master
|
1160
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1161
|
+
[0m
|
1162
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_faculty_status" ON "openstax_accounts_accounts" ("faculty_status")
|
1163
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "5"]]
|
1164
|
+
[1m[35m (0.7ms)[0m commit transaction
|
1165
|
+
Migrating to CreateUsers (1000)
|
1166
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1167
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)
|
1168
|
+
[1m[36m (0.4ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_account_id" ON "users" ("account_id")[0m
|
1169
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1000"]]
|
1170
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
1171
|
+
Migrating to CreateOwnerships (1001)
|
1172
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1173
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "ownerships" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer NOT NULL, "owner_type" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
1174
|
+
[1m[35m (0.4ms)[0m CREATE UNIQUE INDEX "index_ownerships_on_owner_id_and_owner_type" ON "ownerships" ("owner_id", "owner_type")
|
1175
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1001"]]
|
1176
|
+
[1m[35m (1.3ms)[0m commit transaction
|
1177
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1178
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1179
|
+
FROM sqlite_master
|
1180
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
1181
|
+
UNION ALL
|
1182
|
+
SELECT sql
|
1183
|
+
FROM sqlite_temp_master
|
1184
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
1185
|
+
|
1186
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1187
|
+
FROM sqlite_master
|
1188
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
1189
|
+
UNION ALL
|
1190
|
+
SELECT sql
|
1191
|
+
FROM sqlite_temp_master
|
1192
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
1193
|
+
[0m
|
1194
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1195
|
+
FROM sqlite_master
|
1196
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
1197
|
+
UNION ALL
|
1198
|
+
SELECT sql
|
1199
|
+
FROM sqlite_temp_master
|
1200
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
1201
|
+
|
1202
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1203
|
+
FROM sqlite_master
|
1204
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
1205
|
+
UNION ALL
|
1206
|
+
SELECT sql
|
1207
|
+
FROM sqlite_temp_master
|
1208
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
1209
|
+
[0m
|
1210
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1211
|
+
FROM sqlite_master
|
1212
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
1213
|
+
UNION ALL
|
1214
|
+
SELECT sql
|
1215
|
+
FROM sqlite_temp_master
|
1216
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
1217
|
+
|
1218
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1219
|
+
FROM sqlite_master
|
1220
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
1221
|
+
UNION ALL
|
1222
|
+
SELECT sql
|
1223
|
+
FROM sqlite_temp_master
|
1224
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
1225
|
+
[0m
|
1226
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1227
|
+
FROM sqlite_master
|
1228
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1229
|
+
UNION ALL
|
1230
|
+
SELECT sql
|
1231
|
+
FROM sqlite_temp_master
|
1232
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
1233
|
+
|
1234
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1235
|
+
FROM sqlite_master
|
1236
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
1237
|
+
UNION ALL
|
1238
|
+
SELECT sql
|
1239
|
+
FROM sqlite_temp_master
|
1240
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
1241
|
+
[0m
|
1242
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1243
|
+
FROM sqlite_master
|
1244
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
1245
|
+
UNION ALL
|
1246
|
+
SELECT sql
|
1247
|
+
FROM sqlite_temp_master
|
1248
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
1249
|
+
|
1250
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1251
|
+
FROM sqlite_master
|
1252
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
1253
|
+
UNION ALL
|
1254
|
+
SELECT sql
|
1255
|
+
FROM sqlite_temp_master
|
1256
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
1257
|
+
[0m
|
1258
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1259
|
+
FROM sqlite_master
|
1260
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
1261
|
+
UNION ALL
|
1262
|
+
SELECT sql
|
1263
|
+
FROM sqlite_temp_master
|
1264
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
1265
|
+
|
1266
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1267
|
+
FROM sqlite_master
|
1268
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
1269
|
+
UNION ALL
|
1270
|
+
SELECT sql
|
1271
|
+
FROM sqlite_temp_master
|
1272
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
1273
|
+
[0m
|
1274
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1275
|
+
FROM sqlite_master
|
1276
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
1277
|
+
UNION ALL
|
1278
|
+
SELECT sql
|
1279
|
+
FROM sqlite_temp_master
|
1280
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
1281
|
+
|
1282
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1283
|
+
FROM sqlite_master
|
1284
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
1285
|
+
UNION ALL
|
1286
|
+
SELECT sql
|
1287
|
+
FROM sqlite_temp_master
|
1288
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
1289
|
+
[0m
|
1290
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1291
|
+
FROM sqlite_master
|
1292
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
1293
|
+
UNION ALL
|
1294
|
+
SELECT sql
|
1295
|
+
FROM sqlite_temp_master
|
1296
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
1297
|
+
|
1298
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1299
|
+
FROM sqlite_master
|
1300
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
1301
|
+
UNION ALL
|
1302
|
+
SELECT sql
|
1303
|
+
FROM sqlite_temp_master
|
1304
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
1305
|
+
[0m
|
1306
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1307
|
+
FROM sqlite_master
|
1308
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
1309
|
+
UNION ALL
|
1310
|
+
SELECT sql
|
1311
|
+
FROM sqlite_temp_master
|
1312
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
1313
|
+
|
1314
|
+
[1m[36mOpenStax::Accounts::Account Exists (1.5ms)[0m [1mSELECT 1 AS one FROM "openstax_accounts_accounts" WHERE "openstax_accounts_accounts"."openstax_uid" IS NULL LIMIT 1[0m
|