slugs 2.0.1 → 4.0.0.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 +4 -4
- data/README.md +59 -19
- data/Rakefile +1 -19
- data/lib/generators/slugs/install/install_generator.rb +24 -0
- data/lib/generators/slugs/{templates/configuration.rb → install/templates/initializer.rb} +1 -1
- data/lib/generators/slugs/install/templates/migration.rb +15 -0
- data/lib/slugs.rb +7 -4
- data/lib/slugs/concern.rb +16 -9
- data/lib/slugs/configuration.rb +11 -1
- data/lib/slugs/extensions/action_dispatch/generator.rb +1 -0
- data/lib/slugs/extensions/action_dispatch/optimized_url_helper.rb +1 -0
- data/lib/slugs/extensions/active_record/finders.rb +27 -0
- data/lib/slugs/railtie.rb +10 -4
- data/lib/slugs/slug.rb +9 -0
- data/lib/slugs/version.rb +1 -1
- data/test/dummy/bin/bundle +1 -0
- data/test/dummy/bin/rails +1 -0
- data/test/dummy/bin/rake +1 -0
- data/test/dummy/bin/setup +1 -0
- data/test/dummy/config/database.yml.travis +2 -11
- data/test/dummy/config/environments/development.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -2
- data/test/dummy/config/initializers/slugs.rb +1 -1
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/db/migrate/20161016174020_create_users.rb +2 -0
- data/test/dummy/db/migrate/20161016174126_create_shops.rb +2 -0
- data/test/dummy/db/migrate/20161016174202_create_products.rb +2 -0
- data/test/dummy/db/migrate/20161016174225_create_categories.rb +2 -0
- data/test/dummy/db/migrate/20161124162802_create_slugs.rb +15 -0
- data/test/dummy/db/schema.rb +33 -13
- data/test/dummy/log/development.log +394 -30
- data/test/dummy/log/test.log +3017 -3978
- data/test/dummy/public/404.html +57 -63
- data/test/dummy/public/422.html +57 -63
- data/test/dummy/public/500.html +56 -62
- data/test/generator_test.rb +3 -4
- data/test/record_test.rb +65 -0
- data/test/{routes_test.rb → route_test.rb} +1 -1
- data/test/test_helper.rb +2 -2
- metadata +14 -9
- data/lib/generators/slugs/install_generator.rb +0 -15
- data/test/records_test.rb +0 -27
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Rails.application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
@@ -17,7 +17,7 @@ Dummy::Application.configure do
|
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local
|
20
|
+
config.consider_all_requests_local = true
|
21
21
|
config.action_controller.perform_caching = false
|
22
22
|
|
23
23
|
# Raise exceptions instead of rendering exception templates.
|
@@ -11,10 +11,10 @@
|
|
11
11
|
# if you're sharing your code publicly.
|
12
12
|
|
13
13
|
development:
|
14
|
-
secret_key_base:
|
14
|
+
secret_key_base: 2c1c8d4cbaa726b21aa6483b7d556125f4897508e2b94f8b3ddaec675168382c9b3b6eb5a9359d2fade03f539c16ac1ef905891c2410f2fd00b83b76c1666feb
|
15
15
|
|
16
16
|
test:
|
17
|
-
secret_key_base:
|
17
|
+
secret_key_base: 9dd531171128e7c3d11dd2c5c18c84ba43d29b677043002634a6f4d58bf2687a283b7b6dc6af741d63c3824f11fa1f858010d7c2509a932023f2ece0d3bfe6cf
|
18
18
|
|
19
19
|
# Do not keep production secrets in the repository,
|
20
20
|
# instead read values from the environment.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateSlugs < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :slugs do |t|
|
4
|
+
t.integer :sluggable_id
|
5
|
+
t.string :sluggable_type
|
6
|
+
t.string :value
|
7
|
+
|
8
|
+
t.timestamps null: false
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :slugs, :sluggable_id
|
12
|
+
add_index :slugs, :sluggable_type
|
13
|
+
add_index :slugs, :value
|
14
|
+
end
|
15
|
+
end
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,33 +11,53 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20161124162802) do
|
15
15
|
|
16
16
|
# These are extensions that must be enabled in order to support this database
|
17
17
|
enable_extension "plpgsql"
|
18
18
|
|
19
19
|
create_table "categories", force: :cascade do |t|
|
20
|
-
t.string
|
21
|
-
t.integer
|
22
|
-
t.string
|
20
|
+
t.string "name"
|
21
|
+
t.integer "shop_id"
|
22
|
+
t.string "slug"
|
23
|
+
t.datetime "created_at", null: false
|
24
|
+
t.datetime "updated_at", null: false
|
23
25
|
end
|
24
26
|
|
25
27
|
create_table "products", force: :cascade do |t|
|
26
|
-
t.string
|
27
|
-
t.integer
|
28
|
-
t.integer
|
29
|
-
t.string
|
28
|
+
t.string "name"
|
29
|
+
t.integer "shop_id"
|
30
|
+
t.integer "category_id"
|
31
|
+
t.string "slug"
|
32
|
+
t.datetime "created_at", null: false
|
33
|
+
t.datetime "updated_at", null: false
|
30
34
|
end
|
31
35
|
|
32
36
|
create_table "shops", force: :cascade do |t|
|
33
|
-
t.string
|
34
|
-
t.string
|
37
|
+
t.string "name"
|
38
|
+
t.string "slug"
|
39
|
+
t.datetime "created_at", null: false
|
40
|
+
t.datetime "updated_at", null: false
|
35
41
|
end
|
36
42
|
|
43
|
+
create_table "slugs", force: :cascade do |t|
|
44
|
+
t.integer "sluggable_id"
|
45
|
+
t.string "sluggable_type"
|
46
|
+
t.string "value"
|
47
|
+
t.datetime "created_at", null: false
|
48
|
+
t.datetime "updated_at", null: false
|
49
|
+
end
|
50
|
+
|
51
|
+
add_index "slugs", ["sluggable_id"], name: "index_slugs_on_sluggable_id", using: :btree
|
52
|
+
add_index "slugs", ["sluggable_type"], name: "index_slugs_on_sluggable_type", using: :btree
|
53
|
+
add_index "slugs", ["value"], name: "index_slugs_on_value", using: :btree
|
54
|
+
|
37
55
|
create_table "users", force: :cascade do |t|
|
38
|
-
t.string
|
39
|
-
t.string
|
40
|
-
t.string
|
56
|
+
t.string "first_name"
|
57
|
+
t.string "last_name"
|
58
|
+
t.string "slug"
|
59
|
+
t.datetime "created_at", null: false
|
60
|
+
t.datetime "updated_at", null: false
|
41
61
|
end
|
42
62
|
|
43
63
|
end
|
@@ -1,26 +1,26 @@
|
|
1
|
-
[1m[36m (
|
2
|
-
[1m[35m (
|
3
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.
|
1
|
+
[1m[36m (2.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
2
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
4
|
Migrating to CreateUsers (20161016174020)
|
5
5
|
[1m[35m (0.2ms)[0m BEGIN
|
6
|
-
[1m[36m (
|
6
|
+
[1m[36m (13.6ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
7
7
|
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174020"]]
|
8
|
-
[1m[36m (
|
8
|
+
[1m[36m (5.8ms)[0m [1mCOMMIT[0m
|
9
9
|
Migrating to CreateShops (20161016174126)
|
10
|
-
[1m[35m (
|
11
|
-
[1m[36m (
|
10
|
+
[1m[35m (5.9ms)[0m BEGIN
|
11
|
+
[1m[36m (19.4ms)[0m [1mCREATE TABLE "shops" ("id" serial primary key, "name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
12
12
|
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174126"]]
|
13
|
-
[1m[36m (
|
13
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
14
14
|
Migrating to CreateProducts (20161016174202)
|
15
|
-
[1m[35m (
|
16
|
-
[1m[36m (
|
17
|
-
[1m[35mSQL (0.
|
18
|
-
[1m[36m (
|
15
|
+
[1m[35m (5.9ms)[0m BEGIN
|
16
|
+
[1m[36m (18.3ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "shop_id" integer, "category_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
17
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174202"]]
|
18
|
+
[1m[36m (1.7ms)[0m [1mCOMMIT[0m
|
19
19
|
Migrating to CreateCategories (20161016174225)
|
20
|
-
[1m[35m (
|
21
|
-
[1m[36m (
|
22
|
-
[1m[35mSQL (0.
|
23
|
-
[1m[36m (0.
|
20
|
+
[1m[35m (5.9ms)[0m BEGIN
|
21
|
+
[1m[36m (43.7ms)[0m [1mCREATE TABLE "categories" ("id" serial primary key, "name" character varying, "shop_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
22
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174225"]]
|
23
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
24
24
|
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
25
25
|
[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
|
26
26
|
FROM pg_constraint c
|
@@ -34,7 +34,7 @@ WHERE c.contype = 'f'
|
|
34
34
|
AND t3.nspname = ANY (current_schemas(false))
|
35
35
|
ORDER BY c.conname
|
36
36
|
[0m
|
37
|
-
[1m[35m (1.
|
37
|
+
[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
|
38
38
|
FROM pg_constraint c
|
39
39
|
JOIN pg_class t1 ON c.conrelid = t1.oid
|
40
40
|
JOIN pg_class t2 ON c.confrelid = t2.oid
|
@@ -71,30 +71,174 @@ WHERE c.contype = 'f'
|
|
71
71
|
ORDER BY c.conname
|
72
72
|
|
73
73
|
[1m[36m (2.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
74
|
-
[1m[35m (
|
74
|
+
[1m[35m (17.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
75
75
|
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
76
76
|
Migrating to CreateUsers (20161016174020)
|
77
77
|
[1m[35m (0.1ms)[0m BEGIN
|
78
|
-
[1m[36m (
|
78
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
79
|
+
[1m[36m (2.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
80
|
+
[1m[35m (0.7ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
81
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
82
|
+
Migrating to CreateUsers (20161016174020)
|
83
|
+
[1m[35m (0.2ms)[0m BEGIN
|
84
|
+
[1m[36m (13.6ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "slugs" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
79
85
|
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174020"]]
|
80
|
-
[1m[36m (
|
86
|
+
[1m[36m (6.2ms)[0m [1mCOMMIT[0m
|
81
87
|
Migrating to CreateShops (20161016174126)
|
82
|
-
[1m[35m (
|
83
|
-
[1m[36m (
|
88
|
+
[1m[35m (11.3ms)[0m BEGIN
|
89
|
+
[1m[36m (13.1ms)[0m [1mCREATE TABLE "shops" ("id" serial primary key, "name" character varying, "slugs" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
84
90
|
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174126"]]
|
85
|
-
[1m[36m (0.
|
91
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
86
92
|
Migrating to CreateProducts (20161016174202)
|
87
|
-
[1m[35m (
|
88
|
-
[1m[36m (
|
93
|
+
[1m[35m (5.8ms)[0m BEGIN
|
94
|
+
[1m[36m (13.1ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "shop_id" integer, "category_id" integer, "slugs" jsonb DEFAULT '[]', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
89
95
|
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174202"]]
|
90
|
-
[1m[36m (
|
96
|
+
[1m[36m (4.9ms)[0m [1mCOMMIT[0m
|
91
97
|
Migrating to CreateCategories (20161016174225)
|
98
|
+
[1m[35m (6.1ms)[0m BEGIN
|
99
|
+
[1m[36m (12.6ms)[0m [1mCREATE TABLE "categories" ("id" serial primary key, "name" character varying, "shop_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
100
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174225"]]
|
101
|
+
[1m[36m (4.9ms)[0m [1mCOMMIT[0m
|
102
|
+
Migrating to AddSlugsToCategories (20161122160434)
|
103
|
+
[1m[35m (5.9ms)[0m BEGIN
|
104
|
+
[1m[36m (19.4ms)[0m [1mALTER TABLE "categories" ADD "slugs" jsonb DEFAULT '[]'[0m
|
105
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161122160434"]]
|
106
|
+
[1m[36m (0.6ms)[0m [1mCOMMIT[0m
|
107
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
108
|
+
[1m[36m (1.8ms)[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
|
109
|
+
FROM pg_constraint c
|
110
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
111
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
112
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
113
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
114
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
115
|
+
WHERE c.contype = 'f'
|
116
|
+
AND t1.relname = 'categories'
|
117
|
+
AND t3.nspname = ANY (current_schemas(false))
|
118
|
+
ORDER BY c.conname
|
119
|
+
[0m
|
120
|
+
[1m[35m (1.2ms)[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
|
121
|
+
FROM pg_constraint c
|
122
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
123
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
124
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
125
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
126
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
127
|
+
WHERE c.contype = 'f'
|
128
|
+
AND t1.relname = 'products'
|
129
|
+
AND t3.nspname = ANY (current_schemas(false))
|
130
|
+
ORDER BY c.conname
|
131
|
+
|
132
|
+
[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
|
133
|
+
FROM pg_constraint c
|
134
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
135
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
136
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
137
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
138
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
139
|
+
WHERE c.contype = 'f'
|
140
|
+
AND t1.relname = 'shops'
|
141
|
+
AND t3.nspname = ANY (current_schemas(false))
|
142
|
+
ORDER BY c.conname
|
143
|
+
[0m
|
144
|
+
[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
|
145
|
+
FROM pg_constraint c
|
146
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
147
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
148
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
149
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
150
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
151
|
+
WHERE c.contype = 'f'
|
152
|
+
AND t1.relname = 'users'
|
153
|
+
AND t3.nspname = ANY (current_schemas(false))
|
154
|
+
ORDER BY c.conname
|
155
|
+
|
156
|
+
[1m[36m (13.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
157
|
+
[1m[35m (17.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
158
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
159
|
+
Migrating to CreateUsers (20161016174020)
|
92
160
|
[1m[35m (0.2ms)[0m BEGIN
|
93
|
-
[1m[36m (
|
94
|
-
[1m[35mSQL (0.
|
161
|
+
[1m[36m (13.4ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "slug" character varying, "previous_slugs" character varying[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
162
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174020"]]
|
163
|
+
[1m[36m (5.5ms)[0m [1mCOMMIT[0m
|
164
|
+
Migrating to CreateShops (20161016174126)
|
165
|
+
[1m[35m (5.8ms)[0m BEGIN
|
166
|
+
[1m[36m (12.4ms)[0m [1mCREATE TABLE "shops" ("id" serial primary key, "name" character varying, "slug" character varying, "previous_slugs" character varying[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
167
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174126"]]
|
95
168
|
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
169
|
+
Migrating to CreateProducts (20161016174202)
|
170
|
+
[1m[35m (0.2ms)[0m BEGIN
|
171
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "shop_id" integer, "category_id" integer, "slug" character varying, "previous_slugs" character varying[], "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
172
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174202"]]
|
173
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
174
|
+
Migrating to CreateCategories (20161016174225)
|
175
|
+
[1m[35m (0.2ms)[0m BEGIN
|
176
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "categories" ("id" serial primary key, "name" character varying, "shop_id" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
177
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174225"]]
|
178
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
179
|
+
Migrating to AddSlugsToCategories (20161122160434)
|
180
|
+
[1m[35m (0.2ms)[0m BEGIN
|
181
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "categories" ADD "slug" character varying[0m
|
182
|
+
[1m[35m (0.2ms)[0m ALTER TABLE "categories" ADD "previous_slugs" character varying[]
|
183
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20161122160434"]]
|
184
|
+
[1m[35m (0.2ms)[0m COMMIT
|
185
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
186
|
+
[1m[35m (1.7ms)[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
|
187
|
+
FROM pg_constraint c
|
188
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
189
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
190
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
191
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
192
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
193
|
+
WHERE c.contype = 'f'
|
194
|
+
AND t1.relname = 'categories'
|
195
|
+
AND t3.nspname = ANY (current_schemas(false))
|
196
|
+
ORDER BY c.conname
|
197
|
+
|
198
|
+
[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
|
199
|
+
FROM pg_constraint c
|
200
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
201
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
202
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
203
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
204
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
205
|
+
WHERE c.contype = 'f'
|
206
|
+
AND t1.relname = 'products'
|
207
|
+
AND t3.nspname = ANY (current_schemas(false))
|
208
|
+
ORDER BY c.conname
|
209
|
+
[0m
|
210
|
+
[1m[35m (1.2ms)[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
|
211
|
+
FROM pg_constraint c
|
212
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
213
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
214
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
215
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
216
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
217
|
+
WHERE c.contype = 'f'
|
218
|
+
AND t1.relname = 'shops'
|
219
|
+
AND t3.nspname = ANY (current_schemas(false))
|
220
|
+
ORDER BY c.conname
|
221
|
+
|
222
|
+
[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
|
223
|
+
FROM pg_constraint c
|
224
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
225
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
226
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
227
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
228
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
229
|
+
WHERE c.contype = 'f'
|
230
|
+
AND t1.relname = 'users'
|
231
|
+
AND t3.nspname = ANY (current_schemas(false))
|
232
|
+
ORDER BY c.conname
|
233
|
+
[0m
|
234
|
+
[1m[36mActiveRecord::SchemaMigration Load (6.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
235
|
+
Migrating to CreateSlugs (20161124162802)
|
236
|
+
[1m[35m (0.2ms)[0m BEGIN
|
237
|
+
[1m[36m (25.1ms)[0m [1mCREATE TABLE "slugs" ("id" serial primary key, "sluggable_id" integer, "sluggable_type" character varying, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
238
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161124162802"]]
|
239
|
+
[1m[36m (7.0ms)[0m [1mCOMMIT[0m
|
96
240
|
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
97
|
-
[1m[36m (
|
241
|
+
[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
|
98
242
|
FROM pg_constraint c
|
99
243
|
JOIN pg_class t1 ON c.conrelid = t1.oid
|
100
244
|
JOIN pg_class t2 ON c.confrelid = t2.oid
|
@@ -106,7 +250,7 @@ WHERE c.contype = 'f'
|
|
106
250
|
AND t3.nspname = ANY (current_schemas(false))
|
107
251
|
ORDER BY c.conname
|
108
252
|
[0m
|
109
|
-
[1m[35m (1.
|
253
|
+
[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
|
110
254
|
FROM pg_constraint c
|
111
255
|
JOIN pg_class t1 ON c.conrelid = t1.oid
|
112
256
|
JOIN pg_class t2 ON c.confrelid = t2.oid
|
@@ -129,6 +273,226 @@ WHERE c.contype = 'f'
|
|
129
273
|
AND t1.relname = 'shops'
|
130
274
|
AND t3.nspname = ANY (current_schemas(false))
|
131
275
|
ORDER BY c.conname
|
276
|
+
[0m
|
277
|
+
[1m[35m (1.2ms)[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
|
278
|
+
FROM pg_constraint c
|
279
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
280
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
281
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
282
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
283
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
284
|
+
WHERE c.contype = 'f'
|
285
|
+
AND t1.relname = 'slugs'
|
286
|
+
AND t3.nspname = ANY (current_schemas(false))
|
287
|
+
ORDER BY c.conname
|
288
|
+
|
289
|
+
[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
|
290
|
+
FROM pg_constraint c
|
291
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
292
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
293
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
294
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
295
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
296
|
+
WHERE c.contype = 'f'
|
297
|
+
AND t1.relname = 'users'
|
298
|
+
AND t3.nspname = ANY (current_schemas(false))
|
299
|
+
ORDER BY c.conname
|
300
|
+
[0m
|
301
|
+
[1m[36mProduct Load (2.0ms)[0m [1mSELECT "products".* FROM "products" ORDER BY "products"."id" ASC LIMIT 1[0m
|
302
|
+
[1m[36m (24.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
303
|
+
[1m[35m (16.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
304
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
305
|
+
Migrating to CreateUsers (20161016174020)
|
306
|
+
[1m[35m (0.2ms)[0m BEGIN
|
307
|
+
[1m[36m (13.8ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
308
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174020"]]
|
309
|
+
[1m[36m (16.5ms)[0m [1mCOMMIT[0m
|
310
|
+
Migrating to CreateShops (20161016174126)
|
311
|
+
[1m[35m (6.1ms)[0m BEGIN
|
312
|
+
[1m[36m (3.1ms)[0m [1mCREATE TABLE "shops" ("id" serial primary key, "name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
313
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174126"]]
|
314
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
315
|
+
Migrating to CreateProducts (20161016174202)
|
316
|
+
[1m[35m (0.3ms)[0m BEGIN
|
317
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "shop_id" integer, "category_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
318
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174202"]]
|
319
|
+
[1m[36m (1.3ms)[0m [1mCOMMIT[0m
|
320
|
+
Migrating to CreateCategories (20161016174225)
|
321
|
+
[1m[35m (0.2ms)[0m BEGIN
|
322
|
+
[1m[36m (3.9ms)[0m [1mCREATE TABLE "categories" ("id" serial primary key, "name" character varying, "shop_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
323
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174225"]]
|
324
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
325
|
+
Migrating to CreateSlugs (20161124162802)
|
326
|
+
[1m[35m (6.2ms)[0m CREATE INDEX "index_slugs_on_sluggable_id" ON "slugs" ("sluggable_id")
|
327
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_slugs_on_sluggable_id" ON "slugs" ("sluggable_id")[0m
|
328
|
+
[1m[36m (24.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
329
|
+
[1m[35m (18.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
330
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
331
|
+
Migrating to CreateUsers (20161016174020)
|
332
|
+
[1m[35m (0.2ms)[0m BEGIN
|
333
|
+
[1m[36m (13.9ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
334
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174020"]]
|
335
|
+
[1m[36m (5.9ms)[0m [1mCOMMIT[0m
|
336
|
+
Migrating to CreateShops (20161016174126)
|
337
|
+
[1m[35m (5.9ms)[0m BEGIN
|
338
|
+
[1m[36m (12.3ms)[0m [1mCREATE TABLE "shops" ("id" serial primary key, "name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
339
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174126"]]
|
340
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
341
|
+
Migrating to CreateProducts (20161016174202)
|
342
|
+
[1m[35m (0.2ms)[0m BEGIN
|
343
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "shop_id" integer, "category_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
344
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174202"]]
|
345
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
346
|
+
Migrating to CreateCategories (20161016174225)
|
347
|
+
[1m[35m (0.2ms)[0m BEGIN
|
348
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "categories" ("id" serial primary key, "name" character varying, "shop_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
349
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174225"]]
|
350
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
351
|
+
Migrating to CreateSlugs (20161124162802)
|
352
|
+
[1m[35m (0.2ms)[0m BEGIN
|
353
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "slugs" ("id" serial primary key, "sluggable_id" integer, "sluggable_type" character varying, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
354
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161124162802"]]
|
355
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
356
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
357
|
+
[1m[36m (1.8ms)[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
|
358
|
+
FROM pg_constraint c
|
359
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
360
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
361
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
362
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
363
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
364
|
+
WHERE c.contype = 'f'
|
365
|
+
AND t1.relname = 'categories'
|
366
|
+
AND t3.nspname = ANY (current_schemas(false))
|
367
|
+
ORDER BY c.conname
|
368
|
+
[0m
|
369
|
+
[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
|
370
|
+
FROM pg_constraint c
|
371
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
372
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
373
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
374
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
375
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
376
|
+
WHERE c.contype = 'f'
|
377
|
+
AND t1.relname = 'products'
|
378
|
+
AND t3.nspname = ANY (current_schemas(false))
|
379
|
+
ORDER BY c.conname
|
380
|
+
|
381
|
+
[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
|
382
|
+
FROM pg_constraint c
|
383
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
384
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
385
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
386
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
387
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
388
|
+
WHERE c.contype = 'f'
|
389
|
+
AND t1.relname = 'shops'
|
390
|
+
AND t3.nspname = ANY (current_schemas(false))
|
391
|
+
ORDER BY c.conname
|
392
|
+
[0m
|
393
|
+
[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
|
394
|
+
FROM pg_constraint c
|
395
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
396
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
397
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
398
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
399
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
400
|
+
WHERE c.contype = 'f'
|
401
|
+
AND t1.relname = 'slugs'
|
402
|
+
AND t3.nspname = ANY (current_schemas(false))
|
403
|
+
ORDER BY c.conname
|
404
|
+
|
405
|
+
[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
|
406
|
+
FROM pg_constraint c
|
407
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
408
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
409
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
410
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
411
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
412
|
+
WHERE c.contype = 'f'
|
413
|
+
AND t1.relname = 'users'
|
414
|
+
AND t3.nspname = ANY (current_schemas(false))
|
415
|
+
ORDER BY c.conname
|
416
|
+
[0m
|
417
|
+
[1m[36m (2.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
418
|
+
[1m[35m (17.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
419
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
420
|
+
Migrating to CreateUsers (20161016174020)
|
421
|
+
[1m[35m (0.2ms)[0m BEGIN
|
422
|
+
[1m[36m (12.7ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
423
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174020"]]
|
424
|
+
[1m[36m (5.9ms)[0m [1mCOMMIT[0m
|
425
|
+
Migrating to CreateShops (20161016174126)
|
426
|
+
[1m[35m (5.9ms)[0m BEGIN
|
427
|
+
[1m[36m (12.6ms)[0m [1mCREATE TABLE "shops" ("id" serial primary key, "name" character varying, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
428
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174126"]]
|
429
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
430
|
+
Migrating to CreateProducts (20161016174202)
|
431
|
+
[1m[35m (0.2ms)[0m BEGIN
|
432
|
+
[1m[36m (10.6ms)[0m [1mCREATE TABLE "products" ("id" serial primary key, "name" character varying, "shop_id" integer, "category_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
433
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174202"]]
|
434
|
+
[1m[36m (5.9ms)[0m [1mCOMMIT[0m
|
435
|
+
Migrating to CreateCategories (20161016174225)
|
436
|
+
[1m[35m (5.9ms)[0m BEGIN
|
437
|
+
[1m[36m (6.6ms)[0m [1mCREATE TABLE "categories" ("id" serial primary key, "name" character varying, "shop_id" integer, "slug" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
438
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161016174225"]]
|
439
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
440
|
+
Migrating to CreateSlugs (20161124162802)
|
441
|
+
[1m[35m (5.5ms)[0m BEGIN
|
442
|
+
[1m[36m (13.5ms)[0m [1mCREATE TABLE "slugs" ("id" serial primary key, "sluggable_id" integer, "sluggable_type" character varying, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
443
|
+
[1m[35m (5.1ms)[0m CREATE INDEX "index_slugs_on_sluggable_id" ON "slugs" ("sluggable_id")
|
444
|
+
[1m[36m (0.5ms)[0m [1mCREATE INDEX "index_slugs_on_sluggable_type" ON "slugs" ("sluggable_type")[0m
|
445
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_slugs_on_value" ON "slugs" ("value")
|
446
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20161124162802"]]
|
447
|
+
[1m[35m (0.4ms)[0m COMMIT
|
448
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
449
|
+
[1m[35m (1.7ms)[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
|
450
|
+
FROM pg_constraint c
|
451
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
452
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
453
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
454
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
455
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
456
|
+
WHERE c.contype = 'f'
|
457
|
+
AND t1.relname = 'categories'
|
458
|
+
AND t3.nspname = ANY (current_schemas(false))
|
459
|
+
ORDER BY c.conname
|
460
|
+
|
461
|
+
[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
|
462
|
+
FROM pg_constraint c
|
463
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
464
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
465
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
466
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
467
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
468
|
+
WHERE c.contype = 'f'
|
469
|
+
AND t1.relname = 'products'
|
470
|
+
AND t3.nspname = ANY (current_schemas(false))
|
471
|
+
ORDER BY c.conname
|
472
|
+
[0m
|
473
|
+
[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
|
474
|
+
FROM pg_constraint c
|
475
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
476
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
477
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
478
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
479
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
480
|
+
WHERE c.contype = 'f'
|
481
|
+
AND t1.relname = 'shops'
|
482
|
+
AND t3.nspname = ANY (current_schemas(false))
|
483
|
+
ORDER BY c.conname
|
484
|
+
|
485
|
+
[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
|
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 = 'slugs'
|
494
|
+
AND t3.nspname = ANY (current_schemas(false))
|
495
|
+
ORDER BY c.conname
|
132
496
|
[0m
|
133
497
|
[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
|
134
498
|
FROM pg_constraint c
|