json_column 0.6.5

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.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +34 -0
  5. data/lib/json_column.rb +42 -0
  6. data/lib/json_column/acts_as_json_column.rb +71 -0
  7. data/lib/json_column/json_column_array.rb +9 -0
  8. data/lib/json_column/json_column_object.rb +9 -0
  9. data/lib/json_column/json_validator.rb +12 -0
  10. data/lib/json_column/version.rb +3 -0
  11. data/lib/tasks/json_column_tasks.rake +4 -0
  12. data/test/dummy/README.rdoc +28 -0
  13. data/test/dummy/Rakefile +6 -0
  14. data/test/dummy/app/assets/javascripts/application.js +13 -0
  15. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  16. data/test/dummy/app/controllers/application_controller.rb +5 -0
  17. data/test/dummy/app/helpers/application_helper.rb +2 -0
  18. data/test/dummy/app/models/b_model.rb +3 -0
  19. data/test/dummy/app/models/c_model.rb +4 -0
  20. data/test/dummy/app/models/d_model.rb +8 -0
  21. data/test/dummy/app/models/schemas/arr.yml +18 -0
  22. data/test/dummy/app/models/schemas/jbson.json +8 -0
  23. data/test/dummy/app/models/schemas/json.yml +6 -0
  24. data/test/dummy/app/models/test_model.rb +4 -0
  25. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/test/dummy/bin/bundle +3 -0
  27. data/test/dummy/bin/rails +4 -0
  28. data/test/dummy/bin/rake +4 -0
  29. data/test/dummy/bin/setup +29 -0
  30. data/test/dummy/config.ru +4 -0
  31. data/test/dummy/config/application.rb +26 -0
  32. data/test/dummy/config/boot.rb +5 -0
  33. data/test/dummy/config/database.yml +24 -0
  34. data/test/dummy/config/environment.rb +5 -0
  35. data/test/dummy/config/environments/development.rb +41 -0
  36. data/test/dummy/config/environments/production.rb +79 -0
  37. data/test/dummy/config/environments/test.rb +42 -0
  38. data/test/dummy/config/initializers/assets.rb +11 -0
  39. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  40. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  41. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/test/dummy/config/initializers/inflections.rb +16 -0
  43. data/test/dummy/config/initializers/mime_types.rb +4 -0
  44. data/test/dummy/config/initializers/session_store.rb +3 -0
  45. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  46. data/test/dummy/config/locales/en.yml +23 -0
  47. data/test/dummy/config/routes.rb +56 -0
  48. data/test/dummy/config/secrets.yml +22 -0
  49. data/test/dummy/db/migrate/20150317124232_create_test_models.rb +8 -0
  50. data/test/dummy/db/migrate/20150317190350_add_json_extension.rb +5 -0
  51. data/test/dummy/db/migrate/20150327143322_create_b_models.rb +9 -0
  52. data/test/dummy/db/migrate/20150402125831_create_c_models.rb +10 -0
  53. data/test/dummy/db/migrate/20150402162627_create_d_models.rb +9 -0
  54. data/test/dummy/db/schema.rb +44 -0
  55. data/test/dummy/log/development.log +680 -0
  56. data/test/dummy/log/test.log +7810 -0
  57. data/test/dummy/public/404.html +67 -0
  58. data/test/dummy/public/422.html +67 -0
  59. data/test/dummy/public/500.html +66 -0
  60. data/test/dummy/public/favicon.ico +0 -0
  61. data/test/dummy/test/fixtures/b_models.yml +7 -0
  62. data/test/dummy/test/fixtures/c_models.yml +9 -0
  63. data/test/dummy/test/fixtures/customers.yml +9 -0
  64. data/test/dummy/test/fixtures/d_models.yml +7 -0
  65. data/test/dummy/test/fixtures/test_models.yml +11 -0
  66. data/test/dummy/test/models/b_model_test.rb +7 -0
  67. data/test/dummy/test/models/c_model_test.rb +7 -0
  68. data/test/dummy/test/models/customer_test.rb +7 -0
  69. data/test/dummy/test/models/d_model_test.rb +7 -0
  70. data/test/dummy/test/models/test_model_test.rb +7 -0
  71. data/test/json_column_test.rb +61 -0
  72. data/test/test_helper.rb +18 -0
  73. metadata +233 -0
@@ -0,0 +1,10 @@
1
+ class CreateCModels < ActiveRecord::Migration
2
+ def change
3
+ create_table :c_models do |t|
4
+ t.jsonb :json
5
+ t.jsonb :jbson
6
+
7
+ t.timestamps null: false
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class CreateDModels < ActiveRecord::Migration
2
+ def change
3
+ create_table :d_models do |t|
4
+ t.jsonb :arr
5
+
6
+ t.timestamps null: false
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,44 @@
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: 20150402162627) do
15
+
16
+ # These are extensions that must be enabled in order to support this database
17
+ enable_extension "plpgsql"
18
+
19
+ create_table "b_models", force: :cascade do |t|
20
+ t.jsonb "json"
21
+ t.datetime "created_at", null: false
22
+ t.datetime "updated_at", null: false
23
+ end
24
+
25
+ create_table "c_models", force: :cascade do |t|
26
+ t.jsonb "json"
27
+ t.jsonb "jbson"
28
+ t.datetime "created_at", null: false
29
+ t.datetime "updated_at", null: false
30
+ end
31
+
32
+ create_table "d_models", force: :cascade do |t|
33
+ t.jsonb "arr"
34
+ t.datetime "created_at", null: false
35
+ t.datetime "updated_at", null: false
36
+ end
37
+
38
+ create_table "test_models", force: :cascade do |t|
39
+ t.datetime "created_at", null: false
40
+ t.datetime "updated_at", null: false
41
+ t.jsonb "json"
42
+ end
43
+
44
+ end
@@ -0,0 +1,680 @@
1
+  (27.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (27.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to CreateTestModels (20150317124232)
6
+  (0.1ms) begin transaction
7
+  (0.3ms) CREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
8
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150317124232"]]
9
+  (33.9ms) commit transaction
10
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
+  (18.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
12
+  (14.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
14
+ Migrating to CreateTestModels (20150317124232)
15
+  (0.1ms) BEGIN
16
+  (12.6ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
17
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
18
+  (4.7ms) COMMIT
19
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
20
+  (2.5ms) 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
21
+ FROM pg_constraint c
22
+ JOIN pg_class t1 ON c.conrelid = t1.oid
23
+ JOIN pg_class t2 ON c.confrelid = t2.oid
24
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
25
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
26
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
27
+ WHERE c.contype = 'f'
28
+ AND t1.relname = 'test_models'
29
+ AND t3.nspname = ANY (current_schemas(false))
30
+ ORDER BY c.conname
31
+ 
32
+  (16.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
33
+  (14.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
34
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
35
+ Migrating to CreateTestModels (20150317124232)
36
+  (0.1ms) BEGIN
37
+  (12.3ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
38
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
39
+  (5.4ms) COMMIT
40
+ Migrating to AddJsonExtension (20150317190350)
41
+  (0.2ms) BEGIN
42
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317190350"]]
43
+  (4.6ms) COMMIT
44
+ Migrating to AddJsonbColumnTest (20150317191251)
45
+  (0.1ms) BEGIN
46
+  (10.5ms) ALTER TABLE "test_models" ADD "json" jsonb
47
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317191251"]]
48
+  (4.9ms) COMMIT
49
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
50
+  (2.4ms) 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 = 'test_models'
59
+ AND t3.nspname = ANY (current_schemas(false))
60
+ ORDER BY c.conname
61
+
62
+ TestModel Load (0.9ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
63
+  (0.2ms) BEGIN
64
+ SQL (0.4ms) INSERT INTO "test_models" ("json", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["json", "{\"name\":\"yeee\",\"cv\":{\"location\":\"north\",\"age\":23}}"], ["created_at", "2015-03-17 19:26:48.683616"], ["updated_at", "2015-03-17 19:26:48.683616"]]
65
+  (3.6ms) COMMIT
66
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
67
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
68
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
69
+ TestModel Load (0.7ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
70
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
71
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
72
+ TestModel Load (1.1ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
73
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
74
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
75
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
76
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
77
+ TestModel Load (0.7ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
78
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
79
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
80
+ TestModel Load (0.9ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
81
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
82
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
83
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
84
+ TestModel Load (0.7ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
85
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
86
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
87
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
88
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
89
+ ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
90
+ Migrating to CreateCustomers (20150318112546)
91
+  (0.2ms) BEGIN
92
+  (35.4ms) CREATE TABLE "customers" ("id" serial primary key, "address_street" character varying, "address_city" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
93
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150318112546"]]
94
+  (5.3ms) COMMIT
95
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
96
+  (2.5ms) 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
97
+ FROM pg_constraint c
98
+ JOIN pg_class t1 ON c.conrelid = t1.oid
99
+ JOIN pg_class t2 ON c.confrelid = t2.oid
100
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
101
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
102
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
103
+ WHERE c.contype = 'f'
104
+ AND t1.relname = 'customers'
105
+ AND t3.nspname = ANY (current_schemas(false))
106
+ ORDER BY c.conname
107
+ 
108
+  (2.0ms) 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
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 = 'test_models'
117
+ AND t3.nspname = ANY (current_schemas(false))
118
+ ORDER BY c.conname
119
+
120
+  (0.3ms) BEGIN
121
+ SQL (0.5ms) INSERT INTO "customers" ("address_street", "address_city", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["address_street", "quebec"], ["address_city", "evergreen"], ["created_at", "2015-03-18 11:29:55.268048"], ["updated_at", "2015-03-18 11:29:55.268048"]]
122
+  (4.5ms) COMMIT
123
+ Customer Load (0.8ms) SELECT "customers".* FROM "customers" ORDER BY "customers"."id" ASC LIMIT 1
124
+ Customer Load (0.5ms) SELECT "customers".* FROM "customers" ORDER BY "customers"."id" ASC LIMIT 1
125
+ Customer Load (0.5ms) SELECT "customers".* FROM "customers" ORDER BY "customers"."id" ASC LIMIT 1
126
+ Customer Load (0.5ms) SELECT "customers".* FROM "customers" ORDER BY "customers"."id" ASC LIMIT 1
127
+ TestModel Load (0.9ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
128
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
129
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
130
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
131
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
132
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
133
+  (2.8ms) 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
+ FROM pg_constraint c
135
+ JOIN pg_class t1 ON c.conrelid = t1.oid
136
+ JOIN pg_class t2 ON c.confrelid = t2.oid
137
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
138
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
139
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
140
+ WHERE c.contype = 'f'
141
+ AND t1.relname = 'customers'
142
+ AND t3.nspname = ANY (current_schemas(false))
143
+ ORDER BY c.conname
144
+ 
145
+  (2.4ms) 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
146
+ FROM pg_constraint c
147
+ JOIN pg_class t1 ON c.conrelid = t1.oid
148
+ JOIN pg_class t2 ON c.confrelid = t2.oid
149
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
150
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
151
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
152
+ WHERE c.contype = 'f'
153
+ AND t1.relname = 'test_models'
154
+ AND t3.nspname = ANY (current_schemas(false))
155
+ ORDER BY c.conname
156
+
157
+  (16.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
158
+  (14.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
159
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
160
+ Migrating to CreateTestModels (20150317124232)
161
+  (0.1ms) BEGIN
162
+  (12.4ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
163
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
164
+  (5.0ms) COMMIT
165
+ Migrating to AddJsonExtension (20150317190350)
166
+  (0.1ms) BEGIN
167
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317190350"]]
168
+  (4.4ms) COMMIT
169
+ Migrating to AddJsonbColumnTest (20150317191251)
170
+  (0.1ms) BEGIN
171
+  (10.4ms) ALTER TABLE "test_models" ADD "json" jsonb
172
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317191251"]]
173
+  (5.0ms) COMMIT
174
+ Migrating to CreateCustomers (20150318112546)
175
+  (0.1ms) BEGIN
176
+  (22.5ms) CREATE TABLE "customers" ("id" serial primary key, "address_street" character varying, "address_city" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
177
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150318112546"]]
178
+  (4.6ms) COMMIT
179
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
180
+  (2.4ms) 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
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 = 'customers'
189
+ AND t3.nspname = ANY (current_schemas(false))
190
+ ORDER BY c.conname
191
+
192
+  (1.9ms) 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
193
+ FROM pg_constraint c
194
+ JOIN pg_class t1 ON c.conrelid = t1.oid
195
+ JOIN pg_class t2 ON c.confrelid = t2.oid
196
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
197
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
198
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
199
+ WHERE c.contype = 'f'
200
+ AND t1.relname = 'test_models'
201
+ AND t3.nspname = ANY (current_schemas(false))
202
+ ORDER BY c.conname
203
+ 
204
+  (16.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
205
+  (14.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
206
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
207
+ Migrating to CreateTestModels (20150317124232)
208
+  (0.1ms) BEGIN
209
+  (13.5ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
210
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
211
+  (4.9ms) COMMIT
212
+ Migrating to AddJsonExtension (20150317190350)
213
+  (0.1ms) BEGIN
214
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317190350"]]
215
+  (4.5ms) COMMIT
216
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
217
+  (3.0ms) 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
218
+ FROM pg_constraint c
219
+ JOIN pg_class t1 ON c.conrelid = t1.oid
220
+ JOIN pg_class t2 ON c.confrelid = t2.oid
221
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
222
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
223
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
224
+ WHERE c.contype = 'f'
225
+ AND t1.relname = 'test_models'
226
+ AND t3.nspname = ANY (current_schemas(false))
227
+ ORDER BY c.conname
228
+
229
+  (15.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
230
+  (13.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
231
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
232
+ Migrating to CreateTestModels (20150317124232)
233
+  (0.2ms) BEGIN
234
+  (12.3ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
235
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
236
+  (6.1ms) COMMIT
237
+ Migrating to AddJsonExtension (20150317190350)
238
+  (0.1ms) BEGIN
239
+  (10.5ms) ALTER TABLE "test_models" ADD "json" jsonb
240
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317190350"]]
241
+  (3.6ms) COMMIT
242
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
243
+  (3.1ms) 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
244
+ FROM pg_constraint c
245
+ JOIN pg_class t1 ON c.conrelid = t1.oid
246
+ JOIN pg_class t2 ON c.confrelid = t2.oid
247
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
248
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
249
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
250
+ WHERE c.contype = 'f'
251
+ AND t1.relname = 'test_models'
252
+ AND t3.nspname = ANY (current_schemas(false))
253
+ ORDER BY c.conname
254
+ 
255
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
256
+  (0.3ms) BEGIN
257
+ SQL (0.5ms) INSERT INTO "test_models" ("json", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["json", "{\"a\":23}"], ["created_at", "2015-03-18 16:12:49.879871"], ["updated_at", "2015-03-18 16:12:49.879871"]]
258
+  (9.7ms) COMMIT
259
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
260
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
261
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
262
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
263
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
264
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
265
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
266
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
267
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
268
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
269
+  (0.2ms) BEGIN
270
+ SQL (0.3ms) UPDATE "test_models" SET "json" = $1, "updated_at" = $2 WHERE "test_models"."id" = $3 [["json", "{\"b\":\"lkjklj\"}"], ["updated_at", "2015-03-18 16:20:09.840574"], ["id", 1]]
271
+  (5.0ms) COMMIT
272
+ TestModel Load (0.2ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
273
+  (0.3ms) BEGIN
274
+ SQL (0.3ms) UPDATE "test_models" SET "json" = $1, "updated_at" = $2 WHERE "test_models"."id" = $3 [["json", "{\"b\":\"lkjklj\"}"], ["updated_at", "2015-03-18 16:21:48.634721"], ["id", 1]]
275
+  (5.9ms) COMMIT
276
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
277
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
278
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
279
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
280
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
281
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
282
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
283
+ TestModel Load (0.9ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
284
+ invalid json schema for Hash
285
+  (0.2ms) BEGIN
286
+ SQL (0.5ms) INSERT INTO "test_models" ("json", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["json", "{\"s\":34}"], ["created_at", "2015-03-18 16:28:08.880635"], ["updated_at", "2015-03-18 16:28:08.880635"]]
287
+  (6.1ms) COMMIT
288
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 2]]
289
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 2]]
290
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 2]]
291
+ TestModel Load (0.9ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
292
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
293
+ creating a JsonColumn
294
+ invalid json schema for Hash
295
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
296
+ TestModel Load (0.9ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
297
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
298
+ creating a JsonColumn
299
+ invalid json schema for Hash
300
+  (0.3ms) BEGIN
301
+ SQL (0.3ms) UPDATE "test_models" SET "json" = $1, "updated_at" = $2 WHERE "test_models"."id" = $3 [["json", "{\"c\":\"lk\"}"], ["updated_at", "2015-03-18 16:36:04.628669"], ["id", 1]]
302
+  (6.0ms) COMMIT
303
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
304
+ creating a JsonColumn
305
+  (0.2ms) BEGIN
306
+ SQL (0.3ms) INSERT INTO "test_models" ("json", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["json", "{\"a\":42}"], ["created_at", "2015-03-18 16:38:08.665168"], ["updated_at", "2015-03-18 16:38:08.665168"]]
307
+  (4.8ms) COMMIT
308
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
309
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
310
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
311
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
312
+ TestModel Load (1.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
313
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
314
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
315
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
316
+  (0.3ms) BEGIN
317
+ SQL (0.7ms) INSERT INTO "test_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-03-27 14:10:58.001924"], ["updated_at", "2015-03-27 14:10:58.001924"]]
318
+  (7.2ms) COMMIT
319
+  (2.1ms) SELECT COUNT(*) FROM "test_models"
320
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 1
321
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
322
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
323
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
324
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
325
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
326
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
327
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
328
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
329
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
330
+ TestModel Load (0.7ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
331
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
332
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
333
+ TestModel Load (0.6ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
334
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
335
+ Migrating to CreateBModels (20150327143322)
336
+  (0.1ms) BEGIN
337
+  (32.6ms) CREATE TABLE "b_models" ("id" serial primary key, "json" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
338
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150327143322"]]
339
+  (5.0ms) COMMIT
340
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
341
+  (4.2ms) 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
342
+ FROM pg_constraint c
343
+ JOIN pg_class t1 ON c.conrelid = t1.oid
344
+ JOIN pg_class t2 ON c.confrelid = t2.oid
345
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
346
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
347
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
348
+ WHERE c.contype = 'f'
349
+ AND t1.relname = 'b_models'
350
+ AND t3.nspname = ANY (current_schemas(false))
351
+ ORDER BY c.conname
352
+ 
353
+  (3.6ms) 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
354
+ FROM pg_constraint c
355
+ JOIN pg_class t1 ON c.conrelid = t1.oid
356
+ JOIN pg_class t2 ON c.confrelid = t2.oid
357
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
358
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
359
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
360
+ WHERE c.contype = 'f'
361
+ AND t1.relname = 'test_models'
362
+ AND t3.nspname = ANY (current_schemas(false))
363
+ ORDER BY c.conname
364
+
365
+ TestModel Load (0.7ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
366
+  (0.2ms) BEGIN
367
+  (0.2ms) COMMIT
368
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
369
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
370
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
371
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
372
+ TestModel Load (0.5ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
373
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1 OFFSET 2
374
+  (0.2ms) BEGIN
375
+  (0.3ms) COMMIT
376
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 3]]
377
+  (17.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
378
+  (15.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
379
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
380
+ Migrating to CreateTestModels (20150317124232)
381
+  (0.1ms) BEGIN
382
+  (13.3ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
383
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
384
+  (3.6ms) COMMIT
385
+ Migrating to AddJsonExtension (20150317190350)
386
+  (0.1ms) BEGIN
387
+  (11.0ms) ALTER TABLE "test_models" ADD "json" jsonb
388
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317190350"]]
389
+  (6.1ms) COMMIT
390
+ Migrating to CreateBModels (20150327143322)
391
+  (0.1ms) BEGIN
392
+  (20.6ms) CREATE TABLE "b_models" ("id" serial primary key, "json" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
393
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150327143322"]]
394
+  (3.7ms) COMMIT
395
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
396
+  (3.7ms) 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
397
+ FROM pg_constraint c
398
+ JOIN pg_class t1 ON c.conrelid = t1.oid
399
+ JOIN pg_class t2 ON c.confrelid = t2.oid
400
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
401
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
402
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
403
+ WHERE c.contype = 'f'
404
+ AND t1.relname = 'b_models'
405
+ AND t3.nspname = ANY (current_schemas(false))
406
+ ORDER BY c.conname
407
+ 
408
+  (2.8ms) 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
409
+ FROM pg_constraint c
410
+ JOIN pg_class t1 ON c.conrelid = t1.oid
411
+ JOIN pg_class t2 ON c.confrelid = t2.oid
412
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
413
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
414
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
415
+ WHERE c.contype = 'f'
416
+ AND t1.relname = 'test_models'
417
+ AND t3.nspname = ANY (current_schemas(false))
418
+ ORDER BY c.conname
419
+
420
+ TestModel Load (1.1ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
421
+  (0.2ms) BEGIN
422
+ SQL (1.5ms) INSERT INTO "test_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-03-30 19:41:20.226870"], ["updated_at", "2015-03-30 19:41:20.226870"]]
423
+  (3.6ms) COMMIT
424
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
425
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
426
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
427
+ TestModel Load (0.8ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
428
+  (0.2ms) BEGIN
429
+  (0.2ms) COMMIT
430
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" ORDER BY "test_models"."id" ASC LIMIT 1
431
+ TestModel Load (0.2ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
432
+ TestModel Load (0.4ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
433
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
434
+ Migrating to CreateCModels (20150330203604)
435
+  (0.2ms) BEGIN
436
+  (22.3ms) CREATE TABLE "c_models" ("id" serial primary key, "json" jsonb, "jbson" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
437
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150330203604"]]
438
+  (7.4ms) COMMIT
439
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
440
+  (3.2ms) 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
441
+ FROM pg_constraint c
442
+ JOIN pg_class t1 ON c.conrelid = t1.oid
443
+ JOIN pg_class t2 ON c.confrelid = t2.oid
444
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
445
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
446
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
447
+ WHERE c.contype = 'f'
448
+ AND t1.relname = 'b_models'
449
+ AND t3.nspname = ANY (current_schemas(false))
450
+ ORDER BY c.conname
451
+ 
452
+  (2.7ms) 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
453
+ FROM pg_constraint c
454
+ JOIN pg_class t1 ON c.conrelid = t1.oid
455
+ JOIN pg_class t2 ON c.confrelid = t2.oid
456
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
457
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
458
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
459
+ WHERE c.contype = 'f'
460
+ AND t1.relname = 'c_models'
461
+ AND t3.nspname = ANY (current_schemas(false))
462
+ ORDER BY c.conname
463
+
464
+  (2.9ms) 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
465
+ FROM pg_constraint c
466
+ JOIN pg_class t1 ON c.conrelid = t1.oid
467
+ JOIN pg_class t2 ON c.confrelid = t2.oid
468
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
469
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
470
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
471
+ WHERE c.contype = 'f'
472
+ AND t1.relname = 'test_models'
473
+ AND t3.nspname = ANY (current_schemas(false))
474
+ ORDER BY c.conname
475
+ 
476
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
477
+ Migrating to CreateCModels (20150402125831)
478
+  (0.1ms) BEGIN
479
+  (0.1ms) ROLLBACK
480
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
481
+ Migrating to CreateCModels (20150402125831)
482
+  (0.1ms) BEGIN
483
+  (11.1ms) CREATE TABLE "c_models" ("id" serial primary key, "json" jsonb, "jbson" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
484
+ PG::DuplicateTable: ERROR: relation "c_models" already exists
485
+ : CREATE TABLE "c_models" ("id" serial primary key, "json" jsonb, "jbson" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
486
+  (0.1ms) ROLLBACK
487
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
488
+ Migrating to CreateCModels (20150402125831)
489
+  (0.1ms) BEGIN
490
+  (2.0ms) CREATE TABLE "c_models" ("id" serial primary key, "json" jsonb, "jbson" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
491
+ PG::DuplicateTable: ERROR: relation "c_models" already exists
492
+ : CREATE TABLE "c_models" ("id" serial primary key, "json" jsonb, "jbson" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
493
+  (0.1ms) ROLLBACK
494
+  (0.1ms) DROP DATABASE IF EXISTS "json_column_app_development"
495
+  (0.1ms) DROP DATABASE IF EXISTS "app_test"
496
+  (855.0ms) CREATE DATABASE "json_column_app_development" ENCODING = 'unicode'
497
+  (851.6ms) CREATE DATABASE "app_test" ENCODING = 'unicode'
498
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
499
+  (27.2ms) CREATE TABLE "b_models" ("id" serial primary key, "json" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
500
+  (25.6ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "json" jsonb) 
501
+  (14.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
502
+  (14.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
503
+  (0.2ms) SELECT version FROM "schema_migrations"
504
+  (4.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150327143322')
505
+  (5.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20150317190350')
506
+  (5.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150317124232')
507
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
508
+  (39.1ms) CREATE TABLE "b_models" ("id" serial primary key, "json" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
509
+  (25.4ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "json" jsonb)
510
+  (14.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
511
+  (14.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
512
+  (0.4ms) SELECT version FROM "schema_migrations"
513
+  (3.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150327143322')
514
+  (3.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20150317190350')
515
+  (3.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150317124232')
516
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
517
+  (18.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
518
+  (18.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
519
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
520
+ Migrating to CreateTestModels (20150317124232)
521
+  (0.1ms) BEGIN
522
+  (12.1ms) CREATE TABLE "test_models" ("id" serial primary key, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
523
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317124232"]]
524
+  (3.6ms) COMMIT
525
+ Migrating to AddJsonExtension (20150317190350)
526
+  (0.1ms) BEGIN
527
+  (12.0ms) ALTER TABLE "test_models" ADD "json" jsonb
528
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150317190350"]]
529
+  (6.0ms) COMMIT
530
+ Migrating to CreateBModels (20150327143322)
531
+  (0.1ms) BEGIN
532
+  (20.6ms) CREATE TABLE "b_models" ("id" serial primary key, "json" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
533
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150327143322"]]
534
+  (3.7ms) COMMIT
535
+ Migrating to CreateCModels (20150402125831)
536
+  (0.1ms) BEGIN
537
+  (21.6ms) CREATE TABLE "c_models" ("id" serial primary key, "json" jsonb, "jbson" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
538
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150402125831"]]
539
+  (5.9ms) COMMIT
540
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
541
+  (2.5ms) 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
542
+ FROM pg_constraint c
543
+ JOIN pg_class t1 ON c.conrelid = t1.oid
544
+ JOIN pg_class t2 ON c.confrelid = t2.oid
545
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
546
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
547
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
548
+ WHERE c.contype = 'f'
549
+ AND t1.relname = 'b_models'
550
+ AND t3.nspname = ANY (current_schemas(false))
551
+ ORDER BY c.conname
552
+ 
553
+  (2.0ms) 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
554
+ FROM pg_constraint c
555
+ JOIN pg_class t1 ON c.conrelid = t1.oid
556
+ JOIN pg_class t2 ON c.confrelid = t2.oid
557
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
558
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
559
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
560
+ WHERE c.contype = 'f'
561
+ AND t1.relname = 'c_models'
562
+ AND t3.nspname = ANY (current_schemas(false))
563
+ ORDER BY c.conname
564
+
565
+  (2.4ms) 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
566
+ FROM pg_constraint c
567
+ JOIN pg_class t1 ON c.conrelid = t1.oid
568
+ JOIN pg_class t2 ON c.confrelid = t2.oid
569
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
570
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
571
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
572
+ WHERE c.contype = 'f'
573
+ AND t1.relname = 'test_models'
574
+ AND t3.nspname = ANY (current_schemas(false))
575
+ ORDER BY c.conname
576
+ 
577
+  (0.3ms) BEGIN
578
+ SQL (0.7ms) INSERT INTO "test_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 14:19:09.985240"], ["updated_at", "2015-04-02 14:19:09.985240"]]
579
+  (6.7ms) COMMIT
580
+ TestModel Load (0.2ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
581
+ TestModel Load (0.3ms) SELECT "test_models".* FROM "test_models" WHERE "test_models"."id" = $1 LIMIT 1 [["id", 1]]
582
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
583
+ Migrating to CreateDModels (20150402162627)
584
+  (0.1ms) BEGIN
585
+  (28.5ms) CREATE TABLE "d_models" ("id" serial primary key, "arr" jsonb, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
586
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150402162627"]]
587
+  (5.5ms) COMMIT
588
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
589
+  (3.5ms) 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
590
+ FROM pg_constraint c
591
+ JOIN pg_class t1 ON c.conrelid = t1.oid
592
+ JOIN pg_class t2 ON c.confrelid = t2.oid
593
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
594
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
595
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
596
+ WHERE c.contype = 'f'
597
+ AND t1.relname = 'b_models'
598
+ AND t3.nspname = ANY (current_schemas(false))
599
+ ORDER BY c.conname
600
+ 
601
+  (2.7ms) 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
602
+ FROM pg_constraint c
603
+ JOIN pg_class t1 ON c.conrelid = t1.oid
604
+ JOIN pg_class t2 ON c.confrelid = t2.oid
605
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
606
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
607
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
608
+ WHERE c.contype = 'f'
609
+ AND t1.relname = 'c_models'
610
+ AND t3.nspname = ANY (current_schemas(false))
611
+ ORDER BY c.conname
612
+
613
+  (2.5ms) 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
614
+ FROM pg_constraint c
615
+ JOIN pg_class t1 ON c.conrelid = t1.oid
616
+ JOIN pg_class t2 ON c.confrelid = t2.oid
617
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
618
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
619
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
620
+ WHERE c.contype = 'f'
621
+ AND t1.relname = 'd_models'
622
+ AND t3.nspname = ANY (current_schemas(false))
623
+ ORDER BY c.conname
624
+ 
625
+  (2.1ms) 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
626
+ FROM pg_constraint c
627
+ JOIN pg_class t1 ON c.conrelid = t1.oid
628
+ JOIN pg_class t2 ON c.confrelid = t2.oid
629
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
630
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
631
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
632
+ WHERE c.contype = 'f'
633
+ AND t1.relname = 'test_models'
634
+ AND t3.nspname = ANY (current_schemas(false))
635
+ ORDER BY c.conname
636
+
637
+  (0.2ms) BEGIN
638
+ SQL (0.6ms) INSERT INTO "d_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 16:29:08.133448"], ["updated_at", "2015-04-02 16:29:08.133448"]]
639
+  (3.9ms) COMMIT
640
+ DModel Load (0.8ms) SELECT "d_models".* FROM "d_models" ORDER BY "d_models"."id" ASC LIMIT 1
641
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" ORDER BY "d_models"."id" ASC LIMIT 1
642
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" ORDER BY "d_models"."id" ASC LIMIT 1
643
+  (0.2ms) BEGIN
644
+  (0.1ms) COMMIT
645
+ DModel Load (0.3ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 1]]
646
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 1]]
647
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 1]]
648
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 1]]
649
+  (0.2ms) BEGIN
650
+ SQL (0.4ms) INSERT INTO "d_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 16:51:08.212360"], ["updated_at", "2015-04-02 16:51:08.212360"]]
651
+  (4.8ms) COMMIT
652
+ DModel Load (0.3ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 2]]
653
+ DModel Load (0.3ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 2]]
654
+ DModel Load (0.3ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 2]]
655
+  (0.2ms) BEGIN
656
+  (0.3ms) ROLLBACK
657
+  (0.2ms) BEGIN
658
+  (0.2ms) ROLLBACK
659
+  (0.2ms) BEGIN
660
+  (0.2ms) ROLLBACK
661
+  (0.2ms) BEGIN
662
+  (0.2ms) ROLLBACK
663
+  (0.3ms) BEGIN
664
+  (0.3ms) ROLLBACK
665
+  (0.3ms) BEGIN
666
+ SQL (0.4ms) INSERT INTO "test_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 17:41:14.973837"], ["updated_at", "2015-04-02 17:41:14.973837"]]
667
+  (3.6ms) COMMIT
668
+  (0.3ms) BEGIN
669
+ SQL (0.3ms) INSERT INTO "d_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 17:43:58.019194"], ["updated_at", "2015-04-02 17:43:58.019194"]]
670
+  (6.1ms) COMMIT
671
+ DModel Load (0.3ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 3]]
672
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 3]]
673
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 3]]
674
+  (0.2ms) BEGIN
675
+ SQL (0.5ms) INSERT INTO "d_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 20:12:11.533128"], ["updated_at", "2015-04-02 20:12:11.533128"]]
676
+  (4.7ms) COMMIT
677
+  (0.2ms) BEGIN
678
+ SQL (4.6ms) INSERT INTO "d_models" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-04-02 21:28:26.265823"], ["updated_at", "2015-04-02 21:28:26.265823"]]
679
+  (4.0ms) COMMIT
680
+ DModel Load (0.4ms) SELECT "d_models".* FROM "d_models" WHERE "d_models"."id" = $1 LIMIT 1 [["id", 5]]