openstax_accounts 7.3.0 → 7.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/openstax/accounts/account.rb +3 -1
- data/app/representers/openstax/accounts/api/v1/account_representer.rb +16 -0
- data/app/routines/openstax/accounts/find_or_create_account.rb +3 -2
- data/app/routines/openstax/accounts/sync_accounts.rb +1 -1
- data/db/migrate/9_add_uuid_and_role_to_accounts_accounts.rb +9 -0
- data/lib/openstax/accounts/api.rb +4 -2
- data/lib/openstax/accounts/configuration.rb +8 -0
- data/lib/openstax/accounts/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +4 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +379 -0
- data/spec/dummy/log/test.log +48112 -0
- data/spec/factories/openstax_accounts_account.rb +2 -0
- data/spec/lib/openstax/accounts/api_spec.rb +25 -45
- data/spec/models/openstax/accounts/account_spec.rb +6 -0
- data/spec/routines/openstax/accounts/find_or_create_account_spec.rb +4 -2
- data/spec/routines/openstax/accounts/sync_accounts_spec.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce623db44c0708f64ebd6296553c9bb9baa85155
|
4
|
+
data.tar.gz: 912df21908f79486466243da03c45ac7a9640967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdf7d0019ee853afc6cd0b295d7fc452749c61824b3ea75c1b5c3d5c10ad840b183e781e04833c720b31ff69df1e2f1c3279d5d5398fc5fc3f6618adaba7869d
|
7
|
+
data.tar.gz: 38d12dd367e42997e21f2a0be678decd4e6c1fe90c937a02c9c569a45b75520485e25436e6dd5c83fae273b4cc43c9a925cde39e7d7c70164e62e2447b348d2d
|
@@ -24,9 +24,11 @@ module OpenStax::Accounts
|
|
24
24
|
:confirmed_faculty, :rejected_faculty]
|
25
25
|
|
26
26
|
after_initialize :set_default_faculty_status
|
27
|
-
|
28
27
|
validates :faculty_status, presence: true
|
29
28
|
|
29
|
+
enum role: [:unknown_role, :student, :instructor, :administrator, :librarian, :designer, :other]
|
30
|
+
validates :role, presence: true
|
31
|
+
|
30
32
|
validates :openstax_uid, uniqueness: { allow_nil: true }
|
31
33
|
validates :username, uniqueness: { allow_nil: true }
|
32
34
|
|
@@ -68,6 +68,22 @@ module OpenStax
|
|
68
68
|
}"
|
69
69
|
}
|
70
70
|
|
71
|
+
property :role,
|
72
|
+
as: :self_reported_role,
|
73
|
+
type: String,
|
74
|
+
schema_info: {
|
75
|
+
description: "The user's uncorroborated role, one of [#{
|
76
|
+
OpenStax::Accounts::Account.roles.keys.map(&:to_s).join(', ')
|
77
|
+
}]",
|
78
|
+
required: true
|
79
|
+
}
|
80
|
+
|
81
|
+
property :uuid,
|
82
|
+
type: String,
|
83
|
+
schema_info: {
|
84
|
+
description: "The UUID as set by Accounts"
|
85
|
+
}
|
86
|
+
|
71
87
|
end
|
72
88
|
end
|
73
89
|
end
|
@@ -8,7 +8,7 @@ module OpenStax
|
|
8
8
|
|
9
9
|
def exec(email: nil, username: nil, password: nil,
|
10
10
|
first_name: nil, last_name: nil, full_name: nil, title: nil,
|
11
|
-
salesforce_contact_id: nil, faculty_status: nil)
|
11
|
+
salesforce_contact_id: nil, faculty_status: nil, role: nil)
|
12
12
|
raise ArgumentError,
|
13
13
|
'You must specify either an email address or a username (and an optional password)' \
|
14
14
|
if email.nil? && username.nil?
|
@@ -21,7 +21,8 @@ module OpenStax
|
|
21
21
|
response = Api.find_or_create_account(
|
22
22
|
email: email, username: username, password: password,
|
23
23
|
first_name: first_name, last_name: last_name, full_name: full_name,
|
24
|
-
salesforce_contact_id: salesforce_contact_id, faculty_status: faculty_status
|
24
|
+
salesforce_contact_id: salesforce_contact_id, faculty_status: faculty_status,
|
25
|
+
role: role)
|
25
26
|
fatal_error(code: :invalid_inputs) unless (200..202).include?(response.status)
|
26
27
|
|
27
28
|
struct = OpenStruct.new
|
@@ -8,7 +8,7 @@ module OpenStax
|
|
8
8
|
class SyncAccounts
|
9
9
|
|
10
10
|
SYNC_ATTRIBUTES = ['username', 'first_name', 'last_name', 'full_name', 'title',
|
11
|
-
'faculty_status', 'salesforce_contact_id']
|
11
|
+
'faculty_status', 'salesforce_contact_id', 'uuid', 'role']
|
12
12
|
|
13
13
|
lev_routine transaction: :no_transaction
|
14
14
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddUuidAndRoleToAccountsAccounts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :openstax_accounts_accounts, :uuid, :string
|
4
|
+
add_index :openstax_accounts_accounts, :uuid, unique: true
|
5
|
+
|
6
|
+
add_column :openstax_accounts_accounts, :role, :integer, default: 0, null: false
|
7
|
+
add_index :openstax_accounts_accounts, :role
|
8
|
+
end
|
9
|
+
end
|
@@ -74,12 +74,14 @@ module OpenStax
|
|
74
74
|
|
75
75
|
# Retrieves information about accounts that have been
|
76
76
|
# recently updated.
|
77
|
-
# Results are limited to accounts that have used the current app
|
77
|
+
# Results are limited to accounts that have used the current app, and
|
78
|
+
# limited in quantity per call by a configuration parameter.
|
78
79
|
# Takes an options hash.
|
79
80
|
# On failure, throws an Exception, just like the request method.
|
80
81
|
# On success, returns an OAuth2::Response object.
|
81
82
|
def self.get_application_account_updates(options = {})
|
82
|
-
|
83
|
+
limit = OpenStax::Accounts.configuration.max_user_updates_per_request
|
84
|
+
request(:get, "application_users/updates#{ '?limit=' + limit.to_s if !limit.blank? }", options)
|
83
85
|
end
|
84
86
|
|
85
87
|
# Marks account updates as "read".
|
@@ -64,6 +64,13 @@ module OpenStax
|
|
64
64
|
# Which params are forwarded on the accounts login path
|
65
65
|
attr_accessor :forwardable_login_param_keys
|
66
66
|
|
67
|
+
# max_user_updates_per_request
|
68
|
+
# When the user profile sync operation is called, this parameter will limit
|
69
|
+
# the number of returned profile updates from Accounts; helpful when all
|
70
|
+
# accounts have been marked as updated on Accounts so that we don't get
|
71
|
+
# overloaded.
|
72
|
+
attr_accessor :max_user_updates_per_request
|
73
|
+
|
67
74
|
def logout_redirect_url(request)
|
68
75
|
(@logout_redirect_url.is_a?(Proc) ?
|
69
76
|
@logout_redirect_url.call(request) :
|
@@ -99,6 +106,7 @@ module OpenStax
|
|
99
106
|
@logout_redirect_url = nil
|
100
107
|
@return_to_url_approver = nil
|
101
108
|
@forwardable_login_param_keys = [:signup_at, :go]
|
109
|
+
@max_user_updates_per_request = 250
|
102
110
|
super
|
103
111
|
end
|
104
112
|
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -25,6 +25,8 @@ ActiveRecord::Schema.define(version: 1001) do
|
|
25
25
|
t.datetime "updated_at", null: false
|
26
26
|
t.integer "faculty_status", default: 0, null: false
|
27
27
|
t.string "salesforce_contact_id"
|
28
|
+
t.string "uuid"
|
29
|
+
t.integer "role", default: 0, null: false
|
28
30
|
end
|
29
31
|
|
30
32
|
add_index "openstax_accounts_accounts", ["access_token"], name: "index_openstax_accounts_accounts_on_access_token", unique: true
|
@@ -33,8 +35,10 @@ ActiveRecord::Schema.define(version: 1001) do
|
|
33
35
|
add_index "openstax_accounts_accounts", ["full_name"], name: "index_openstax_accounts_accounts_on_full_name"
|
34
36
|
add_index "openstax_accounts_accounts", ["last_name"], name: "index_openstax_accounts_accounts_on_last_name"
|
35
37
|
add_index "openstax_accounts_accounts", ["openstax_uid"], name: "index_openstax_accounts_accounts_on_openstax_uid", unique: true
|
38
|
+
add_index "openstax_accounts_accounts", ["role"], name: "index_openstax_accounts_accounts_on_role"
|
36
39
|
add_index "openstax_accounts_accounts", ["salesforce_contact_id"], name: "index_openstax_accounts_accounts_on_salesforce_contact_id"
|
37
40
|
add_index "openstax_accounts_accounts", ["username"], name: "index_openstax_accounts_accounts_on_username", unique: true
|
41
|
+
add_index "openstax_accounts_accounts", ["uuid"], name: "index_openstax_accounts_accounts_on_uuid", unique: true
|
38
42
|
|
39
43
|
create_table "openstax_accounts_group_members", force: :cascade do |t|
|
40
44
|
t.integer "group_id", null: false
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -6068,3 +6068,382 @@ Migrating to CreateOwnerships (1001)
|
|
6068
6068
|
WHERE name='index_users_on_account_id' AND type='index'
|
6069
6069
|
[0m
|
6070
6070
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
6071
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6072
|
+
Migrating to AddUuidAndRoleToAccountsAccounts (9)
|
6073
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6074
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "uuid" varchar[0m
|
6075
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
6076
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6077
|
+
FROM sqlite_master
|
6078
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6079
|
+
UNION ALL
|
6080
|
+
SELECT sql
|
6081
|
+
FROM sqlite_temp_master
|
6082
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6083
|
+
[0m
|
6084
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6085
|
+
FROM sqlite_master
|
6086
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6087
|
+
UNION ALL
|
6088
|
+
SELECT sql
|
6089
|
+
FROM sqlite_temp_master
|
6090
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6091
|
+
|
6092
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6093
|
+
FROM sqlite_master
|
6094
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6095
|
+
UNION ALL
|
6096
|
+
SELECT sql
|
6097
|
+
FROM sqlite_temp_master
|
6098
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6099
|
+
[0m
|
6100
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6101
|
+
FROM sqlite_master
|
6102
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6103
|
+
UNION ALL
|
6104
|
+
SELECT sql
|
6105
|
+
FROM sqlite_temp_master
|
6106
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6107
|
+
|
6108
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6109
|
+
FROM sqlite_master
|
6110
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6111
|
+
UNION ALL
|
6112
|
+
SELECT sql
|
6113
|
+
FROM sqlite_temp_master
|
6114
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6115
|
+
[0m
|
6116
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6117
|
+
FROM sqlite_master
|
6118
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6119
|
+
UNION ALL
|
6120
|
+
SELECT sql
|
6121
|
+
FROM sqlite_temp_master
|
6122
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6123
|
+
|
6124
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6125
|
+
FROM sqlite_master
|
6126
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6127
|
+
UNION ALL
|
6128
|
+
SELECT sql
|
6129
|
+
FROM sqlite_temp_master
|
6130
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6131
|
+
[0m
|
6132
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6133
|
+
FROM sqlite_master
|
6134
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6135
|
+
UNION ALL
|
6136
|
+
SELECT sql
|
6137
|
+
FROM sqlite_temp_master
|
6138
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6139
|
+
|
6140
|
+
[1m[36m (0.3ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_uuid" ON "openstax_accounts_accounts" ("uuid")[0m
|
6141
|
+
[1m[35m (0.1ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "role" integer NOT NULL
|
6142
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
6143
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6144
|
+
Migrating to AddUuidAndRoleToAccountsAccounts (9)
|
6145
|
+
[1m[35m (0.0ms)[0m begin transaction
|
6146
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "uuid" varchar[0m
|
6147
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
6148
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6149
|
+
FROM sqlite_master
|
6150
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6151
|
+
UNION ALL
|
6152
|
+
SELECT sql
|
6153
|
+
FROM sqlite_temp_master
|
6154
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6155
|
+
[0m
|
6156
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6157
|
+
FROM sqlite_master
|
6158
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6159
|
+
UNION ALL
|
6160
|
+
SELECT sql
|
6161
|
+
FROM sqlite_temp_master
|
6162
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6163
|
+
|
6164
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6165
|
+
FROM sqlite_master
|
6166
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6167
|
+
UNION ALL
|
6168
|
+
SELECT sql
|
6169
|
+
FROM sqlite_temp_master
|
6170
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6171
|
+
[0m
|
6172
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6173
|
+
FROM sqlite_master
|
6174
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6175
|
+
UNION ALL
|
6176
|
+
SELECT sql
|
6177
|
+
FROM sqlite_temp_master
|
6178
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6179
|
+
|
6180
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6181
|
+
FROM sqlite_master
|
6182
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6183
|
+
UNION ALL
|
6184
|
+
SELECT sql
|
6185
|
+
FROM sqlite_temp_master
|
6186
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6187
|
+
[0m
|
6188
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6189
|
+
FROM sqlite_master
|
6190
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6191
|
+
UNION ALL
|
6192
|
+
SELECT sql
|
6193
|
+
FROM sqlite_temp_master
|
6194
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6195
|
+
|
6196
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6197
|
+
FROM sqlite_master
|
6198
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6199
|
+
UNION ALL
|
6200
|
+
SELECT sql
|
6201
|
+
FROM sqlite_temp_master
|
6202
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6203
|
+
[0m
|
6204
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6205
|
+
FROM sqlite_master
|
6206
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6207
|
+
UNION ALL
|
6208
|
+
SELECT sql
|
6209
|
+
FROM sqlite_temp_master
|
6210
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6211
|
+
|
6212
|
+
[1m[36m (0.3ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_uuid" ON "openstax_accounts_accounts" ("uuid")[0m
|
6213
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "role" integer DEFAULT 0 NOT NULL
|
6214
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6215
|
+
FROM sqlite_master
|
6216
|
+
WHERE name='index_openstax_accounts_accounts_on_uuid' AND type='index'
|
6217
|
+
UNION ALL
|
6218
|
+
SELECT sql
|
6219
|
+
FROM sqlite_temp_master
|
6220
|
+
WHERE name='index_openstax_accounts_accounts_on_uuid' AND type='index'
|
6221
|
+
[0m
|
6222
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6223
|
+
FROM sqlite_master
|
6224
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6225
|
+
UNION ALL
|
6226
|
+
SELECT sql
|
6227
|
+
FROM sqlite_temp_master
|
6228
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6229
|
+
|
6230
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6231
|
+
FROM sqlite_master
|
6232
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6233
|
+
UNION ALL
|
6234
|
+
SELECT sql
|
6235
|
+
FROM sqlite_temp_master
|
6236
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6237
|
+
[0m
|
6238
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6239
|
+
FROM sqlite_master
|
6240
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6241
|
+
UNION ALL
|
6242
|
+
SELECT sql
|
6243
|
+
FROM sqlite_temp_master
|
6244
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6245
|
+
|
6246
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6247
|
+
FROM sqlite_master
|
6248
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6249
|
+
UNION ALL
|
6250
|
+
SELECT sql
|
6251
|
+
FROM sqlite_temp_master
|
6252
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6253
|
+
[0m
|
6254
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6255
|
+
FROM sqlite_master
|
6256
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6257
|
+
UNION ALL
|
6258
|
+
SELECT sql
|
6259
|
+
FROM sqlite_temp_master
|
6260
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6261
|
+
|
6262
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6263
|
+
FROM sqlite_master
|
6264
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6265
|
+
UNION ALL
|
6266
|
+
SELECT sql
|
6267
|
+
FROM sqlite_temp_master
|
6268
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6269
|
+
[0m
|
6270
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6271
|
+
FROM sqlite_master
|
6272
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6273
|
+
UNION ALL
|
6274
|
+
SELECT sql
|
6275
|
+
FROM sqlite_temp_master
|
6276
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6277
|
+
|
6278
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6279
|
+
FROM sqlite_master
|
6280
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6281
|
+
UNION ALL
|
6282
|
+
SELECT sql
|
6283
|
+
FROM sqlite_temp_master
|
6284
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6285
|
+
[0m
|
6286
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_role" ON "openstax_accounts_accounts" ("role")
|
6287
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "9"]]
|
6288
|
+
[1m[35m (1.1ms)[0m commit transaction
|
6289
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6290
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6291
|
+
FROM sqlite_master
|
6292
|
+
WHERE name='index_openstax_accounts_accounts_on_role' AND type='index'
|
6293
|
+
UNION ALL
|
6294
|
+
SELECT sql
|
6295
|
+
FROM sqlite_temp_master
|
6296
|
+
WHERE name='index_openstax_accounts_accounts_on_role' AND type='index'
|
6297
|
+
|
6298
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6299
|
+
FROM sqlite_master
|
6300
|
+
WHERE name='index_openstax_accounts_accounts_on_uuid' AND type='index'
|
6301
|
+
UNION ALL
|
6302
|
+
SELECT sql
|
6303
|
+
FROM sqlite_temp_master
|
6304
|
+
WHERE name='index_openstax_accounts_accounts_on_uuid' AND type='index'
|
6305
|
+
[0m
|
6306
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6307
|
+
FROM sqlite_master
|
6308
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6309
|
+
UNION ALL
|
6310
|
+
SELECT sql
|
6311
|
+
FROM sqlite_temp_master
|
6312
|
+
WHERE name='index_openstax_accounts_accounts_on_salesforce_contact_id' AND type='index'
|
6313
|
+
|
6314
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6315
|
+
FROM sqlite_master
|
6316
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6317
|
+
UNION ALL
|
6318
|
+
SELECT sql
|
6319
|
+
FROM sqlite_temp_master
|
6320
|
+
WHERE name='index_openstax_accounts_accounts_on_faculty_status' AND type='index'
|
6321
|
+
[0m
|
6322
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6323
|
+
FROM sqlite_master
|
6324
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6325
|
+
UNION ALL
|
6326
|
+
SELECT sql
|
6327
|
+
FROM sqlite_temp_master
|
6328
|
+
WHERE name='index_openstax_accounts_accounts_on_full_name' AND type='index'
|
6329
|
+
|
6330
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6331
|
+
FROM sqlite_master
|
6332
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6333
|
+
UNION ALL
|
6334
|
+
SELECT sql
|
6335
|
+
FROM sqlite_temp_master
|
6336
|
+
WHERE name='index_openstax_accounts_accounts_on_last_name' AND type='index'
|
6337
|
+
[0m
|
6338
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6339
|
+
FROM sqlite_master
|
6340
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6341
|
+
UNION ALL
|
6342
|
+
SELECT sql
|
6343
|
+
FROM sqlite_temp_master
|
6344
|
+
WHERE name='index_openstax_accounts_accounts_on_first_name' AND type='index'
|
6345
|
+
|
6346
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6347
|
+
FROM sqlite_master
|
6348
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6349
|
+
UNION ALL
|
6350
|
+
SELECT sql
|
6351
|
+
FROM sqlite_temp_master
|
6352
|
+
WHERE name='index_openstax_accounts_accounts_on_access_token' AND type='index'
|
6353
|
+
[0m
|
6354
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6355
|
+
FROM sqlite_master
|
6356
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6357
|
+
UNION ALL
|
6358
|
+
SELECT sql
|
6359
|
+
FROM sqlite_temp_master
|
6360
|
+
WHERE name='index_openstax_accounts_accounts_on_username' AND type='index'
|
6361
|
+
|
6362
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6363
|
+
FROM sqlite_master
|
6364
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6365
|
+
UNION ALL
|
6366
|
+
SELECT sql
|
6367
|
+
FROM sqlite_temp_master
|
6368
|
+
WHERE name='index_openstax_accounts_accounts_on_openstax_uid' AND type='index'
|
6369
|
+
[0m
|
6370
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6371
|
+
FROM sqlite_master
|
6372
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
6373
|
+
UNION ALL
|
6374
|
+
SELECT sql
|
6375
|
+
FROM sqlite_temp_master
|
6376
|
+
WHERE name='index_openstax_accounts_group_members_on_user_id' AND type='index'
|
6377
|
+
|
6378
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6379
|
+
FROM sqlite_master
|
6380
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
6381
|
+
UNION ALL
|
6382
|
+
SELECT sql
|
6383
|
+
FROM sqlite_temp_master
|
6384
|
+
WHERE name='index_openstax_accounts_group_members_on_group_id_and_user_id' AND type='index'
|
6385
|
+
[0m
|
6386
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6387
|
+
FROM sqlite_master
|
6388
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
6389
|
+
UNION ALL
|
6390
|
+
SELECT sql
|
6391
|
+
FROM sqlite_temp_master
|
6392
|
+
WHERE name='index_openstax_accounts_group_nestings_on_container_group_id' AND type='index'
|
6393
|
+
|
6394
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6395
|
+
FROM sqlite_master
|
6396
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
6397
|
+
UNION ALL
|
6398
|
+
SELECT sql
|
6399
|
+
FROM sqlite_temp_master
|
6400
|
+
WHERE name='index_openstax_accounts_group_nestings_on_member_group_id' AND type='index'
|
6401
|
+
[0m
|
6402
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6403
|
+
FROM sqlite_master
|
6404
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
6405
|
+
UNION ALL
|
6406
|
+
SELECT sql
|
6407
|
+
FROM sqlite_temp_master
|
6408
|
+
WHERE name='index_openstax_accounts_group_owners_on_user_id' AND type='index'
|
6409
|
+
|
6410
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6411
|
+
FROM sqlite_master
|
6412
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
6413
|
+
UNION ALL
|
6414
|
+
SELECT sql
|
6415
|
+
FROM sqlite_temp_master
|
6416
|
+
WHERE name='index_openstax_accounts_group_owners_on_group_id_and_user_id' AND type='index'
|
6417
|
+
[0m
|
6418
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6419
|
+
FROM sqlite_master
|
6420
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
6421
|
+
UNION ALL
|
6422
|
+
SELECT sql
|
6423
|
+
FROM sqlite_temp_master
|
6424
|
+
WHERE name='index_openstax_accounts_groups_on_is_public' AND type='index'
|
6425
|
+
|
6426
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6427
|
+
FROM sqlite_master
|
6428
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
6429
|
+
UNION ALL
|
6430
|
+
SELECT sql
|
6431
|
+
FROM sqlite_temp_master
|
6432
|
+
WHERE name='index_openstax_accounts_groups_on_openstax_uid' AND type='index'
|
6433
|
+
[0m
|
6434
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
6435
|
+
FROM sqlite_master
|
6436
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
6437
|
+
UNION ALL
|
6438
|
+
SELECT sql
|
6439
|
+
FROM sqlite_temp_master
|
6440
|
+
WHERE name='index_ownerships_on_owner_id_and_owner_type' AND type='index'
|
6441
|
+
|
6442
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
6443
|
+
FROM sqlite_master
|
6444
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
6445
|
+
UNION ALL
|
6446
|
+
SELECT sql
|
6447
|
+
FROM sqlite_temp_master
|
6448
|
+
WHERE name='index_users_on_account_id' AND type='index'
|
6449
|
+
[0m
|