active_record_doctor 1.5.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +152 -12
- data/lib/active_record_doctor.rb +20 -2
- data/lib/active_record_doctor/detectors.rb +13 -0
- data/lib/active_record_doctor/detectors/base.rb +64 -0
- data/lib/active_record_doctor/{tasks → detectors}/extraneous_indexes.rb +12 -29
- data/lib/active_record_doctor/detectors/incorrect_boolean_presence_validation.rb +40 -0
- data/lib/active_record_doctor/detectors/incorrect_dependent_option.rb +71 -0
- data/lib/active_record_doctor/{tasks → detectors}/missing_foreign_keys.rb +17 -35
- data/lib/active_record_doctor/detectors/missing_non_null_constraint.rb +60 -0
- data/lib/active_record_doctor/detectors/missing_presence_validation.rb +78 -0
- data/lib/active_record_doctor/detectors/missing_unique_indexes.rb +61 -0
- data/lib/active_record_doctor/detectors/undefined_table_references.rb +34 -0
- data/lib/active_record_doctor/detectors/unindexed_deleted_at.rb +29 -0
- data/lib/active_record_doctor/detectors/unindexed_foreign_keys.rb +48 -0
- data/lib/active_record_doctor/printers.rb +3 -1
- data/lib/active_record_doctor/printers/io_printer.rb +101 -26
- data/lib/active_record_doctor/railtie.rb +3 -1
- data/lib/active_record_doctor/task.rb +28 -0
- data/lib/active_record_doctor/version.rb +3 -1
- data/lib/generators/active_record_doctor/add_indexes/add_indexes_generator.rb +15 -11
- data/lib/tasks/active_record_doctor.rake +33 -0
- data/test/active_record_doctor/detectors/extraneous_indexes_test.rb +67 -0
- data/test/active_record_doctor/detectors/incorrect_boolean_presence_validation_test.rb +36 -0
- data/test/active_record_doctor/detectors/incorrect_dependent_option_test.rb +117 -0
- data/test/active_record_doctor/detectors/missing_foreign_keys_test.rb +24 -0
- data/test/active_record_doctor/detectors/missing_non_null_constraint_test.rb +102 -0
- data/test/active_record_doctor/detectors/missing_presence_validation_test.rb +107 -0
- data/test/active_record_doctor/detectors/missing_unique_indexes_test.rb +114 -0
- data/test/active_record_doctor/detectors/undefined_table_references_test.rb +44 -0
- data/test/active_record_doctor/detectors/unindexed_deleted_at_test.rb +67 -0
- data/test/active_record_doctor/detectors/unindexed_foreign_keys_test.rb +26 -0
- data/test/active_record_doctor/printers/io_printer_test.rb +23 -10
- data/test/model_factory.rb +78 -0
- data/test/setup.rb +126 -0
- metadata +93 -149
- data/Rakefile +0 -28
- data/lib/active_record_doctor/compatibility.rb +0 -11
- data/lib/active_record_doctor/tasks.rb +0 -4
- data/lib/active_record_doctor/tasks/undefined_table_references.rb +0 -34
- data/lib/active_record_doctor/tasks/unindexed_deleted_at.rb +0 -40
- data/lib/active_record_doctor/tasks/unindexed_foreign_keys.rb +0 -66
- data/lib/tasks/active_record_doctor_tasks.rake +0 -27
- data/test/active_record_doctor/tasks/extraneous_indexes_test.rb +0 -27
- data/test/active_record_doctor/tasks/missing_foreign_keys_test.rb +0 -19
- data/test/active_record_doctor/tasks/undefined_table_references_test.rb +0 -19
- data/test/active_record_doctor/tasks/unindexed_deleted_at_test.rb +0 -19
- data/test/active_record_doctor/tasks/unindexed_foreign_keys_test.rb +0 -19
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/models/application_record.rb +0 -3
- data/test/dummy/app/models/comment.rb +0 -3
- data/test/dummy/app/models/contract.rb +0 -3
- data/test/dummy/app/models/employer.rb +0 -2
- data/test/dummy/app/models/profile.rb +0 -2
- data/test/dummy/app/models/user.rb +0 -3
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -23
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -19
- data/test/dummy/config/database.yml.travis +0 -5
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -41
- data/test/dummy/config/environments/production.rb +0 -79
- data/test/dummy/config/environments/test.rb +0 -47
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -56
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/db/migrate/20160213101213_create_employers.rb +0 -15
- data/test/dummy/db/migrate/20160213101221_create_users.rb +0 -23
- data/test/dummy/db/migrate/20160213101232_create_profiles.rb +0 -15
- data/test/dummy/db/migrate/20160604081452_create_comments.rb +0 -11
- data/test/dummy/db/migrate/base_migration.rb +0 -5
- data/test/dummy/db/schema.rb +0 -68
- data/test/dummy/log/development.log +0 -532
- data/test/dummy/log/test.log +0 -2699
- data/test/dummy/public/404.html +0 -67
- data/test/dummy/public/422.html +0 -67
- data/test/dummy/public/500.html +0 -66
- data/test/dummy/public/favicon.ico +0 -0
- data/test/support/spy_printer.rb +0 -52
- data/test/test_helper.rb +0 -20
@@ -1,22 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
development:
|
14
|
-
secret_key_base: fc56218af9682e85721022fdc87d5c86741c69594bfef352fd91f60e03f08b41ea4925b31631f9660c7a2e55bb2fa5ad23ce4f44a11e6c3d3c9bf9fbc9d239d7
|
15
|
-
|
16
|
-
test:
|
17
|
-
secret_key_base: 902b4f59d94fd28bf86e21b14651a1f420900d6bc2339329fa4d448d193eafe4925586b7759889e31a60fb2d21462dc35ecd0b153f44fa5cca58e3dfd08f28d6
|
18
|
-
|
19
|
-
# Do not keep production secrets in the repository,
|
20
|
-
# instead read values from the environment.
|
21
|
-
production:
|
22
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative 'base_migration'
|
2
|
-
|
3
|
-
class CreateEmployers < BaseMigration
|
4
|
-
def change
|
5
|
-
create_table :employers do |t|
|
6
|
-
t.string :name
|
7
|
-
t.datetime :deleted_at
|
8
|
-
|
9
|
-
t.timestamps null: false
|
10
|
-
end
|
11
|
-
|
12
|
-
add_index :employers, :id, where: 'deleted_at IS NULL'
|
13
|
-
add_index :employers, :name, where: 'deleted_at IS NULL'
|
14
|
-
end
|
15
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require_relative 'base_migration'
|
2
|
-
|
3
|
-
class CreateUsers < BaseMigration
|
4
|
-
def change
|
5
|
-
create_table :users do |t|
|
6
|
-
t.string :email
|
7
|
-
t.string :first_name
|
8
|
-
t.string :last_name
|
9
|
-
t.references :profile, foreign_key: false
|
10
|
-
t.references :employer, foreign_key: true
|
11
|
-
t.string :country_code, null: false
|
12
|
-
|
13
|
-
t.timestamps null: false
|
14
|
-
end
|
15
|
-
add_index :users, [:last_name, :first_name, :email]
|
16
|
-
add_index :users, [:last_name, :first_name]
|
17
|
-
add_index :users, [:last_name, :first_name], unique: true, name: :unique_index_on_users_last_name_and_first_name
|
18
|
-
add_index :users, :last_name
|
19
|
-
add_index :users, :email
|
20
|
-
add_index :users, :email, unique: true, name: :unique_index_on_users_email
|
21
|
-
add_index :users, [:employer_id, :country_code]
|
22
|
-
end
|
23
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative 'base_migration'
|
2
|
-
|
3
|
-
class CreateProfiles < BaseMigration
|
4
|
-
def change
|
5
|
-
create_table :profiles do |t|
|
6
|
-
t.string :first_name
|
7
|
-
t.string :last_name
|
8
|
-
t.datetime :deleted_at
|
9
|
-
|
10
|
-
t.timestamps null: false
|
11
|
-
end
|
12
|
-
|
13
|
-
add_index :profiles, [:first_name, :last_name]
|
14
|
-
end
|
15
|
-
end
|
data/test/dummy/db/schema.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# This file is auto-generated from the current state of the database. Instead
|
3
|
-
# of editing this file, please use the migrations feature of Active Record to
|
4
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
-
#
|
6
|
-
# Note that this schema.rb definition is the authoritative source for your
|
7
|
-
# database schema. If you need to create the application database on another
|
8
|
-
# system, you should be using db:schema:load, not running all the migrations
|
9
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
-
#
|
12
|
-
# It's strongly recommended that you check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(version: 20160604081452) do
|
15
|
-
|
16
|
-
# These are extensions that must be enabled in order to support this database
|
17
|
-
enable_extension "plpgsql"
|
18
|
-
|
19
|
-
create_table "comments", force: :cascade do |t|
|
20
|
-
t.integer "commentable_id"
|
21
|
-
t.string "commentable_type"
|
22
|
-
t.datetime "created_at", null: false
|
23
|
-
t.datetime "updated_at", null: false
|
24
|
-
end
|
25
|
-
|
26
|
-
add_index "comments", ["commentable_type", "commentable_id"], name: "index_comments_on_commentable_type_and_commentable_id", using: :btree
|
27
|
-
|
28
|
-
create_table "employers", force: :cascade do |t|
|
29
|
-
t.string "name"
|
30
|
-
t.datetime "deleted_at"
|
31
|
-
t.datetime "created_at", null: false
|
32
|
-
t.datetime "updated_at", null: false
|
33
|
-
end
|
34
|
-
|
35
|
-
add_index "employers", ["id"], name: "index_employers_on_id", where: "(deleted_at IS NULL)", using: :btree
|
36
|
-
add_index "employers", ["name"], name: "index_employers_on_name", where: "(deleted_at IS NULL)", using: :btree
|
37
|
-
|
38
|
-
create_table "profiles", force: :cascade do |t|
|
39
|
-
t.string "first_name"
|
40
|
-
t.string "last_name"
|
41
|
-
t.datetime "deleted_at"
|
42
|
-
t.datetime "created_at", null: false
|
43
|
-
t.datetime "updated_at", null: false
|
44
|
-
end
|
45
|
-
|
46
|
-
add_index "profiles", ["first_name", "last_name"], name: "index_profiles_on_first_name_and_last_name", using: :btree
|
47
|
-
|
48
|
-
create_table "users", force: :cascade do |t|
|
49
|
-
t.string "email"
|
50
|
-
t.string "first_name"
|
51
|
-
t.string "last_name"
|
52
|
-
t.integer "profile_id"
|
53
|
-
t.integer "employer_id"
|
54
|
-
t.string "country_code", null: false
|
55
|
-
t.datetime "created_at", null: false
|
56
|
-
t.datetime "updated_at", null: false
|
57
|
-
end
|
58
|
-
|
59
|
-
add_index "users", ["email"], name: "index_users_on_email", using: :btree
|
60
|
-
add_index "users", ["email"], name: "unique_index_on_users_email", unique: true, using: :btree
|
61
|
-
add_index "users", ["employer_id", "country_code"], name: "index_users_on_employer_id_and_country_code", using: :btree
|
62
|
-
add_index "users", ["last_name", "first_name", "email"], name: "index_users_on_last_name_and_first_name_and_email", using: :btree
|
63
|
-
add_index "users", ["last_name", "first_name"], name: "index_users_on_last_name_and_first_name", using: :btree
|
64
|
-
add_index "users", ["last_name", "first_name"], name: "unique_index_on_users_last_name_and_first_name", unique: true, using: :btree
|
65
|
-
add_index "users", ["last_name"], name: "index_users_on_last_name", using: :btree
|
66
|
-
|
67
|
-
add_foreign_key "users", "employers"
|
68
|
-
end
|
@@ -1,532 +0,0 @@
|
|
1
|
-
[1m[36m (25.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
2
|
-
[1m[35m (19.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
-
Migrating to CreateEmployers (20160213101213)
|
5
|
-
[1m[35m (0.1ms)[0m BEGIN
|
6
|
-
[1m[36m (35.9ms)[0m [1mCREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
7
|
-
[1m[35m (10.4ms)[0m CREATE INDEX "index_employers_on_id" ON "employers" ("id")
|
8
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101213"]]
|
9
|
-
[1m[35m (8.4ms)[0m COMMIT
|
10
|
-
Migrating to CreateUsers (20160213101221)
|
11
|
-
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
12
|
-
[1m[35m (35.2ms)[0m CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
13
|
-
[1m[36m (1.0ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
14
|
-
FOREIGN KEY ("employer_id")
|
15
|
-
REFERENCES "employers" ("id")
|
16
|
-
[0m
|
17
|
-
[1m[35m (10.4ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" ("last_name", "first_name", "email")
|
18
|
-
[1m[36m (4.4ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name" ON "users" ("last_name", "first_name")[0m
|
19
|
-
[1m[35m (19.2ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" ("last_name", "first_name")
|
20
|
-
[1m[36m (15.8ms)[0m [1mCREATE INDEX "index_users_on_last_name" ON "users" ("last_name")[0m
|
21
|
-
[1m[35m (10.1ms)[0m CREATE INDEX "index_users_on_email" ON "users" ("email")
|
22
|
-
[1m[36m (10.7ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" ("email")[0m
|
23
|
-
[1m[35m (17.0ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" ("employer_id", "country_code")
|
24
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101221"]]
|
25
|
-
[1m[35m (7.6ms)[0m COMMIT
|
26
|
-
Migrating to CreateProfiles (20160213101232)
|
27
|
-
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
28
|
-
[1m[35m (21.0ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
29
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101232"]]
|
30
|
-
[1m[35m (8.0ms)[0m COMMIT
|
31
|
-
Migrating to CreateComments (20160604081452)
|
32
|
-
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
33
|
-
[1m[35m (37.1ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
34
|
-
[1m[36m (9.9ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")[0m
|
35
|
-
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160604081452"]]
|
36
|
-
[1m[36m (7.9ms)[0m [1mCOMMIT[0m
|
37
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
38
|
-
[1m[36m (1.4ms)[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
|
39
|
-
FROM pg_constraint c
|
40
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
41
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
42
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
43
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
44
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
45
|
-
WHERE c.contype = 'f'
|
46
|
-
AND t1.relname = 'comments'
|
47
|
-
AND t3.nspname = ANY (current_schemas(false))
|
48
|
-
ORDER BY c.conname
|
49
|
-
[0m
|
50
|
-
[1m[35m (1.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
|
51
|
-
FROM pg_constraint c
|
52
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
53
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
54
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
55
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
56
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
57
|
-
WHERE c.contype = 'f'
|
58
|
-
AND t1.relname = 'employers'
|
59
|
-
AND t3.nspname = ANY (current_schemas(false))
|
60
|
-
ORDER BY c.conname
|
61
|
-
|
62
|
-
[1m[36m (1.2ms)[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
|
63
|
-
FROM pg_constraint c
|
64
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
65
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
66
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
67
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
68
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
69
|
-
WHERE c.contype = 'f'
|
70
|
-
AND t1.relname = 'profiles'
|
71
|
-
AND t3.nspname = ANY (current_schemas(false))
|
72
|
-
ORDER BY c.conname
|
73
|
-
[0m
|
74
|
-
[1m[35m (1.3ms)[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
|
75
|
-
FROM pg_constraint c
|
76
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
77
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
78
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
79
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
80
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
81
|
-
WHERE c.contype = 'f'
|
82
|
-
AND t1.relname = 'users'
|
83
|
-
AND t3.nspname = ANY (current_schemas(false))
|
84
|
-
ORDER BY c.conname
|
85
|
-
|
86
|
-
[1m[36mSQL (0.1ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
87
|
-
[1m[35m (31.0ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
88
|
-
[1m[36m (17.6ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
89
|
-
[1m[35m (34.4ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
90
|
-
[1m[36m (12.9ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")[0m
|
91
|
-
[1m[35m (31.9ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
92
|
-
[1m[36m (35.7ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
93
|
-
[1m[35m (18.0ms)[0m CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
|
94
|
-
[1m[36m (18.2ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")[0m
|
95
|
-
[1m[35m (18.2ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
|
96
|
-
[1m[36m (12.9ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")[0m
|
97
|
-
[1m[35m (23.8ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
98
|
-
[1m[36m (21.1ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
99
|
-
[1m[35m (24.6ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
|
100
|
-
[1m[36m (9.2ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
101
|
-
FOREIGN KEY ("employer_id")
|
102
|
-
REFERENCES "employers" ("id")
|
103
|
-
[0m
|
104
|
-
[1m[35m (26.4ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
105
|
-
[1m[36m (26.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
106
|
-
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
107
|
-
[1m[36m (2.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160604081452')[0m
|
108
|
-
[1m[35m (7.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
|
109
|
-
[1m[36m (7.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101232')[0m
|
110
|
-
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
|
111
|
-
[1m[36mSQL (0.1ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
112
|
-
[1m[35m (57.5ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
113
|
-
[1m[36m (20.9ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
114
|
-
[1m[35m (46.0ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
115
|
-
[1m[36m (12.2ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")[0m
|
116
|
-
[1m[35m (29.4ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
117
|
-
[1m[36m (32.3ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
118
|
-
[1m[35m (17.2ms)[0m CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
|
119
|
-
[1m[36m (14.7ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")[0m
|
120
|
-
[1m[35m (22.9ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
|
121
|
-
[1m[36m (17.8ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")[0m
|
122
|
-
[1m[35m (17.3ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
123
|
-
[1m[36m (22.9ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
124
|
-
[1m[35m (11.8ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
|
125
|
-
[1m[36m (8.5ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
126
|
-
FOREIGN KEY ("employer_id")
|
127
|
-
REFERENCES "employers" ("id")
|
128
|
-
[0m
|
129
|
-
[1m[35m (21.3ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
130
|
-
[1m[36m (20.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
131
|
-
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
132
|
-
[1m[36m (4.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160604081452')[0m
|
133
|
-
[1m[35m (7.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
|
134
|
-
[1m[36m (7.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101232')[0m
|
135
|
-
[1m[35m (1.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
|
136
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
137
|
-
[1m[36mSQL (0.2ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
138
|
-
[1m[35m (67.5ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
139
|
-
[1m[36m (16.0ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
140
|
-
[1m[35m (41.3ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
141
|
-
[1m[36m (18.7ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")[0m
|
142
|
-
[1m[35m (55.8ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
143
|
-
[1m[36m (38.8ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
144
|
-
[1m[35m (18.2ms)[0m CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
|
145
|
-
[1m[36m (18.4ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")[0m
|
146
|
-
[1m[35m (18.3ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
|
147
|
-
[1m[36m (21.4ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")[0m
|
148
|
-
[1m[35m (12.6ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
149
|
-
[1m[36m (18.4ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
150
|
-
[1m[35m (21.3ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
|
151
|
-
[1m[36m (9.1ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
152
|
-
FOREIGN KEY ("employer_id")
|
153
|
-
REFERENCES "employers" ("id")
|
154
|
-
[0m
|
155
|
-
[1m[35m (27.5ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
156
|
-
[1m[36m (33.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
157
|
-
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
158
|
-
[1m[36m (7.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160604081452')[0m
|
159
|
-
[1m[35m (7.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
|
160
|
-
[1m[36m (7.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101232')[0m
|
161
|
-
[1m[35m (2.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
|
162
|
-
[1m[36mSQL (0.1ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
163
|
-
[1m[35m (51.2ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
164
|
-
[1m[36m (21.0ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
165
|
-
[1m[35m (29.1ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
166
|
-
[1m[36m (18.5ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")[0m
|
167
|
-
[1m[35m (35.1ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
168
|
-
[1m[36m (29.1ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
169
|
-
[1m[35m (20.7ms)[0m CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
|
170
|
-
[1m[36m (23.1ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")[0m
|
171
|
-
[1m[35m (28.7ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
|
172
|
-
[1m[36m (24.1ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")[0m
|
173
|
-
[1m[35m (23.8ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
174
|
-
[1m[36m (24.2ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
175
|
-
[1m[35m (18.0ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
|
176
|
-
[1m[36m (9.3ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
177
|
-
FOREIGN KEY ("employer_id")
|
178
|
-
REFERENCES "employers" ("id")
|
179
|
-
[0m
|
180
|
-
[1m[35m (23.9ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
181
|
-
[1m[36m (12.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
182
|
-
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
183
|
-
[1m[36m (7.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160604081452')[0m
|
184
|
-
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
|
185
|
-
[1m[36m (2.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101232')[0m
|
186
|
-
[1m[35m (7.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
|
187
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
188
|
-
[1m[36m (49.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
189
|
-
[1m[35m (22.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
190
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
191
|
-
Migrating to CreateEmployers (20160213101213)
|
192
|
-
[1m[35m (0.1ms)[0m BEGIN
|
193
|
-
[1m[36m (28.2ms)[0m [1mCREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
194
|
-
[1m[35m (10.7ms)[0m CREATE INDEX "index_employers_on_id" ON "employers" ("id")
|
195
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101213"]]
|
196
|
-
[1m[35m (15.0ms)[0m COMMIT
|
197
|
-
Migrating to CreateUsers (20160213101221)
|
198
|
-
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
199
|
-
[1m[35m (34.9ms)[0m CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
200
|
-
[1m[36m (0.8ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
201
|
-
FOREIGN KEY ("employer_id")
|
202
|
-
REFERENCES "employers" ("id")
|
203
|
-
[0m
|
204
|
-
[1m[35m (20.2ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" ("last_name", "first_name", "email")
|
205
|
-
[1m[36m (16.5ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name" ON "users" ("last_name", "first_name")[0m
|
206
|
-
[1m[35m (16.2ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" ("last_name", "first_name")
|
207
|
-
[1m[36m (19.7ms)[0m [1mCREATE INDEX "index_users_on_last_name" ON "users" ("last_name")[0m
|
208
|
-
[1m[35m (16.6ms)[0m CREATE INDEX "index_users_on_email" ON "users" ("email")
|
209
|
-
[1m[36m (22.2ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" ("email")[0m
|
210
|
-
[1m[35m (10.7ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" ("employer_id", "country_code")
|
211
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101221"]]
|
212
|
-
[1m[35m (8.0ms)[0m COMMIT
|
213
|
-
Migrating to CreateProfiles (20160213101232)
|
214
|
-
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
215
|
-
[1m[35m (30.6ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
216
|
-
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101232"]]
|
217
|
-
[1m[35m (8.4ms)[0m COMMIT
|
218
|
-
Migrating to CreateComments (20160604081452)
|
219
|
-
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
220
|
-
[1m[35m (44.5ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
221
|
-
[1m[36m (13.7ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")[0m
|
222
|
-
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160604081452"]]
|
223
|
-
[1m[36m (7.6ms)[0m [1mCOMMIT[0m
|
224
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
225
|
-
[1m[36m (1.3ms)[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
|
226
|
-
FROM pg_constraint c
|
227
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
228
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
229
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
230
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
231
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
232
|
-
WHERE c.contype = 'f'
|
233
|
-
AND t1.relname = 'comments'
|
234
|
-
AND t3.nspname = ANY (current_schemas(false))
|
235
|
-
ORDER BY c.conname
|
236
|
-
[0m
|
237
|
-
[1m[35m (1.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
|
238
|
-
FROM pg_constraint c
|
239
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
240
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
241
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
242
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
243
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
244
|
-
WHERE c.contype = 'f'
|
245
|
-
AND t1.relname = 'employers'
|
246
|
-
AND t3.nspname = ANY (current_schemas(false))
|
247
|
-
ORDER BY c.conname
|
248
|
-
|
249
|
-
[1m[36m (1.2ms)[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
|
250
|
-
FROM pg_constraint c
|
251
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
252
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
253
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
254
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
255
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
256
|
-
WHERE c.contype = 'f'
|
257
|
-
AND t1.relname = 'profiles'
|
258
|
-
AND t3.nspname = ANY (current_schemas(false))
|
259
|
-
ORDER BY c.conname
|
260
|
-
[0m
|
261
|
-
[1m[35m (1.3ms)[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
|
262
|
-
FROM pg_constraint c
|
263
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
264
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
265
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
266
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
267
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
268
|
-
WHERE c.contype = 'f'
|
269
|
-
AND t1.relname = 'users'
|
270
|
-
AND t3.nspname = ANY (current_schemas(false))
|
271
|
-
ORDER BY c.conname
|
272
|
-
|
273
|
-
[1m[36m (33.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
274
|
-
[1m[35m (18.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
275
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
276
|
-
Migrating to CreateEmployers (20160213101213)
|
277
|
-
[1m[35m (0.1ms)[0m BEGIN
|
278
|
-
[1m[36m (26.3ms)[0m [1mCREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
279
|
-
[1m[35m (18.7ms)[0m CREATE INDEX "index_employers_on_id" ON "employers" ("id")
|
280
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101213"]]
|
281
|
-
[1m[35m (19.9ms)[0m COMMIT
|
282
|
-
Migrating to CreateUsers (20160213101221)
|
283
|
-
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
284
|
-
[1m[35m (34.0ms)[0m CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
285
|
-
[1m[36m (1.4ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
286
|
-
FOREIGN KEY ("employer_id")
|
287
|
-
REFERENCES "employers" ("id")
|
288
|
-
[0m
|
289
|
-
[1m[35m (22.6ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" ("last_name", "first_name", "email")
|
290
|
-
[1m[36m (11.1ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name" ON "users" ("last_name", "first_name")[0m
|
291
|
-
[1m[35m (10.7ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" ("last_name", "first_name")
|
292
|
-
[1m[36m (17.1ms)[0m [1mCREATE INDEX "index_users_on_last_name" ON "users" ("last_name")[0m
|
293
|
-
[1m[35m (11.2ms)[0m CREATE INDEX "index_users_on_email" ON "users" ("email")
|
294
|
-
[1m[36m (15.9ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" ("email")[0m
|
295
|
-
[1m[35m (16.5ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" ("employer_id", "country_code")
|
296
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101221"]]
|
297
|
-
[1m[35m (8.9ms)[0m COMMIT
|
298
|
-
Migrating to CreateProfiles (20160213101232)
|
299
|
-
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
300
|
-
[1m[35m (27.5ms)[0m CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
301
|
-
[1m[36m (19.9ms)[0m [1mCREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" ("first_name", "last_name")[0m
|
302
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160213101232"]]
|
303
|
-
[1m[36m (8.1ms)[0m [1mCOMMIT[0m
|
304
|
-
Migrating to CreateComments (20160604081452)
|
305
|
-
[1m[35m (0.1ms)[0m BEGIN
|
306
|
-
[1m[36m (35.9ms)[0m [1mCREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
307
|
-
[1m[35m (13.4ms)[0m CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")
|
308
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160604081452"]]
|
309
|
-
[1m[35m (2.6ms)[0m COMMIT
|
310
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
311
|
-
[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
|
312
|
-
FROM pg_constraint c
|
313
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
314
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
315
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
316
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
317
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
318
|
-
WHERE c.contype = 'f'
|
319
|
-
AND t1.relname = 'comments'
|
320
|
-
AND t3.nspname = ANY (current_schemas(false))
|
321
|
-
ORDER BY c.conname
|
322
|
-
|
323
|
-
[1m[36m (1.4ms)[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
|
324
|
-
FROM pg_constraint c
|
325
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
326
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
327
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
328
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
329
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
330
|
-
WHERE c.contype = 'f'
|
331
|
-
AND t1.relname = 'employers'
|
332
|
-
AND t3.nspname = ANY (current_schemas(false))
|
333
|
-
ORDER BY c.conname
|
334
|
-
[0m
|
335
|
-
[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
|
336
|
-
FROM pg_constraint c
|
337
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
338
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
339
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
340
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
341
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
342
|
-
WHERE c.contype = 'f'
|
343
|
-
AND t1.relname = 'profiles'
|
344
|
-
AND t3.nspname = ANY (current_schemas(false))
|
345
|
-
ORDER BY c.conname
|
346
|
-
|
347
|
-
[1m[36m (1.6ms)[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
|
348
|
-
FROM pg_constraint c
|
349
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
350
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
351
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
352
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
353
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
354
|
-
WHERE c.contype = 'f'
|
355
|
-
AND t1.relname = 'users'
|
356
|
-
AND t3.nspname = ANY (current_schemas(false))
|
357
|
-
ORDER BY c.conname
|
358
|
-
[0m
|
359
|
-
[1m[36m (24.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
360
|
-
[1m[35m (13.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
361
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
362
|
-
Migrating to CreateEmployers (20160213101213)
|
363
|
-
[1m[35m (0.1ms)[0m BEGIN
|
364
|
-
[1m[36m (34.6ms)[0m [1mCREATE TABLE "employers" ("id" serial primary key, "name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
365
|
-
[1m[35m (14.1ms)[0m CREATE INDEX "index_employers_on_id" ON "employers" ("id")
|
366
|
-
[1m[36m (19.3ms)[0m [1mCREATE INDEX "index_employers_on_name" ON "employers" ("name") WHERE deleted_at IS NULL[0m
|
367
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160213101213"]]
|
368
|
-
[1m[36m (12.3ms)[0m [1mCOMMIT[0m
|
369
|
-
Migrating to CreateUsers (20160213101221)
|
370
|
-
[1m[35m (0.1ms)[0m BEGIN
|
371
|
-
[1m[36m (31.0ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
372
|
-
[1m[35m (1.3ms)[0m ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
373
|
-
FOREIGN KEY ("employer_id")
|
374
|
-
REFERENCES "employers" ("id")
|
375
|
-
|
376
|
-
[1m[36m (16.3ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" ("last_name", "first_name", "email")[0m
|
377
|
-
[1m[35m (10.3ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" ("last_name", "first_name")
|
378
|
-
[1m[36m (23.0ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" ("last_name", "first_name")[0m
|
379
|
-
[1m[35m (19.1ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" ("last_name")
|
380
|
-
[1m[36m (10.5ms)[0m [1mCREATE INDEX "index_users_on_email" ON "users" ("email")[0m
|
381
|
-
[1m[35m (15.8ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" ("email")
|
382
|
-
[1m[36m (20.0ms)[0m [1mCREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" ("employer_id", "country_code")[0m
|
383
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160213101221"]]
|
384
|
-
[1m[36m (8.3ms)[0m [1mCOMMIT[0m
|
385
|
-
Migrating to CreateProfiles (20160213101232)
|
386
|
-
[1m[35m (0.2ms)[0m BEGIN
|
387
|
-
[1m[36m (28.0ms)[0m [1mCREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
388
|
-
[1m[35m (18.9ms)[0m CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" ("first_name", "last_name")
|
389
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101232"]]
|
390
|
-
[1m[35m (11.4ms)[0m COMMIT
|
391
|
-
Migrating to CreateComments (20160604081452)
|
392
|
-
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
393
|
-
[1m[35m (22.1ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
394
|
-
[1m[36m (16.7ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")[0m
|
395
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160604081452"]]
|
396
|
-
[1m[36m (2.1ms)[0m [1mCOMMIT[0m
|
397
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
398
|
-
[1m[36m (1.6ms)[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
|
399
|
-
FROM pg_constraint c
|
400
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
401
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
402
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
403
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
404
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
405
|
-
WHERE c.contype = 'f'
|
406
|
-
AND t1.relname = 'comments'
|
407
|
-
AND t3.nspname = ANY (current_schemas(false))
|
408
|
-
ORDER BY c.conname
|
409
|
-
[0m
|
410
|
-
[1m[35m (1.4ms)[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
|
411
|
-
FROM pg_constraint c
|
412
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
413
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
414
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
415
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
416
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
417
|
-
WHERE c.contype = 'f'
|
418
|
-
AND t1.relname = 'employers'
|
419
|
-
AND t3.nspname = ANY (current_schemas(false))
|
420
|
-
ORDER BY c.conname
|
421
|
-
|
422
|
-
[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
|
423
|
-
FROM pg_constraint c
|
424
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
425
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
426
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
427
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
428
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
429
|
-
WHERE c.contype = 'f'
|
430
|
-
AND t1.relname = 'profiles'
|
431
|
-
AND t3.nspname = ANY (current_schemas(false))
|
432
|
-
ORDER BY c.conname
|
433
|
-
[0m
|
434
|
-
[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
|
435
|
-
FROM pg_constraint c
|
436
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
437
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
438
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
439
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
440
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
441
|
-
WHERE c.contype = 'f'
|
442
|
-
AND t1.relname = 'users'
|
443
|
-
AND t3.nspname = ANY (current_schemas(false))
|
444
|
-
ORDER BY c.conname
|
445
|
-
|
446
|
-
[1m[36m (45.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
447
|
-
[1m[35m (36.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
448
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
449
|
-
Migrating to CreateEmployers (20160213101213)
|
450
|
-
[1m[35m (0.1ms)[0m BEGIN
|
451
|
-
[1m[36m (23.3ms)[0m [1mCREATE TABLE "employers" ("id" serial primary key, "name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
452
|
-
[1m[35m (18.6ms)[0m CREATE INDEX "index_employers_on_id" ON "employers" ("id") WHERE deleted_at IS NULL
|
453
|
-
[1m[36m (26.1ms)[0m [1mCREATE INDEX "index_employers_on_name" ON "employers" ("name") WHERE deleted_at IS NULL[0m
|
454
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160213101213"]]
|
455
|
-
[1m[36m (9.6ms)[0m [1mCOMMIT[0m
|
456
|
-
Migrating to CreateUsers (20160213101221)
|
457
|
-
[1m[35m (0.2ms)[0m BEGIN
|
458
|
-
[1m[36m (34.7ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
459
|
-
[1m[35m (1.3ms)[0m ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
460
|
-
FOREIGN KEY ("employer_id")
|
461
|
-
REFERENCES "employers" ("id")
|
462
|
-
|
463
|
-
[1m[36m (15.0ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" ("last_name", "first_name", "email")[0m
|
464
|
-
[1m[35m (27.7ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" ("last_name", "first_name")
|
465
|
-
[1m[36m (11.2ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" ("last_name", "first_name")[0m
|
466
|
-
[1m[35m (16.5ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" ("last_name")
|
467
|
-
[1m[36m (19.7ms)[0m [1mCREATE INDEX "index_users_on_email" ON "users" ("email")[0m
|
468
|
-
[1m[35m (15.9ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" ("email")
|
469
|
-
[1m[36m (12.8ms)[0m [1mCREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" ("employer_id", "country_code")[0m
|
470
|
-
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160213101221"]]
|
471
|
-
[1m[36m (8.0ms)[0m [1mCOMMIT[0m
|
472
|
-
Migrating to CreateProfiles (20160213101232)
|
473
|
-
[1m[35m (0.2ms)[0m BEGIN
|
474
|
-
[1m[36m (29.6ms)[0m [1mCREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
475
|
-
[1m[35m (11.0ms)[0m CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" ("first_name", "last_name")
|
476
|
-
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20160213101232"]]
|
477
|
-
[1m[35m (8.4ms)[0m COMMIT
|
478
|
-
Migrating to CreateComments (20160604081452)
|
479
|
-
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
480
|
-
[1m[35m (33.1ms)[0m CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
481
|
-
[1m[36m (10.6ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")[0m
|
482
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160604081452"]]
|
483
|
-
[1m[36m (11.8ms)[0m [1mCOMMIT[0m
|
484
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
485
|
-
[1m[36m (1.6ms)[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
|
486
|
-
FROM pg_constraint c
|
487
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
488
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
489
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
490
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
491
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
492
|
-
WHERE c.contype = 'f'
|
493
|
-
AND t1.relname = 'comments'
|
494
|
-
AND t3.nspname = ANY (current_schemas(false))
|
495
|
-
ORDER BY c.conname
|
496
|
-
[0m
|
497
|
-
[1m[35m (1.4ms)[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
|
498
|
-
FROM pg_constraint c
|
499
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
500
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
501
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
502
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
503
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
504
|
-
WHERE c.contype = 'f'
|
505
|
-
AND t1.relname = 'employers'
|
506
|
-
AND t3.nspname = ANY (current_schemas(false))
|
507
|
-
ORDER BY c.conname
|
508
|
-
|
509
|
-
[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
|
510
|
-
FROM pg_constraint c
|
511
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
512
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
513
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
514
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
515
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
516
|
-
WHERE c.contype = 'f'
|
517
|
-
AND t1.relname = 'profiles'
|
518
|
-
AND t3.nspname = ANY (current_schemas(false))
|
519
|
-
ORDER BY c.conname
|
520
|
-
[0m
|
521
|
-
[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
|
522
|
-
FROM pg_constraint c
|
523
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
524
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
525
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
526
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
527
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
528
|
-
WHERE c.contype = 'f'
|
529
|
-
AND t1.relname = 'users'
|
530
|
-
AND t3.nspname = ANY (current_schemas(false))
|
531
|
-
ORDER BY c.conname
|
532
|
-
|