openstax_accounts 7.9.0 → 7.10.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 +1 -0
- data/app/models/openstax/accounts/account.rb +3 -3
- data/app/representers/openstax/accounts/api/v1/account_representer.rb +6 -0
- data/app/representers/openstax/accounts/api/v1/unclaimed_account_representer.rb +6 -0
- data/app/routines/openstax/accounts/dev/create_account.rb +2 -1
- data/app/routines/openstax/accounts/find_or_create_account.rb +3 -0
- data/app/routines/openstax/accounts/sync_accounts.rb +9 -6
- data/db/migrate/11_add_support_identifier_to_accounts_accounts.rb +8 -0
- data/lib/openstax/accounts/version.rb +1 -1
- data/spec/cassettes/OpenStax_Accounts_FindOrCreateAccount/can_create_users.yml +9 -9
- data/spec/controllers/openstax/accounts/dev/accounts_controller_spec.rb +1 -1
- data/spec/controllers/openstax/accounts/forwards_params_spec.rb +1 -1
- data/spec/controllers/openstax/accounts/sessions_controller_spec.rb +1 -1
- data/spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb +1 -1
- data/spec/dummy/db/schema.rb +3 -0
- data/spec/dummy/log/development.log +560 -0
- data/spec/dummy/log/test.log +27696 -0
- data/spec/factories/openstax_accounts_account.rb +7 -6
- data/spec/handlers/openstax/accounts/accounts_search_spec.rb +1 -1
- data/spec/handlers/openstax/accounts/dev/accounts_search_spec.rb +1 -1
- data/spec/handlers/openstax/accounts/sessions_callback_spec.rb +27 -7
- data/spec/lib/openstax/accounts/api_spec.rb +1 -1
- data/spec/lib/openstax/accounts/configuration_spec.rb +1 -1
- data/spec/lib/openstax/accounts/current_user_manager_spec.rb +1 -1
- data/spec/lib/openstax/accounts/has_many_through_groups/active_record/base_spec.rb +1 -1
- data/spec/models/openstax/accounts/account_spec.rb +5 -1
- data/spec/models/openstax/accounts/anonymous_account_spec.rb +1 -1
- data/spec/models/openstax/accounts/group_spec.rb +1 -1
- data/spec/routines/openstax/accounts/create_group_spec.rb +1 -1
- data/spec/routines/openstax/accounts/find_or_create_account_spec.rb +18 -8
- data/spec/routines/openstax/accounts/search_accounts_spec.rb +1 -1
- data/spec/routines/openstax/accounts/sync_accounts_spec.rb +39 -29
- data/spec/routines/openstax/accounts/sync_groups_spec.rb +47 -65
- data/spec/spec_helper.rb +17 -9
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a3a818263cae68cd11e274bc806919549ed7ff6
|
4
|
+
data.tar.gz: f3ee45a3605f0dc205c217362a92b02a6adc56c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03d98354d298471e084f2a4048907e87bb47b4c87326185fd0894879ec2b639558e770597b7596dcf06ec2d71a27274e99be93f3d37e585603f770db0606a9e0
|
7
|
+
data.tar.gz: ffa1e8ef58adbea901abb9652474e83811eee1b22304ad31d887227b9b7e843cf3c22075bfea187fbdfe086ab0ff1b6b2c5fd34dbcfc248fc722a850a024edb7
|
@@ -20,8 +20,7 @@ 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,
|
24
|
-
:confirmed_faculty, :rejected_faculty]
|
23
|
+
enum faculty_status: [:no_faculty_info, :pending_faculty, :confirmed_faculty, :rejected_faculty]
|
25
24
|
|
26
25
|
after_initialize :set_default_faculty_status
|
27
26
|
validates :faculty_status, presence: true
|
@@ -31,7 +30,8 @@ module OpenStax::Accounts
|
|
31
30
|
|
32
31
|
validates :openstax_uid, uniqueness: { allow_nil: true }
|
33
32
|
validates :username, uniqueness: { allow_nil: true }
|
34
|
-
validates :uuid,
|
33
|
+
validates :uuid, presence: true, uniqueness: true
|
34
|
+
validates :support_identifier, uniqueness: { allow_nil: true }
|
35
35
|
|
36
36
|
before_update :update_openstax_accounts, if: :should_send_updates_to_accounts?
|
37
37
|
|
@@ -23,8 +23,9 @@ module OpenStax
|
|
23
23
|
account.openstax_uid = -SecureRandom.hex(4).to_i(16)/2
|
24
24
|
account.access_token = SecureRandom.hex.to_s
|
25
25
|
account.username = username
|
26
|
-
account.uuid = SecureRandom.uuid
|
27
26
|
account.role = inputs[:role] || :unknown_role
|
27
|
+
account.uuid = SecureRandom.uuid
|
28
|
+
account.support_identifier = "cs_#{SecureRandom.hex(4)}"
|
28
29
|
|
29
30
|
account.save
|
30
31
|
|
@@ -18,6 +18,7 @@ module OpenStax
|
|
18
18
|
id = Account.find_by(username: username).try!(:openstax_uid) ||
|
19
19
|
-SecureRandom.hex(4).to_i(16)/2
|
20
20
|
uuid = SecureRandom.uuid
|
21
|
+
support_identifier = "cs_#{SecureRandom.hex(4)}"
|
21
22
|
else
|
22
23
|
response = Api.find_or_create_account(
|
23
24
|
email: email, username: username, password: password,
|
@@ -30,6 +31,7 @@ module OpenStax
|
|
30
31
|
Api::V1::UnclaimedAccountRepresenter.new(struct).from_json(response.body)
|
31
32
|
id = struct.id
|
32
33
|
uuid = struct.uuid
|
34
|
+
support_identifier = struct.support_identifier
|
33
35
|
end
|
34
36
|
|
35
37
|
account = Account.find_or_initialize_by(openstax_uid: id)
|
@@ -47,6 +49,7 @@ module OpenStax
|
|
47
49
|
account.faculty_status = faculty_status || :no_faculty_info
|
48
50
|
account.role = role || :unknown_role
|
49
51
|
account.uuid = uuid
|
52
|
+
account.support_identifier = support_identifier
|
50
53
|
account.save!
|
51
54
|
end
|
52
55
|
|
@@ -7,8 +7,10 @@ module OpenStax
|
|
7
7
|
|
8
8
|
class SyncAccounts
|
9
9
|
|
10
|
-
SYNC_ATTRIBUTES = [
|
11
|
-
|
10
|
+
SYNC_ATTRIBUTES = [
|
11
|
+
'username', 'first_name', 'last_name', 'full_name', 'title', 'faculty_status',
|
12
|
+
'salesforce_contact_id', 'uuid', 'support_identifier', 'role'
|
13
|
+
]
|
12
14
|
|
13
15
|
lev_routine transaction: :no_transaction
|
14
16
|
|
@@ -29,9 +31,9 @@ module OpenStax
|
|
29
31
|
|
30
32
|
updated_app_accounts = []
|
31
33
|
app_accounts.each do |app_account|
|
32
|
-
account = OpenStax::Accounts::Account.
|
34
|
+
account = OpenStax::Accounts::Account.find_by(
|
33
35
|
openstax_uid: app_account.account.openstax_uid
|
34
|
-
)
|
36
|
+
) || app_account.account
|
35
37
|
account.syncing = true
|
36
38
|
|
37
39
|
if account != app_account.account
|
@@ -42,8 +44,9 @@ module OpenStax
|
|
42
44
|
|
43
45
|
next unless account.save
|
44
46
|
|
45
|
-
updated_app_accounts << {
|
46
|
-
|
47
|
+
updated_app_accounts << {
|
48
|
+
user_id: account.openstax_uid, read_updates: app_account.unread_updates
|
49
|
+
}
|
47
50
|
end
|
48
51
|
|
49
52
|
OpenStax::Accounts::Api.mark_account_updates_as_read(updated_app_accounts)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddSupportIdentifierToAccountsAccounts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
enable_extension :citext
|
4
|
+
|
5
|
+
add_column :openstax_accounts_accounts, :support_identifier, :citext
|
6
|
+
add_index :openstax_accounts_accounts, :support_identifier, unique: true
|
7
|
+
end
|
8
|
+
end
|
@@ -47,7 +47,7 @@ http_interactions:
|
|
47
47
|
body:
|
48
48
|
encoding: UTF-8
|
49
49
|
string: '{"access_token":"c31fe09157c9801c88356a972d0e0c95aa13081cea77ae45f098b5dc7f614642","token_type":"bearer","created_at":1497844427}'
|
50
|
-
http_version:
|
50
|
+
http_version:
|
51
51
|
recorded_at: Mon, 19 Jun 2017 03:53:47 GMT
|
52
52
|
- request:
|
53
53
|
method: post
|
@@ -97,8 +97,8 @@ http_interactions:
|
|
97
97
|
- thin
|
98
98
|
body:
|
99
99
|
encoding: UTF-8
|
100
|
-
string: '{"id":18,"uuid":"8c5c819f-d9d9-46e7-98b9-d737fc0f13fe"}'
|
101
|
-
http_version:
|
100
|
+
string: '{"id":18,"uuid":"8c5c819f-d9d9-46e7-98b9-d737fc0f13fe","support_identifier":"cs_6f3b305b"}'
|
101
|
+
http_version:
|
102
102
|
recorded_at: Mon, 19 Jun 2017 03:53:47 GMT
|
103
103
|
- request:
|
104
104
|
method: post
|
@@ -147,7 +147,7 @@ http_interactions:
|
|
147
147
|
body:
|
148
148
|
encoding: UTF-8
|
149
149
|
string: '{"access_token":"1c4df98e8f1b07b4dd33aa81150262c829999aaf0564721c423f01c263c2114f","token_type":"bearer","created_at":1497844427}'
|
150
|
-
http_version:
|
150
|
+
http_version:
|
151
151
|
recorded_at: Mon, 19 Jun 2017 03:53:47 GMT
|
152
152
|
- request:
|
153
153
|
method: post
|
@@ -197,8 +197,8 @@ http_interactions:
|
|
197
197
|
- thin
|
198
198
|
body:
|
199
199
|
encoding: UTF-8
|
200
|
-
string: '{"id":19,"uuid":"c1ebaa86-b8ef-4100-9213-a16ca741d47f"}'
|
201
|
-
http_version:
|
200
|
+
string: '{"id":19,"uuid":"c1ebaa86-b8ef-4100-9213-a16ca741d47f","support_identifier":"cs_edc0b069"}'
|
201
|
+
http_version:
|
202
202
|
recorded_at: Mon, 19 Jun 2017 03:53:47 GMT
|
203
203
|
- request:
|
204
204
|
method: post
|
@@ -247,7 +247,7 @@ http_interactions:
|
|
247
247
|
body:
|
248
248
|
encoding: UTF-8
|
249
249
|
string: '{"access_token":"21bb7c60df067e7354ec7e3b2e83d2d39831aece5938d20e8e68e6ea52ab59ff","token_type":"bearer","created_at":1497844427}'
|
250
|
-
http_version:
|
250
|
+
http_version:
|
251
251
|
recorded_at: Mon, 19 Jun 2017 03:53:47 GMT
|
252
252
|
- request:
|
253
253
|
method: post
|
@@ -297,7 +297,7 @@ http_interactions:
|
|
297
297
|
- thin
|
298
298
|
body:
|
299
299
|
encoding: UTF-8
|
300
|
-
string: '{"id":20,"uuid":"76c36a75-5b5a-4dbd-8800-5c1916c6f1f2"}'
|
301
|
-
http_version:
|
300
|
+
string: '{"id":20,"uuid":"76c36a75-5b5a-4dbd-8800-5c1916c6f1f2","support_identifier":"cs_bccb058a"}'
|
301
|
+
http_version:
|
302
302
|
recorded_at: Mon, 19 Jun 2017 03:53:48 GMT
|
303
303
|
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module OpenStax::Accounts
|
4
4
|
module Dev
|
5
|
-
describe AccountsController, type: :controller do
|
5
|
+
RSpec.describe AccountsController, type: :controller do
|
6
6
|
routes { Engine.routes }
|
7
7
|
|
8
8
|
let!(:account) { FactoryBot.create :openstax_accounts_account,
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -16,6 +16,7 @@ ActiveRecord::Schema.define(version: 1001) do
|
|
16
16
|
# These are extensions that must be enabled in order to support this database
|
17
17
|
enable_extension "plpgsql"
|
18
18
|
enable_extension "pgcrypto"
|
19
|
+
enable_extension "citext"
|
19
20
|
|
20
21
|
create_table "openstax_accounts_accounts", force: :cascade do |t|
|
21
22
|
t.integer "openstax_uid"
|
@@ -31,6 +32,7 @@ ActiveRecord::Schema.define(version: 1001) do
|
|
31
32
|
t.string "salesforce_contact_id"
|
32
33
|
t.uuid "uuid", default: "gen_random_uuid()", null: false
|
33
34
|
t.integer "role", default: 0, null: false
|
35
|
+
t.citext "support_identifier"
|
34
36
|
end
|
35
37
|
|
36
38
|
add_index "openstax_accounts_accounts", ["access_token"], name: "index_openstax_accounts_accounts_on_access_token", unique: true, using: :btree
|
@@ -41,6 +43,7 @@ ActiveRecord::Schema.define(version: 1001) do
|
|
41
43
|
add_index "openstax_accounts_accounts", ["openstax_uid"], name: "index_openstax_accounts_accounts_on_openstax_uid", unique: true, using: :btree
|
42
44
|
add_index "openstax_accounts_accounts", ["role"], name: "index_openstax_accounts_accounts_on_role", using: :btree
|
43
45
|
add_index "openstax_accounts_accounts", ["salesforce_contact_id"], name: "index_openstax_accounts_accounts_on_salesforce_contact_id", using: :btree
|
46
|
+
add_index "openstax_accounts_accounts", ["support_identifier"], name: "index_openstax_accounts_accounts_on_support_identifier", unique: true, using: :btree
|
44
47
|
add_index "openstax_accounts_accounts", ["username"], name: "index_openstax_accounts_accounts_on_username", unique: true, using: :btree
|
45
48
|
add_index "openstax_accounts_accounts", ["uuid"], name: "index_openstax_accounts_accounts_on_uuid", unique: true, using: :btree
|
46
49
|
|
@@ -3986,3 +3986,563 @@ WHERE c.contype = 'f'
|
|
3986
3986
|
ORDER BY c.conname
|
3987
3987
|
[0m
|
3988
3988
|
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3989
|
+
[1m[36m (27.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
3990
|
+
[1m[35m (13.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3991
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3992
|
+
Migrating to CreateOpenStaxAccountsAccounts (0)
|
3993
|
+
[1m[35m (0.2ms)[0m BEGIN
|
3994
|
+
[1m[36m (17.2ms)[0m [1mCREATE TABLE "openstax_accounts_accounts" ("id" serial primary key, "openstax_uid" integer NOT NULL, "username" character varying NOT NULL, "access_token" character varying, "first_name" character varying, "last_name" character varying, "full_name" character varying, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
3995
|
+
[1m[35m (5.9ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_openstax_uid" ON "openstax_accounts_accounts" ("openstax_uid")
|
3996
|
+
[1m[36m (1.1ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_username" ON "openstax_accounts_accounts" ("username")[0m
|
3997
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_access_token" ON "openstax_accounts_accounts" ("access_token")
|
3998
|
+
[1m[36m (1.3ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_first_name" ON "openstax_accounts_accounts" ("first_name")[0m
|
3999
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_last_name" ON "openstax_accounts_accounts" ("last_name")
|
4000
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_full_name" ON "openstax_accounts_accounts" ("full_name")[0m
|
4001
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "0"]]
|
4002
|
+
[1m[36m (0.6ms)[0m [1mCOMMIT[0m
|
4003
|
+
Migrating to CreateOpenStaxAccountsGroups (1)
|
4004
|
+
[1m[35m (0.3ms)[0m BEGIN
|
4005
|
+
[1m[36m (3.4ms)[0m [1mCREATE TABLE "openstax_accounts_groups" ("id" serial primary key, "openstax_uid" integer NOT NULL, "is_public" boolean DEFAULT 'f' NOT NULL, "name" character varying, "cached_subtree_group_ids" text, "cached_supertree_group_ids" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4006
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_groups_on_openstax_uid" ON "openstax_accounts_groups" ("openstax_uid")
|
4007
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_openstax_accounts_groups_on_is_public" ON "openstax_accounts_groups" ("is_public")[0m
|
4008
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "1"]]
|
4009
|
+
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
4010
|
+
Migrating to CreateOpenStaxAccountsGroupMembers (2)
|
4011
|
+
[1m[35m (0.3ms)[0m BEGIN
|
4012
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "openstax_accounts_group_members" ("id" serial primary key, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4013
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_members_on_group_id_and_user_id" ON "openstax_accounts_group_members" ("group_id", "user_id")
|
4014
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_members_on_user_id" ON "openstax_accounts_group_members" ("user_id")[0m
|
4015
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "2"]]
|
4016
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4017
|
+
Migrating to CreateOpenStaxAccountsGroupOwners (3)
|
4018
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4019
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "openstax_accounts_group_owners" ("id" serial primary key, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4020
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_owners_on_group_id_and_user_id" ON "openstax_accounts_group_owners" ("group_id", "user_id")
|
4021
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_owners_on_user_id" ON "openstax_accounts_group_owners" ("user_id")[0m
|
4022
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "3"]]
|
4023
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4024
|
+
Migrating to CreateOpenStaxAccountsGroupNestings (4)
|
4025
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4026
|
+
[1m[36m (1.5ms)[0m [1mCREATE TABLE "openstax_accounts_group_nestings" ("id" serial primary key, "member_group_id" integer NOT NULL, "container_group_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4027
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_nestings_on_member_group_id" ON "openstax_accounts_group_nestings" ("member_group_id")
|
4028
|
+
[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
|
4029
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "4"]]
|
4030
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4031
|
+
Migrating to AddFacultyStatusToAccountsAccounts (5)
|
4032
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4033
|
+
[1m[36m (6.7ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "faculty_status" integer DEFAULT 0 NOT NULL[0m
|
4034
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_faculty_status" ON "openstax_accounts_accounts" ("faculty_status")
|
4035
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "5"]]
|
4036
|
+
[1m[35m (1.6ms)[0m COMMIT
|
4037
|
+
Migrating to AddSalesforceContactIdToAccountsAccounts (6)
|
4038
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4039
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "salesforce_contact_id" character varying
|
4040
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_salesforce_contact_id" ON "openstax_accounts_accounts" ("salesforce_contact_id")[0m
|
4041
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "6"]]
|
4042
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4043
|
+
Migrating to ChangeAccountsOpenStaxUidToBeNullable (7)
|
4044
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4045
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "openstax_uid" DROP NOT NULL[0m
|
4046
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "7"]]
|
4047
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
4048
|
+
Migrating to ChangeAccountsUsernameToBeNullable (8)
|
4049
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4050
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "username" DROP NOT NULL[0m
|
4051
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "8"]]
|
4052
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4053
|
+
Migrating to AddUuidAndRoleToAccountsAccounts (9)
|
4054
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4055
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "uuid" character varying[0m
|
4056
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_uuid" ON "openstax_accounts_accounts" ("uuid")
|
4057
|
+
[1m[36m (8.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "role" integer DEFAULT 0 NOT NULL[0m
|
4058
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_role" ON "openstax_accounts_accounts" ("role")
|
4059
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "9"]]
|
4060
|
+
[1m[35m (1.7ms)[0m COMMIT
|
4061
|
+
Migrating to AssignMissingUuidsForLocalAccounts (10)
|
4062
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4063
|
+
[1m[35mSQL (14.5ms)[0m CREATE EXTENSION IF NOT EXISTS "pgcrypto"
|
4064
|
+
[1m[36mSQL (0.7ms)[0m [1mUPDATE "openstax_accounts_accounts" SET "uuid" = gen_random_uuid() WHERE "openstax_accounts_accounts"."uuid" IS NULL[0m
|
4065
|
+
[1m[35m (28.4ms)[0m ALTER TABLE "openstax_accounts_accounts" ALTER COLUMN "uuid" TYPE uuid USING uuid::uuid
|
4066
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER COLUMN "uuid" SET DEFAULT gen_random_uuid()[0m
|
4067
|
+
[1m[35m (0.6ms)[0m UPDATE "openstax_accounts_accounts" SET "uuid"=gen_random_uuid() WHERE "uuid" IS NULL
|
4068
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "uuid" SET NOT NULL[0m
|
4069
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "10"]]
|
4070
|
+
[1m[36m (2.5ms)[0m [1mCOMMIT[0m
|
4071
|
+
Migrating to AddSupportIdentifierToAccountsAccounts (11)
|
4072
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4073
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "support_identifier" character varying[0m
|
4074
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_support_identifier" ON "openstax_accounts_accounts" ("support_identifier")
|
4075
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "11"]]
|
4076
|
+
[1m[35m (0.3ms)[0m COMMIT
|
4077
|
+
Migrating to CreateUsers (1000)
|
4078
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4079
|
+
[1m[35m (1.5ms)[0m CREATE TABLE "users" ("id" serial primary key, "account_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
4080
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_users_on_account_id" ON "users" ("account_id")[0m
|
4081
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "1000"]]
|
4082
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4083
|
+
Migrating to CreateOwnerships (1001)
|
4084
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4085
|
+
[1m[36m (2.3ms)[0m [1mCREATE TABLE "ownerships" ("id" serial primary key, "owner_id" integer NOT NULL, "owner_type" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4086
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_ownerships_on_owner_id_and_owner_type" ON "ownerships" ("owner_id", "owner_type")
|
4087
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "1001"]]
|
4088
|
+
[1m[35m (0.5ms)[0m COMMIT
|
4089
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4090
|
+
[1m[35m (1.9ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4091
|
+
FROM pg_constraint c
|
4092
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4093
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4094
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4095
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4096
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4097
|
+
WHERE c.contype = 'f'
|
4098
|
+
AND t1.relname = 'openstax_accounts_accounts'
|
4099
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4100
|
+
ORDER BY c.conname
|
4101
|
+
|
4102
|
+
[1m[36m (1.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4103
|
+
FROM pg_constraint c
|
4104
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4105
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4106
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4107
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4108
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4109
|
+
WHERE c.contype = 'f'
|
4110
|
+
AND t1.relname = 'openstax_accounts_group_members'
|
4111
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4112
|
+
ORDER BY c.conname
|
4113
|
+
[0m
|
4114
|
+
[1m[35m (1.9ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4115
|
+
FROM pg_constraint c
|
4116
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4117
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4118
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4119
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4120
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4121
|
+
WHERE c.contype = 'f'
|
4122
|
+
AND t1.relname = 'openstax_accounts_group_nestings'
|
4123
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4124
|
+
ORDER BY c.conname
|
4125
|
+
|
4126
|
+
[1m[36m (2.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4127
|
+
FROM pg_constraint c
|
4128
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4129
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4130
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4131
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4132
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4133
|
+
WHERE c.contype = 'f'
|
4134
|
+
AND t1.relname = 'openstax_accounts_group_owners'
|
4135
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4136
|
+
ORDER BY c.conname
|
4137
|
+
[0m
|
4138
|
+
[1m[35m (2.1ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4139
|
+
FROM pg_constraint c
|
4140
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4141
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4142
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4143
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4144
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4145
|
+
WHERE c.contype = 'f'
|
4146
|
+
AND t1.relname = 'openstax_accounts_groups'
|
4147
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4148
|
+
ORDER BY c.conname
|
4149
|
+
|
4150
|
+
[1m[36m (2.0ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4151
|
+
FROM pg_constraint c
|
4152
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4153
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4154
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4155
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4156
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4157
|
+
WHERE c.contype = 'f'
|
4158
|
+
AND t1.relname = 'ownerships'
|
4159
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4160
|
+
ORDER BY c.conname
|
4161
|
+
[0m
|
4162
|
+
[1m[35m (1.8ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4163
|
+
FROM pg_constraint c
|
4164
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4165
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4166
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4167
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4168
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4169
|
+
WHERE c.contype = 'f'
|
4170
|
+
AND t1.relname = 'users'
|
4171
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4172
|
+
ORDER BY c.conname
|
4173
|
+
|
4174
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4175
|
+
[1m[36m (3.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
4176
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
4177
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4178
|
+
Migrating to CreateOpenStaxAccountsAccounts (0)
|
4179
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4180
|
+
[1m[36m (3.6ms)[0m [1mCREATE TABLE "openstax_accounts_accounts" ("id" serial primary key, "openstax_uid" integer NOT NULL, "username" character varying NOT NULL, "access_token" character varying, "first_name" character varying, "last_name" character varying, "full_name" character varying, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4181
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_openstax_uid" ON "openstax_accounts_accounts" ("openstax_uid")
|
4182
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_username" ON "openstax_accounts_accounts" ("username")[0m
|
4183
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_access_token" ON "openstax_accounts_accounts" ("access_token")
|
4184
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_first_name" ON "openstax_accounts_accounts" ("first_name")[0m
|
4185
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_last_name" ON "openstax_accounts_accounts" ("last_name")
|
4186
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_full_name" ON "openstax_accounts_accounts" ("full_name")[0m
|
4187
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "0"]]
|
4188
|
+
[1m[36m (0.6ms)[0m [1mCOMMIT[0m
|
4189
|
+
Migrating to CreateOpenStaxAccountsGroups (1)
|
4190
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4191
|
+
[1m[36m (2.7ms)[0m [1mCREATE TABLE "openstax_accounts_groups" ("id" serial primary key, "openstax_uid" integer NOT NULL, "is_public" boolean DEFAULT 'f' NOT NULL, "name" character varying, "cached_subtree_group_ids" text, "cached_supertree_group_ids" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4192
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_groups_on_openstax_uid" ON "openstax_accounts_groups" ("openstax_uid")
|
4193
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_groups_on_is_public" ON "openstax_accounts_groups" ("is_public")[0m
|
4194
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "1"]]
|
4195
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4196
|
+
Migrating to CreateOpenStaxAccountsGroupMembers (2)
|
4197
|
+
[1m[35m (0.3ms)[0m BEGIN
|
4198
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "openstax_accounts_group_members" ("id" serial primary key, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4199
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_members_on_group_id_and_user_id" ON "openstax_accounts_group_members" ("group_id", "user_id")
|
4200
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_members_on_user_id" ON "openstax_accounts_group_members" ("user_id")[0m
|
4201
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "2"]]
|
4202
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
4203
|
+
Migrating to CreateOpenStaxAccountsGroupOwners (3)
|
4204
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4205
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "openstax_accounts_group_owners" ("id" serial primary key, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4206
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_owners_on_group_id_and_user_id" ON "openstax_accounts_group_owners" ("group_id", "user_id")
|
4207
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_owners_on_user_id" ON "openstax_accounts_group_owners" ("user_id")[0m
|
4208
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "3"]]
|
4209
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4210
|
+
Migrating to CreateOpenStaxAccountsGroupNestings (4)
|
4211
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4212
|
+
[1m[36m (1.5ms)[0m [1mCREATE TABLE "openstax_accounts_group_nestings" ("id" serial primary key, "member_group_id" integer NOT NULL, "container_group_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4213
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_nestings_on_member_group_id" ON "openstax_accounts_group_nestings" ("member_group_id")
|
4214
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_nestings_on_container_group_id" ON "openstax_accounts_group_nestings" ("container_group_id")[0m
|
4215
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "4"]]
|
4216
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4217
|
+
Migrating to AddFacultyStatusToAccountsAccounts (5)
|
4218
|
+
[1m[35m (0.3ms)[0m BEGIN
|
4219
|
+
[1m[36m (5.7ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "faculty_status" integer DEFAULT 0 NOT NULL[0m
|
4220
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_faculty_status" ON "openstax_accounts_accounts" ("faculty_status")
|
4221
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "5"]]
|
4222
|
+
[1m[35m (1.6ms)[0m COMMIT
|
4223
|
+
Migrating to AddSalesforceContactIdToAccountsAccounts (6)
|
4224
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4225
|
+
[1m[35m (0.3ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "salesforce_contact_id" character varying
|
4226
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_salesforce_contact_id" ON "openstax_accounts_accounts" ("salesforce_contact_id")[0m
|
4227
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "6"]]
|
4228
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
4229
|
+
Migrating to ChangeAccountsOpenStaxUidToBeNullable (7)
|
4230
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4231
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "openstax_uid" DROP NOT NULL[0m
|
4232
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "7"]]
|
4233
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
4234
|
+
Migrating to ChangeAccountsUsernameToBeNullable (8)
|
4235
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4236
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "username" DROP NOT NULL[0m
|
4237
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "8"]]
|
4238
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
4239
|
+
Migrating to AddUuidAndRoleToAccountsAccounts (9)
|
4240
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4241
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "uuid" character varying[0m
|
4242
|
+
[1m[35m (0.6ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_uuid" ON "openstax_accounts_accounts" ("uuid")
|
4243
|
+
[1m[36m (6.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "role" integer DEFAULT 0 NOT NULL[0m
|
4244
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_role" ON "openstax_accounts_accounts" ("role")
|
4245
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "9"]]
|
4246
|
+
[1m[35m (1.8ms)[0m COMMIT
|
4247
|
+
Migrating to AssignMissingUuidsForLocalAccounts (10)
|
4248
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4249
|
+
[1m[35mSQL (5.0ms)[0m CREATE EXTENSION IF NOT EXISTS "pgcrypto"
|
4250
|
+
[1m[36mSQL (0.7ms)[0m [1mUPDATE "openstax_accounts_accounts" SET "uuid" = gen_random_uuid() WHERE "openstax_accounts_accounts"."uuid" IS NULL[0m
|
4251
|
+
[1m[35m (8.2ms)[0m ALTER TABLE "openstax_accounts_accounts" ALTER COLUMN "uuid" TYPE uuid USING uuid::uuid
|
4252
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER COLUMN "uuid" SET DEFAULT gen_random_uuid()[0m
|
4253
|
+
[1m[35m (0.7ms)[0m UPDATE "openstax_accounts_accounts" SET "uuid"=gen_random_uuid() WHERE "uuid" IS NULL
|
4254
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "uuid" SET NOT NULL[0m
|
4255
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "10"]]
|
4256
|
+
[1m[36m (2.3ms)[0m [1mCOMMIT[0m
|
4257
|
+
Migrating to AddSupportIdentifierToAccountsAccounts (11)
|
4258
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4259
|
+
[1m[36mSQL (14.5ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "citext"[0m
|
4260
|
+
[1m[35m (0.4ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "support_identifier" citext
|
4261
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_support_identifier" ON "openstax_accounts_accounts" ("support_identifier")[0m
|
4262
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "11"]]
|
4263
|
+
[1m[36m (0.9ms)[0m [1mCOMMIT[0m
|
4264
|
+
Migrating to CreateUsers (1000)
|
4265
|
+
[1m[35m (0.1ms)[0m BEGIN
|
4266
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "account_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4267
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "index_users_on_account_id" ON "users" ("account_id")
|
4268
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "1000"]]
|
4269
|
+
[1m[35m (0.4ms)[0m COMMIT
|
4270
|
+
Migrating to CreateOwnerships (1001)
|
4271
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
4272
|
+
[1m[35m (2.4ms)[0m CREATE TABLE "ownerships" ("id" serial primary key, "owner_id" integer NOT NULL, "owner_type" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
4273
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_ownerships_on_owner_id_and_owner_type" ON "ownerships" ("owner_id", "owner_type")[0m
|
4274
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "1001"]]
|
4275
|
+
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
4276
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
4277
|
+
[1m[36m (1.9ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4278
|
+
FROM pg_constraint c
|
4279
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4280
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4281
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4282
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4283
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4284
|
+
WHERE c.contype = 'f'
|
4285
|
+
AND t1.relname = 'openstax_accounts_accounts'
|
4286
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4287
|
+
ORDER BY c.conname
|
4288
|
+
[0m
|
4289
|
+
[1m[35m (1.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4290
|
+
FROM pg_constraint c
|
4291
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4292
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4293
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4294
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4295
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4296
|
+
WHERE c.contype = 'f'
|
4297
|
+
AND t1.relname = 'openstax_accounts_group_members'
|
4298
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4299
|
+
ORDER BY c.conname
|
4300
|
+
|
4301
|
+
[1m[36m (1.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4302
|
+
FROM pg_constraint c
|
4303
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4304
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4305
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4306
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4307
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4308
|
+
WHERE c.contype = 'f'
|
4309
|
+
AND t1.relname = 'openstax_accounts_group_nestings'
|
4310
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4311
|
+
ORDER BY c.conname
|
4312
|
+
[0m
|
4313
|
+
[1m[35m (1.6ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4314
|
+
FROM pg_constraint c
|
4315
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4316
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4317
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4318
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4319
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4320
|
+
WHERE c.contype = 'f'
|
4321
|
+
AND t1.relname = 'openstax_accounts_group_owners'
|
4322
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4323
|
+
ORDER BY c.conname
|
4324
|
+
|
4325
|
+
[1m[36m (1.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4326
|
+
FROM pg_constraint c
|
4327
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4328
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4329
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4330
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4331
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4332
|
+
WHERE c.contype = 'f'
|
4333
|
+
AND t1.relname = 'openstax_accounts_groups'
|
4334
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4335
|
+
ORDER BY c.conname
|
4336
|
+
[0m
|
4337
|
+
[1m[35m (1.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4338
|
+
FROM pg_constraint c
|
4339
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4340
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4341
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4342
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4343
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4344
|
+
WHERE c.contype = 'f'
|
4345
|
+
AND t1.relname = 'ownerships'
|
4346
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4347
|
+
ORDER BY c.conname
|
4348
|
+
|
4349
|
+
[1m[36m (1.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4350
|
+
FROM pg_constraint c
|
4351
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4352
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4353
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4354
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4355
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4356
|
+
WHERE c.contype = 'f'
|
4357
|
+
AND t1.relname = 'users'
|
4358
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4359
|
+
ORDER BY c.conname
|
4360
|
+
[0m
|
4361
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
4362
|
+
[1m[36m (26.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
4363
|
+
[1m[35m (1.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
4364
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4365
|
+
Migrating to CreateOpenStaxAccountsAccounts (0)
|
4366
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4367
|
+
[1m[36m (16.4ms)[0m [1mCREATE TABLE "openstax_accounts_accounts" ("id" serial primary key, "openstax_uid" integer NOT NULL, "username" character varying NOT NULL, "access_token" character varying, "first_name" character varying, "last_name" character varying, "full_name" character varying, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4368
|
+
[1m[35m (8.9ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_openstax_uid" ON "openstax_accounts_accounts" ("openstax_uid")
|
4369
|
+
[1m[36m (1.1ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_username" ON "openstax_accounts_accounts" ("username")[0m
|
4370
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_access_token" ON "openstax_accounts_accounts" ("access_token")
|
4371
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_first_name" ON "openstax_accounts_accounts" ("first_name")[0m
|
4372
|
+
[1m[35m (1.4ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_last_name" ON "openstax_accounts_accounts" ("last_name")
|
4373
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_full_name" ON "openstax_accounts_accounts" ("full_name")[0m
|
4374
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "0"]]
|
4375
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4376
|
+
Migrating to CreateOpenStaxAccountsGroups (1)
|
4377
|
+
[1m[35m (5.5ms)[0m BEGIN
|
4378
|
+
[1m[36m (15.6ms)[0m [1mCREATE TABLE "openstax_accounts_groups" ("id" serial primary key, "openstax_uid" integer NOT NULL, "is_public" boolean DEFAULT 'f' NOT NULL, "name" character varying, "cached_subtree_group_ids" text, "cached_supertree_group_ids" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4379
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_groups_on_openstax_uid" ON "openstax_accounts_groups" ("openstax_uid")
|
4380
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_groups_on_is_public" ON "openstax_accounts_groups" ("is_public")[0m
|
4381
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "1"]]
|
4382
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
4383
|
+
Migrating to CreateOpenStaxAccountsGroupMembers (2)
|
4384
|
+
[1m[35m (6.2ms)[0m BEGIN
|
4385
|
+
[1m[36m (9.0ms)[0m [1mCREATE TABLE "openstax_accounts_group_members" ("id" serial primary key, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4386
|
+
[1m[35m (7.3ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_members_on_group_id_and_user_id" ON "openstax_accounts_group_members" ("group_id", "user_id")
|
4387
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_members_on_user_id" ON "openstax_accounts_group_members" ("user_id")[0m
|
4388
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "2"]]
|
4389
|
+
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
4390
|
+
Migrating to CreateOpenStaxAccountsGroupOwners (3)
|
4391
|
+
[1m[35m (6.4ms)[0m BEGIN
|
4392
|
+
[1m[36m (8.2ms)[0m [1mCREATE TABLE "openstax_accounts_group_owners" ("id" serial primary key, "group_id" integer NOT NULL, "user_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4393
|
+
[1m[35m (7.0ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_owners_on_group_id_and_user_id" ON "openstax_accounts_group_owners" ("group_id", "user_id")
|
4394
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_owners_on_user_id" ON "openstax_accounts_group_owners" ("user_id")[0m
|
4395
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "3"]]
|
4396
|
+
[1m[36m (0.6ms)[0m [1mCOMMIT[0m
|
4397
|
+
Migrating to CreateOpenStaxAccountsGroupNestings (4)
|
4398
|
+
[1m[35m (6.0ms)[0m BEGIN
|
4399
|
+
[1m[36m (7.8ms)[0m [1mCREATE TABLE "openstax_accounts_group_nestings" ("id" serial primary key, "member_group_id" integer NOT NULL, "container_group_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4400
|
+
[1m[35m (6.1ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_group_nestings_on_member_group_id" ON "openstax_accounts_group_nestings" ("member_group_id")
|
4401
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_openstax_accounts_group_nestings_on_container_group_id" ON "openstax_accounts_group_nestings" ("container_group_id")[0m
|
4402
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "4"]]
|
4403
|
+
[1m[36m (0.7ms)[0m [1mCOMMIT[0m
|
4404
|
+
Migrating to AddFacultyStatusToAccountsAccounts (5)
|
4405
|
+
[1m[35m (5.5ms)[0m BEGIN
|
4406
|
+
[1m[36m (26.5ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "faculty_status" integer DEFAULT 0 NOT NULL[0m
|
4407
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_faculty_status" ON "openstax_accounts_accounts" ("faculty_status")
|
4408
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "5"]]
|
4409
|
+
[1m[35m (1.8ms)[0m COMMIT
|
4410
|
+
Migrating to AddSalesforceContactIdToAccountsAccounts (6)
|
4411
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4412
|
+
[1m[35m (0.3ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "salesforce_contact_id" character varying
|
4413
|
+
[1m[36m (6.6ms)[0m [1mCREATE INDEX "index_openstax_accounts_accounts_on_salesforce_contact_id" ON "openstax_accounts_accounts" ("salesforce_contact_id")[0m
|
4414
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "6"]]
|
4415
|
+
[1m[36m (6.3ms)[0m [1mCOMMIT[0m
|
4416
|
+
Migrating to ChangeAccountsOpenStaxUidToBeNullable (7)
|
4417
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4418
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "openstax_uid" DROP NOT NULL[0m
|
4419
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "7"]]
|
4420
|
+
[1m[36m (6.3ms)[0m [1mCOMMIT[0m
|
4421
|
+
Migrating to ChangeAccountsUsernameToBeNullable (8)
|
4422
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4423
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "username" DROP NOT NULL[0m
|
4424
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "8"]]
|
4425
|
+
[1m[36m (6.4ms)[0m [1mCOMMIT[0m
|
4426
|
+
Migrating to AddUuidAndRoleToAccountsAccounts (9)
|
4427
|
+
[1m[35m (0.4ms)[0m BEGIN
|
4428
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "uuid" character varying[0m
|
4429
|
+
[1m[35m (7.2ms)[0m CREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_uuid" ON "openstax_accounts_accounts" ("uuid")
|
4430
|
+
[1m[36m (22.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ADD "role" integer DEFAULT 0 NOT NULL[0m
|
4431
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_openstax_accounts_accounts_on_role" ON "openstax_accounts_accounts" ("role")
|
4432
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "9"]]
|
4433
|
+
[1m[35m (2.0ms)[0m COMMIT
|
4434
|
+
Migrating to AssignMissingUuidsForLocalAccounts (10)
|
4435
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
4436
|
+
[1m[35mSQL (38.7ms)[0m CREATE EXTENSION IF NOT EXISTS "pgcrypto"
|
4437
|
+
[1m[36mSQL (1.2ms)[0m [1mUPDATE "openstax_accounts_accounts" SET "uuid" = gen_random_uuid() WHERE "openstax_accounts_accounts"."uuid" IS NULL[0m
|
4438
|
+
[1m[35m (28.8ms)[0m ALTER TABLE "openstax_accounts_accounts" ALTER COLUMN "uuid" TYPE uuid USING uuid::uuid
|
4439
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER COLUMN "uuid" SET DEFAULT gen_random_uuid()[0m
|
4440
|
+
[1m[35m (0.5ms)[0m UPDATE "openstax_accounts_accounts" SET "uuid"=gen_random_uuid() WHERE "uuid" IS NULL
|
4441
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "openstax_accounts_accounts" ALTER "uuid" SET NOT NULL[0m
|
4442
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "10"]]
|
4443
|
+
[1m[36m (3.2ms)[0m [1mCOMMIT[0m
|
4444
|
+
Migrating to AddSupportIdentifierToAccountsAccounts (11)
|
4445
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4446
|
+
[1m[36mSQL (14.7ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "citext"[0m
|
4447
|
+
[1m[35m (0.3ms)[0m ALTER TABLE "openstax_accounts_accounts" ADD "support_identifier" citext
|
4448
|
+
[1m[36m (1.5ms)[0m [1mCREATE UNIQUE INDEX "index_openstax_accounts_accounts_on_support_identifier" ON "openstax_accounts_accounts" ("support_identifier")[0m
|
4449
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "11"]]
|
4450
|
+
[1m[36m (1.1ms)[0m [1mCOMMIT[0m
|
4451
|
+
Migrating to CreateUsers (1000)
|
4452
|
+
[1m[35m (0.2ms)[0m BEGIN
|
4453
|
+
[1m[36m (7.5ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "account_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
4454
|
+
[1m[35m (6.8ms)[0m CREATE UNIQUE INDEX "index_users_on_account_id" ON "users" ("account_id")
|
4455
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "1000"]]
|
4456
|
+
[1m[35m (6.0ms)[0m COMMIT
|
4457
|
+
Migrating to CreateOwnerships (1001)
|
4458
|
+
[1m[36m (6.3ms)[0m [1mBEGIN[0m
|
4459
|
+
[1m[35m (15.5ms)[0m CREATE TABLE "ownerships" ("id" serial primary key, "owner_id" integer NOT NULL, "owner_type" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
4460
|
+
[1m[36m (1.1ms)[0m [1mCREATE UNIQUE INDEX "index_ownerships_on_owner_id_and_owner_type" ON "ownerships" ("owner_id", "owner_type")[0m
|
4461
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "1001"]]
|
4462
|
+
[1m[36m (0.6ms)[0m [1mCOMMIT[0m
|
4463
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
4464
|
+
[1m[36m (1.9ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4465
|
+
FROM pg_constraint c
|
4466
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4467
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4468
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4469
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4470
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4471
|
+
WHERE c.contype = 'f'
|
4472
|
+
AND t1.relname = 'openstax_accounts_accounts'
|
4473
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4474
|
+
ORDER BY c.conname
|
4475
|
+
[0m
|
4476
|
+
[1m[35m (1.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4477
|
+
FROM pg_constraint c
|
4478
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4479
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4480
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4481
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4482
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4483
|
+
WHERE c.contype = 'f'
|
4484
|
+
AND t1.relname = 'openstax_accounts_group_members'
|
4485
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4486
|
+
ORDER BY c.conname
|
4487
|
+
|
4488
|
+
[1m[36m (1.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4489
|
+
FROM pg_constraint c
|
4490
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4491
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4492
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4493
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4494
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4495
|
+
WHERE c.contype = 'f'
|
4496
|
+
AND t1.relname = 'openstax_accounts_group_nestings'
|
4497
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4498
|
+
ORDER BY c.conname
|
4499
|
+
[0m
|
4500
|
+
[1m[35m (1.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4501
|
+
FROM pg_constraint c
|
4502
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4503
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4504
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4505
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4506
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4507
|
+
WHERE c.contype = 'f'
|
4508
|
+
AND t1.relname = 'openstax_accounts_group_owners'
|
4509
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4510
|
+
ORDER BY c.conname
|
4511
|
+
|
4512
|
+
[1m[36m (1.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4513
|
+
FROM pg_constraint c
|
4514
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4515
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4516
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4517
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4518
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4519
|
+
WHERE c.contype = 'f'
|
4520
|
+
AND t1.relname = 'openstax_accounts_groups'
|
4521
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4522
|
+
ORDER BY c.conname
|
4523
|
+
[0m
|
4524
|
+
[1m[35m (1.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4525
|
+
FROM pg_constraint c
|
4526
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4527
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4528
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4529
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4530
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4531
|
+
WHERE c.contype = 'f'
|
4532
|
+
AND t1.relname = 'ownerships'
|
4533
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4534
|
+
ORDER BY c.conname
|
4535
|
+
|
4536
|
+
[1m[36m (1.7ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
4537
|
+
FROM pg_constraint c
|
4538
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
4539
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
4540
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
4541
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
4542
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
4543
|
+
WHERE c.contype = 'f'
|
4544
|
+
AND t1.relname = 'users'
|
4545
|
+
AND t3.nspname = ANY (current_schemas(false))
|
4546
|
+
ORDER BY c.conname
|
4547
|
+
[0m
|
4548
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|