categorical 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +33 -0
- data/app/models/categorical/tag.rb +5 -0
- data/app/models/categorical/tagging.rb +6 -0
- data/db/migrate/20150919153408_create_categorical_tags.rb +9 -0
- data/db/migrate/20151011215525_create_categorical_taggings.rb +8 -0
- data/db/migrate/20151015173150_add_index_to_tags.rb +5 -0
- data/lib/categorical.rb +6 -0
- data/lib/categorical/concerns/models/tag.rb +39 -0
- data/lib/categorical/engine.rb +5 -0
- data/lib/categorical/taggable.rb +10 -0
- data/lib/categorical/version.rb +3 -0
- data/lib/tasks/categorical_tasks.rake +4 -0
- data/test/categorical_test.rb +7 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/post.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +13 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +12 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/migrate/20151003185718_create_posts.rb +9 -0
- data/test/dummy/db/schema.rb +41 -0
- data/test/dummy/log/development.log +241 -0
- data/test/dummy/log/test.log +6583 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/models/categorical/concerns/taggable_test.rb +15 -0
- data/test/models/categorical/tag_test.rb +53 -0
- data/test/models/categorical/tagging_test.rb +25 -0
- data/test/test_helper.rb +12 -0
- metadata +202 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,22 @@
|
|
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: 0341667dfe0533a789f1dc8c873bec0e47eddadb7647de9ac26a6dbf5afd5872092e77847dfbf15686d18c75b46301582bc6ce445fbb38eda722145404e10d0d
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 7192c171cd38276a0bda733423decd9d87bdfbc7e789326974706937a22e984be0a5a14251af9292b36e32adf7f24be7c7335d34b221527d4900ffff00ce35c3
|
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"] %>
|
@@ -0,0 +1,41 @@
|
|
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: 20151015173150) do
|
15
|
+
|
16
|
+
# These are extensions that must be enabled in order to support this database
|
17
|
+
enable_extension "plpgsql"
|
18
|
+
|
19
|
+
create_table "categorical_taggings", force: :cascade do |t|
|
20
|
+
t.integer "taggable_id"
|
21
|
+
t.string "taggable_type"
|
22
|
+
t.integer "tag_id"
|
23
|
+
end
|
24
|
+
|
25
|
+
add_index "categorical_taggings", ["taggable_type", "taggable_id"], name: "index_categorical_taggings_on_taggable_type_and_taggable_id", using: :btree
|
26
|
+
|
27
|
+
create_table "categorical_tags", force: :cascade do |t|
|
28
|
+
t.string "label"
|
29
|
+
t.datetime "created_at", null: false
|
30
|
+
t.datetime "updated_at", null: false
|
31
|
+
end
|
32
|
+
|
33
|
+
add_index "categorical_tags", ["label"], name: "index_categorical_tags_on_label", unique: true, using: :btree
|
34
|
+
|
35
|
+
create_table "posts", force: :cascade do |t|
|
36
|
+
t.string "title"
|
37
|
+
t.datetime "created_at", null: false
|
38
|
+
t.datetime "updated_at", null: false
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,241 @@
|
|
1
|
+
[1m[36m (16.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
2
|
+
[1m[35m (4.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreateCategoricalTags (20150919153408)
|
5
|
+
[1m[35m (0.9ms)[0m BEGIN
|
6
|
+
[1m[36m (9.4ms)[0m [1mCREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
7
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150919153408"]]
|
8
|
+
[1m[36m (0.7ms)[0m [1mCOMMIT[0m
|
9
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.9ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
10
|
+
[1m[36m (6.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
|
11
|
+
FROM pg_constraint c
|
12
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
13
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
14
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
15
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
16
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
17
|
+
WHERE c.contype = 'f'
|
18
|
+
AND t1.relname = 'categorical_tags'
|
19
|
+
AND t3.nspname = ANY (current_schemas(false))
|
20
|
+
ORDER BY c.conname
|
21
|
+
[0m
|
22
|
+
[1m[36mSQL (0.7ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
23
|
+
[1m[35m (5.2ms)[0m DROP TABLE "categorical_tags" CASCADE
|
24
|
+
[1m[36m (6.2ms)[0m [1mCREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
25
|
+
[1m[35m (1.2ms)[0m SELECT version FROM "schema_migrations"
|
26
|
+
[1m[36mSQL (0.5ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
27
|
+
[1m[35m (7.6ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
28
|
+
[1m[36m (2.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
29
|
+
[1m[35m (2.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
30
|
+
[1m[36m (0.8ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
31
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150919153408')
|
32
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.9ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
33
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
34
|
+
Migrating to CreatePosts (20151003185718)
|
35
|
+
[1m[35m (0.3ms)[0m BEGIN
|
36
|
+
[1m[36m (22.1ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
37
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20151003185718"]]
|
38
|
+
[1m[36m (0.7ms)[0m [1mCOMMIT[0m
|
39
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.4ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
40
|
+
[1m[36m (7.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
|
41
|
+
FROM pg_constraint c
|
42
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
43
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
44
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
45
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
46
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
47
|
+
WHERE c.contype = 'f'
|
48
|
+
AND t1.relname = 'categorical_tags'
|
49
|
+
AND t3.nspname = ANY (current_schemas(false))
|
50
|
+
ORDER BY c.conname
|
51
|
+
[0m
|
52
|
+
[1m[35m (155.9ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
53
|
+
FROM pg_constraint c
|
54
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
55
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
56
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
57
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
58
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
59
|
+
WHERE c.contype = 'f'
|
60
|
+
AND t1.relname = 'posts'
|
61
|
+
AND t3.nspname = ANY (current_schemas(false))
|
62
|
+
ORDER BY c.conname
|
63
|
+
|
64
|
+
[1m[36m (130.3ms)[0m [1mDROP DATABASE IF EXISTS "categorical_development"[0m
|
65
|
+
[1m[35m (134.5ms)[0m DROP DATABASE IF EXISTS "categorical_test"
|
66
|
+
[1m[36m (262.8ms)[0m [1mCREATE DATABASE "categorical_development" ENCODING = 'unicode'[0m
|
67
|
+
[1m[35m (270.9ms)[0m CREATE DATABASE "categorical_test" ENCODING = 'unicode'
|
68
|
+
[1m[36mSQL (0.7ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
69
|
+
[1m[35m (10.8ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
70
|
+
[1m[36m (8.6ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
71
|
+
[1m[35m (3.5ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
72
|
+
[1m[36m (5.5ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
73
|
+
[1m[35m (0.8ms)[0m SELECT version FROM "schema_migrations"
|
74
|
+
[1m[36m (3.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151003185718')[0m
|
75
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150919153408')
|
76
|
+
[1m[36mSQL (0.6ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
77
|
+
[1m[35m (13.9ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
78
|
+
[1m[36m (6.6ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
79
|
+
[1m[35m (4.0ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
80
|
+
[1m[36m (1.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
81
|
+
[1m[35m (0.8ms)[0m SELECT version FROM "schema_migrations"
|
82
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151003185718')[0m
|
83
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150919153408')
|
84
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
85
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.9ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
86
|
+
Migrating to CreateCategoricalTaggings (20151011215525)
|
87
|
+
[1m[35m (0.3ms)[0m BEGIN
|
88
|
+
[1m[36m (49.2ms)[0m [1mCREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer) [0m
|
89
|
+
[1m[35m (2.5ms)[0m CREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" ("taggable_type", "taggable_id")
|
90
|
+
[1m[36mSQL (1.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20151011215525"]]
|
91
|
+
[1m[35m (3.7ms)[0m COMMIT
|
92
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
93
|
+
[1m[35m (9.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
|
94
|
+
FROM pg_constraint c
|
95
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
96
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
97
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
98
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
99
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
100
|
+
WHERE c.contype = 'f'
|
101
|
+
AND t1.relname = 'categorical_taggings'
|
102
|
+
AND t3.nspname = ANY (current_schemas(false))
|
103
|
+
ORDER BY c.conname
|
104
|
+
|
105
|
+
[1m[36m (4.0ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
106
|
+
FROM pg_constraint c
|
107
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
108
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
109
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
110
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
111
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
112
|
+
WHERE c.contype = 'f'
|
113
|
+
AND t1.relname = 'categorical_tags'
|
114
|
+
AND t3.nspname = ANY (current_schemas(false))
|
115
|
+
ORDER BY c.conname
|
116
|
+
[0m
|
117
|
+
[1m[35m (4.0ms)[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
|
118
|
+
FROM pg_constraint c
|
119
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
120
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
121
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
122
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
123
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
124
|
+
WHERE c.contype = 'f'
|
125
|
+
AND t1.relname = 'posts'
|
126
|
+
AND t3.nspname = ANY (current_schemas(false))
|
127
|
+
ORDER BY c.conname
|
128
|
+
|
129
|
+
[1m[36mSQL (1.0ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
130
|
+
[1m[35m (10.5ms)[0m DROP TABLE "categorical_taggings" CASCADE
|
131
|
+
[1m[36m (12.7ms)[0m [1mCREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer) [0m
|
132
|
+
[1m[35m (1.9ms)[0m CREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" USING btree ("taggable_type", "taggable_id")
|
133
|
+
[1m[36m (2.8ms)[0m [1mDROP TABLE "categorical_tags" CASCADE[0m
|
134
|
+
[1m[35m (5.2ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
135
|
+
[1m[36m (3.6ms)[0m [1mDROP TABLE "posts" CASCADE[0m
|
136
|
+
[1m[35m (6.4ms)[0m CREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
137
|
+
[1m[36m (1.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
138
|
+
[1m[35mSQL (0.8ms)[0m CREATE EXTENSION IF NOT EXISTS "plpgsql"
|
139
|
+
[1m[36m (7.1ms)[0m [1mDROP TABLE "categorical_taggings" CASCADE[0m
|
140
|
+
[1m[35m (5.5ms)[0m CREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer)
|
141
|
+
[1m[36m (1.8ms)[0m [1mCREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" USING btree ("taggable_type", "taggable_id")[0m
|
142
|
+
[1m[35m (4.0ms)[0m DROP TABLE "categorical_tags" CASCADE
|
143
|
+
[1m[36m (7.3ms)[0m [1mCREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
144
|
+
[1m[35m (3.2ms)[0m DROP TABLE "posts" CASCADE
|
145
|
+
[1m[36m (6.3ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
146
|
+
[1m[35m (1.0ms)[0m SELECT version FROM "schema_migrations"
|
147
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150919153408')[0m
|
148
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.5ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
149
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
150
|
+
Migrating to AddIndexToTags (20151015173150)
|
151
|
+
[1m[35m (1.3ms)[0m BEGIN
|
152
|
+
[1m[36m (40.6ms)[0m [1mCREATE UNIQUE INDEX "index_categorical_tags_on_label" ON "categorical_tags" ("label")[0m
|
153
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20151015173150"]]
|
154
|
+
[1m[36m (2.7ms)[0m [1mCOMMIT[0m
|
155
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
156
|
+
[1m[36m (5.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
|
157
|
+
FROM pg_constraint c
|
158
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
159
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
160
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
161
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
162
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
163
|
+
WHERE c.contype = 'f'
|
164
|
+
AND t1.relname = 'categorical_taggings'
|
165
|
+
AND t3.nspname = ANY (current_schemas(false))
|
166
|
+
ORDER BY c.conname
|
167
|
+
[0m
|
168
|
+
[1m[35m (4.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
|
169
|
+
FROM pg_constraint c
|
170
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
171
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
172
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
173
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
174
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
175
|
+
WHERE c.contype = 'f'
|
176
|
+
AND t1.relname = 'categorical_tags'
|
177
|
+
AND t3.nspname = ANY (current_schemas(false))
|
178
|
+
ORDER BY c.conname
|
179
|
+
|
180
|
+
[1m[36m (5.9ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
181
|
+
FROM pg_constraint c
|
182
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
183
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
184
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
185
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
186
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
187
|
+
WHERE c.contype = 'f'
|
188
|
+
AND t1.relname = 'posts'
|
189
|
+
AND t3.nspname = ANY (current_schemas(false))
|
190
|
+
ORDER BY c.conname
|
191
|
+
[0m
|
192
|
+
[1m[36mSQL (0.5ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
193
|
+
[1m[35m (5.4ms)[0m DROP TABLE "categorical_taggings" CASCADE
|
194
|
+
[1m[36m (7.8ms)[0m [1mCREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer) [0m
|
195
|
+
[1m[35m (2.7ms)[0m CREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" USING btree ("taggable_type", "taggable_id")
|
196
|
+
[1m[36m (3.0ms)[0m [1mDROP TABLE "categorical_tags" CASCADE[0m
|
197
|
+
[1m[35m (4.7ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
198
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "index_categorical_tags_on_label" ON "categorical_tags" USING btree ("label")[0m
|
199
|
+
[1m[35m (2.6ms)[0m DROP TABLE "posts" CASCADE
|
200
|
+
[1m[36m (5.3ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
201
|
+
[1m[35m (0.9ms)[0m SELECT version FROM "schema_migrations"
|
202
|
+
[1m[36mSQL (0.6ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
203
|
+
[1m[35m (3.7ms)[0m DROP TABLE "categorical_taggings" CASCADE
|
204
|
+
[1m[36m (6.4ms)[0m [1mCREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer) [0m
|
205
|
+
[1m[35m (1.8ms)[0m CREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" USING btree ("taggable_type", "taggable_id")
|
206
|
+
[1m[36m (5.8ms)[0m [1mDROP TABLE "categorical_tags" CASCADE[0m
|
207
|
+
[1m[35m (5.0ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
208
|
+
[1m[36m (1.6ms)[0m [1mCREATE UNIQUE INDEX "index_categorical_tags_on_label" ON "categorical_tags" USING btree ("label")[0m
|
209
|
+
[1m[35m (2.6ms)[0m DROP TABLE "posts" CASCADE
|
210
|
+
[1m[36m (4.7ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
211
|
+
[1m[35m (0.9ms)[0m SELECT version FROM "schema_migrations"
|
212
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150919153408')[0m
|
213
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151011215525')
|
214
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.6ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
215
|
+
[1m[36mSQL (1.8ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
216
|
+
[1m[35m (22.9ms)[0m CREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer)
|
217
|
+
[1m[36m (2.2ms)[0m [1mCREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" USING btree ("taggable_type", "taggable_id")[0m
|
218
|
+
[1m[35m (7.6ms)[0m CREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
219
|
+
[1m[36m (1.5ms)[0m [1mCREATE UNIQUE INDEX "index_categorical_tags_on_label" ON "categorical_tags" USING btree ("label")[0m
|
220
|
+
[1m[35m (6.7ms)[0m CREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
221
|
+
[1m[36m (3.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
222
|
+
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
223
|
+
[1m[36m (0.8ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
224
|
+
[1m[35m (1.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151015173150')
|
225
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151003185718')[0m
|
226
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150919153408')
|
227
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151011215525')[0m
|
228
|
+
[1m[35mSQL (0.5ms)[0m CREATE EXTENSION IF NOT EXISTS "plpgsql"
|
229
|
+
[1m[36m (8.8ms)[0m [1mCREATE TABLE "categorical_taggings" ("id" serial primary key, "taggable_id" integer, "taggable_type" character varying, "tag_id" integer) [0m
|
230
|
+
[1m[35m (2.9ms)[0m CREATE INDEX "index_categorical_taggings_on_taggable_type_and_taggable_id" ON "categorical_taggings" USING btree ("taggable_type", "taggable_id")
|
231
|
+
[1m[36m (5.6ms)[0m [1mCREATE TABLE "categorical_tags" ("id" serial primary key, "label" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
232
|
+
[1m[35m (1.7ms)[0m CREATE UNIQUE INDEX "index_categorical_tags_on_label" ON "categorical_tags" USING btree ("label")
|
233
|
+
[1m[36m (6.2ms)[0m [1mCREATE TABLE "posts" ("id" serial primary key, "title" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
234
|
+
[1m[35m (3.9ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
235
|
+
[1m[36m (1.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
236
|
+
[1m[35m (0.8ms)[0m SELECT version FROM "schema_migrations"
|
237
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151015173150')[0m
|
238
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151003185718')
|
239
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150919153408')[0m
|
240
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151011215525')
|
241
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|