views 0.0.1 → 4.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -19
  3. data/lib/generators/view/templates/migration.rb +5 -0
  4. data/lib/generators/{views → view}/templates/view.sql +0 -0
  5. data/lib/generators/view/view_generator.rb +24 -0
  6. data/lib/views.rb +7 -50
  7. data/lib/views/extensions/active_record/abstract_adapter.rb +17 -0
  8. data/lib/views/extensions/active_record/command_recorder.rb +26 -0
  9. data/lib/views/extensions/active_record/postgresql_adapter.rb +39 -0
  10. data/lib/views/extensions/active_record/schema_dumper.rb +28 -0
  11. data/lib/views/railtie.rb +17 -0
  12. data/lib/views/version.rb +3 -1
  13. data/test/dummy/bin/bundle +1 -0
  14. data/test/dummy/bin/rails +1 -0
  15. data/test/dummy/bin/rake +1 -0
  16. data/test/dummy/bin/setup +2 -1
  17. data/test/dummy/config/database.yml +2 -5
  18. data/test/dummy/config/database.yml.travis +2 -11
  19. data/test/dummy/config/environments/development.rb +1 -1
  20. data/test/dummy/config/environments/production.rb +1 -1
  21. data/test/dummy/config/environments/test.rb +2 -2
  22. data/test/dummy/config/initializers/mime_types.rb +1 -1
  23. data/test/dummy/config/secrets.yml +2 -2
  24. data/test/dummy/db/migrate/20161125151623_create_guitars_view.rb +5 -0
  25. data/test/dummy/db/schema.rb +3 -1
  26. data/test/dummy/db/views/guitars.sql +2 -2
  27. data/test/dummy/log/development.log +2897 -24
  28. data/test/dummy/log/test.log +1545 -915
  29. data/test/dummy/public/404.html +57 -63
  30. data/test/dummy/public/422.html +57 -63
  31. data/test/dummy/public/500.html +56 -62
  32. data/test/{generators_test.rb → generator_test.rb} +4 -4
  33. data/test/migration_test.rb +20 -0
  34. data/test/task_test.rb +25 -0
  35. metadata +19 -10
  36. data/lib/generators/views/view_generator.rb +0 -15
  37. data/lib/tasks/views.rake +0 -7
  38. data/test/tasks_test.rb +0 -28
@@ -1,1138 +1,1768 @@
1
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
2
-  (177.5ms) DROP DATABASE IF EXISTS "slugs_test"
3
-  (414.3ms) CREATE DATABASE "slugs_test" ENCODING = 'utf8'
4
-  (181.4ms) DROP DATABASE IF EXISTS "sql_views_test"
5
-  (402.8ms) CREATE DATABASE "sql_views_test" ENCODING = 'utf8'
6
- SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
7
-  (3.7ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying, "enabled" boolean, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
8
-  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
9
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
10
-  (0.2ms) SELECT version FROM "schema_migrations"
11
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
12
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
-  (0.3ms) BEGIN
14
- ----------------------
15
- ViewsTest: test_update
16
- ----------------------
17
-  (0.1ms) SAVEPOINT active_record_1
18
- SQL (0.5ms) INSERT INTO "users" ("name", "enabled", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "John"], ["enabled", "t"], ["created_at", "2016-10-17 17:41:06.569048"], ["updated_at", "2016-10-17 17:41:06.569048"]]
19
-  (0.1ms) RELEASE SAVEPOINT active_record_1
20
-  (0.1ms) SAVEPOINT active_record_1
21
- SQL (0.2ms) INSERT INTO "users" ("name", "enabled", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Mike"], ["enabled", "f"], ["created_at", "2016-10-17 17:41:06.573626"], ["updated_at", "2016-10-17 17:41:06.573626"]]
22
-  (0.1ms) RELEASE SAVEPOINT active_record_1
23
-  (18.2ms) DROP VIEW IF EXISTS enabled_users
24
-  (6.7ms) CREATE VIEW enabled_users AS
25
-
1
+  (113.9ms) DROP DATABASE IF EXISTS "views_test"
2
+  (341.4ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
3
+ SQL (1.0ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
4
+  (8.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
5
+  (0.3ms) DROP VIEW IF EXISTS guitars
6
+  (13.5ms) CREATE VIEW guitars AS
26
7
  SELECT
27
- users.name
8
+ *
28
9
  FROM
29
- users
10
+ products
30
11
  WHERE
31
- users.enabled = 1
12
+ category = 'Guitar'
32
13
 
33
-  (0.1ms) ROLLBACK
34
-  (180.0ms) DROP DATABASE IF EXISTS "sql_views_test"
35
-  (361.0ms) CREATE DATABASE "sql_views_test" ENCODING = 'utf8'
36
- SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
37
-  (3.9ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
38
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
14
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
39
15
   (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
40
-  (0.3ms) SELECT version FROM "schema_migrations"
41
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
16
+  (0.2ms) SELECT version FROM "schema_migrations"
17
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
18
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
42
19
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
20
+  (5.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
21
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
22
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
23
+ Migrating to CreateProducts (20161017172847)
43
24
   (0.2ms) BEGIN
44
- ----------------------
45
- ViewsTest: test_update
46
- ----------------------
47
-  (0.1ms) SAVEPOINT active_record_1
48
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:45:43.742379"], ["updated_at", "2016-10-17 17:45:43.742379"]]
49
-  (0.2ms) RELEASE SAVEPOINT active_record_1
50
-  (0.2ms) SAVEPOINT active_record_1
51
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:45:43.747000"], ["updated_at", "2016-10-17 17:45:43.747000"]]
52
-  (0.2ms) RELEASE SAVEPOINT active_record_1
53
-  (0.3ms) DROP VIEW IF EXISTS guitars
54
-  (1.3ms) CREATE VIEW guitars AS
55
-
25
+  (3.7ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
26
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
27
+  (0.4ms) COMMIT
28
+ Migrating to CreateGuitarsView (20161125151623)
29
+  (0.2ms) BEGIN
30
+  (1.2ms) CREATE VIEW guitars AS
56
31
  SELECT
57
- products.*
32
+ *
58
33
  FROM
59
34
  products
60
35
  WHERE
61
- products.category = 'Guitar'
36
+ category = 'Guitar'
37
+ 
38
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
39
+  (0.3ms) COMMIT
40
+ Migrating to ChangeGuitarsView (20161126212242)
41
+  (0.1ms) BEGIN
42
+  (0.7ms) DROP VIEW guitars
43
+  (0.8ms) CREATE VIEW guitars AS
44
+ SELECT
45
+ *
46
+ FROM
47
+ products
48
+ WHERE
49
+ category = 'Guitar'
62
50
 
63
-  (6.3ms) SLECT COUNT(*) FROM guitars
64
-  (0.1ms) ROLLBACK
51
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161126212242"]]
52
+  (0.3ms) COMMIT
53
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
54
+  (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
55
+ FROM pg_constraint c
56
+ JOIN pg_class t1 ON c.conrelid = t1.oid
57
+ JOIN pg_class t2 ON c.confrelid = t2.oid
58
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
59
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
60
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
61
+ WHERE c.contype = 'f'
62
+ AND t1.relname = 'products'
63
+ AND t3.nspname = ANY (current_schemas(false))
64
+ ORDER BY c.conname
65
+
66
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
67
+ FROM pg_class c
68
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
69
+ WHERE c.relkind IN ('v')
70
+ AND n.nspname = ANY (current_schemas(false))
71
+ ORDER BY c.oid ASC
72
+ 
73
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
65
74
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
75
   (0.2ms) BEGIN
67
- ----------------------
68
- ViewsTest: test_update
69
- ----------------------
70
-  (0.2ms) SAVEPOINT active_record_1
71
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:45:53.861858"], ["updated_at", "2016-10-17 17:45:53.861858"]]
72
-  (0.1ms) RELEASE SAVEPOINT active_record_1
76
+ --------------------------
77
+ MigrationTest: test_column
78
+ --------------------------
79
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
80
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
81
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
82
+ Migrating to ChangeGuitarsView (20161126212242)
73
83
   (0.1ms) SAVEPOINT active_record_1
74
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:45:53.865026"], ["updated_at", "2016-10-17 17:45:53.865026"]]
75
-  (0.1ms) RELEASE SAVEPOINT active_record_1
76
-  (0.3ms) SELECT COUNT(*) FROM guitars
84
+  (10.7ms) ROLLBACK TO SAVEPOINT active_record_1
77
85
   (0.1ms) ROLLBACK
78
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
79
-  (0.2ms) BEGIN
80
- ----------------------
81
- ViewsTest: test_update
82
- ----------------------
83
-  (0.1ms) SAVEPOINT active_record_1
84
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:46:37.264949"], ["updated_at", "2016-10-17 17:46:37.264949"]]
86
+  (0.1ms) BEGIN
87
+ -----------------------------------
88
+ GeneratorTest: test_file_generation
89
+ -----------------------------------
90
+  (0.1ms) ROLLBACK
91
+  (0.1ms) BEGIN
92
+ -------------------
93
+ TaskTest: test_load
94
+ -------------------
95
+  (0.1ms) ROLLBACK
96
+  (0.1ms) BEGIN
97
+ -------------------
98
+ TaskTest: test_dump
99
+ -------------------
100
+  (0.1ms) ROLLBACK
101
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
102
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
103
+  (0.3ms) BEGIN
104
+ -------------------
105
+ TaskTest: test_load
106
+ -------------------
107
+  (0.2ms) ROLLBACK
108
+  (0.1ms) BEGIN
109
+ -------------------
110
+ TaskTest: test_dump
111
+ -------------------
112
+  (0.1ms) ROLLBACK
113
+  (0.1ms) BEGIN
114
+ --------------------------
115
+ MigrationTest: test_column
116
+ --------------------------
117
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
118
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
119
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
120
+ Migrating to CreateGuitarsView (20161125151623)
121
+  (0.2ms) SAVEPOINT active_record_1
122
+  (6.3ms) DROP VIEW guitars
123
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
85
124
   (0.1ms) RELEASE SAVEPOINT active_record_1
125
+ Migrating to CreateProducts (20161017172847)
86
126
   (0.1ms) SAVEPOINT active_record_1
87
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:46:37.268535"], ["updated_at", "2016-10-17 17:46:37.268535"]]
127
+  (0.7ms) DROP TABLE "products"
128
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
129
+  (0.1ms) RELEASE SAVEPOINT active_record_1
130
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
131
+ Migrating to CreateProducts (20161017172847)
132
+  (0.1ms) SAVEPOINT active_record_1
133
+  (14.6ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
134
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
88
135
   (0.1ms) RELEASE SAVEPOINT active_record_1
89
-  (0.2ms) DROP VIEW IF EXISTS guitars
90
-  (1.3ms) CREATE VIEW guitars AS
91
-
136
+ Migrating to CreateGuitarsView (20161125151623)
137
+  (0.2ms) SAVEPOINT active_record_1
138
+  (2.9ms) CREATE VIEW guitars AS
92
139
  SELECT
93
- products.*
140
+ *
94
141
  FROM
95
142
  products
96
143
  WHERE
97
- products.category = 'Guitar'
144
+ category = 'Guitar'
98
145
 
99
-  (0.4ms) SELECT COUNT(*) FROM guitars
100
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
146
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
147
+  (0.1ms) RELEASE SAVEPOINT active_record_1
148
+  (15.5ms) ROLLBACK
149
+  (0.1ms) BEGIN
150
+ -----------------------------------
151
+ GeneratorTest: test_file_generation
152
+ -----------------------------------
153
+  (3.5ms) ROLLBACK
154
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
101
155
   (0.2ms) BEGIN
102
- ----------------------
103
- ViewsTest: test_update
104
- ----------------------
105
-  (0.1ms) SAVEPOINT active_record_1
106
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:47:39.252052"], ["updated_at", "2016-10-17 17:47:39.252052"]]
156
+ --------------------------
157
+ MigrationTest: test_column
158
+ --------------------------
159
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
160
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
161
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
162
+ Migrating to CreateGuitarsView (20161125151623)
163
+  (0.1ms) SAVEPOINT active_record_1
164
+  (0.8ms) DROP VIEW guitars
165
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
107
166
   (0.1ms) RELEASE SAVEPOINT active_record_1
167
+ Migrating to CreateProducts (20161017172847)
108
168
   (0.1ms) SAVEPOINT active_record_1
109
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:47:39.255116"], ["updated_at", "2016-10-17 17:47:39.255116"]]
169
+  (0.7ms) DROP TABLE "products"
170
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
171
+  (0.1ms) RELEASE SAVEPOINT active_record_1
172
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
173
+ Migrating to CreateProducts (20161017172847)
174
+  (0.1ms) SAVEPOINT active_record_1
175
+  (13.2ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
176
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
177
+  (0.2ms) RELEASE SAVEPOINT active_record_1
178
+ Migrating to CreateGuitarsView (20161125151623)
179
+  (0.1ms) SAVEPOINT active_record_1
180
+  (1.9ms) CREATE VIEW guitars AS
181
+ SELECT
182
+ *
183
+ FROM
184
+ products
185
+ WHERE
186
+ category = 'Guitar'
187
+
188
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
110
189
   (0.1ms) RELEASE SAVEPOINT active_record_1
111
-  (0.3ms) SELECT COUNT(*) FROM guitars
112
-  (0.1ms) ROLLBACK
190
+  (6.2ms) ROLLBACK
191
+  (0.1ms) BEGIN
192
+ -----------------------------------
193
+ GeneratorTest: test_file_generation
194
+ -----------------------------------
195
+  (0.4ms) ROLLBACK
196
+  (0.1ms) BEGIN
197
+ -------------------
198
+ TaskTest: test_load
199
+ -------------------
200
+  (114.0ms) DROP DATABASE IF EXISTS "views_test"
201
+  (332.0ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
113
202
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
114
203
   (0.2ms) BEGIN
115
- ----------------------
116
- ViewsTest: test_update
117
- ----------------------
118
-  (0.1ms) SAVEPOINT active_record_1
119
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:47:49.005223"], ["updated_at", "2016-10-17 17:47:49.005223"]]
204
+ --------------------------
205
+ MigrationTest: test_column
206
+ --------------------------
207
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
208
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
209
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
210
+ Migrating to CreateGuitarsView (20161125151623)
211
+  (0.1ms) SAVEPOINT active_record_1
212
+  (28.3ms) DROP VIEW guitars
213
+ SQL (7.0ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
120
214
   (0.1ms) RELEASE SAVEPOINT active_record_1
215
+ Migrating to CreateProducts (20161017172847)
121
216
   (0.1ms) SAVEPOINT active_record_1
122
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:47:49.009281"], ["updated_at", "2016-10-17 17:47:49.009281"]]
217
+  (0.7ms) DROP TABLE "products"
218
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
219
+  (0.2ms) RELEASE SAVEPOINT active_record_1
220
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
221
+ Migrating to CreateProducts (20161017172847)
222
+  (0.1ms) SAVEPOINT active_record_1
223
+  (13.3ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
224
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
123
225
   (0.1ms) RELEASE SAVEPOINT active_record_1
124
-  (0.3ms) SELECT COUNT(*) FROM guitars
125
-  (0.1ms) ROLLBACK
126
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
127
-  (0.2ms) BEGIN
128
- ----------------------
129
- ViewsTest: test_update
130
- ----------------------
226
+ Migrating to CreateGuitarsView (20161125151623)
131
227
   (0.1ms) SAVEPOINT active_record_1
132
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:48:15.525408"], ["updated_at", "2016-10-17 17:48:15.525408"]]
133
-  (0.1ms) RELEASE SAVEPOINT active_record_1
134
-  (0.1ms) SAVEPOINT active_record_1
135
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:48:15.528578"], ["updated_at", "2016-10-17 17:48:15.528578"]]
136
-  (0.2ms) RELEASE SAVEPOINT active_record_1
137
-  (0.2ms) DROP VIEW IF EXISTS guitars
138
-  (1.3ms) CREATE VIEW guitars AS
139
-
228
+  (0.8ms) CREATE VIEW guitars AS
140
229
  SELECT
141
- products.*
230
+ *
142
231
  FROM
143
232
  products
144
233
  WHERE
145
- products.category = 'Guitar'
234
+ category = 'Guitar'
146
235
 
147
-  (0.2ms) SELECT COUNT(*) FROM guitars
148
-  (0.2ms) ROLLBACK
149
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
150
-  (0.2ms) BEGIN
151
- ----------------------
152
- TasksTest: test_update
153
- ----------------------
236
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
237
+  (0.1ms) RELEASE SAVEPOINT active_record_1
238
+  (6.1ms) ROLLBACK
239
+  (0.1ms) BEGIN
240
+ -----------------------------------
241
+ GeneratorTest: test_file_generation
242
+ -----------------------------------
154
243
   (0.2ms) ROLLBACK
155
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
156
-  (0.2ms) BEGIN
157
- ----------------------
158
- TasksTest: test_update
159
- ----------------------
160
-  (0.3ms) DROP VIEW IF EXISTS guitars
161
-  (1.4ms) CREATE VIEW guitars AS
162
-
244
+  (0.1ms) BEGIN
245
+ -------------------
246
+ TaskTest: test_load
247
+ -------------------
248
+  (112.7ms) DROP DATABASE IF EXISTS "views_test"
249
+  (268.2ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
250
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
251
+  (5.6ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
252
+  (0.2ms) DROP VIEW IF EXISTS guitars
253
+  (1.6ms) CREATE VIEW guitars AS
163
254
  SELECT
164
- products.*
255
+ *
165
256
  FROM
166
257
  products
167
258
  WHERE
168
- products.category = 'Guitar'
259
+ category = 'Guitar'
169
260
 
170
-  (0.1ms) SAVEPOINT active_record_1
171
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:53:00.487088"], ["updated_at", "2016-10-17 17:53:00.487088"]]
172
-  (0.1ms) RELEASE SAVEPOINT active_record_1
173
-  (0.1ms) SAVEPOINT active_record_1
174
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:53:00.491383"], ["updated_at", "2016-10-17 17:53:00.491383"]]
175
-  (0.1ms) RELEASE SAVEPOINT active_record_1
176
-  (0.3ms) SELECT COUNT(*) FROM guitars
177
-  (0.2ms) ROLLBACK
178
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
179
-  (0.4ms) BEGIN
180
- ----------------------
181
- TasksTest: test_update
182
- ----------------------
261
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
262
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
263
+  (0.3ms) SELECT version FROM "schema_migrations"
264
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
265
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
266
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
267
+  (1.0ms)  SELECT c.relname as name, c.relkind AS type
268
+ FROM pg_class c
269
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
270
+ WHERE c.relkind IN ('v')
271
+ AND n.nspname = ANY (current_schemas(false))
272
+ ORDER BY c.oid ASC
273
+ 
274
+  (0.1ms) BEGIN
275
+ -------------------
276
+ TaskTest: test_dump
277
+ -------------------
278
+  (0.2ms) ROLLBACK
279
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
280
+  (0.3ms) BEGIN
281
+ -------------------
282
+ TaskTest: test_load
283
+ -------------------
284
+  (112.5ms) DROP DATABASE IF EXISTS "views_test"
285
+  (369.0ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
286
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
287
+  (5.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
183
288
   (0.3ms) DROP VIEW IF EXISTS guitars
184
-  (1.6ms) CREATE VIEW guitars AS
185
-
289
+  (1.5ms) CREATE VIEW guitars AS
186
290
  SELECT
187
- products.*
291
+ *
188
292
  FROM
189
293
  products
190
294
  WHERE
191
- products.category = 'Guitar'
295
+ category = 'Guitar'
192
296
 
193
-  (0.2ms) SAVEPOINT active_record_1
194
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 17:53:15.653556"], ["updated_at", "2016-10-17 17:53:15.653556"]]
195
-  (0.1ms) RELEASE SAVEPOINT active_record_1
196
-  (0.2ms) SAVEPOINT active_record_1
197
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 17:53:15.657449"], ["updated_at", "2016-10-17 17:53:15.657449"]]
198
-  (0.2ms) RELEASE SAVEPOINT active_record_1
199
-  (0.3ms) SELECT COUNT(*) FROM guitars
200
-  (0.2ms) ROLLBACK
201
- ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
202
-  (0.2ms) BEGIN
203
- ----------------------
204
- TasksTest: test_update
205
- ----------------------
206
-  (0.3ms) SAVEPOINT active_record_1
207
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:10:18.627497"], ["updated_at", "2016-10-17 18:10:18.627497"]]
297
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
298
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
299
+  (0.3ms) SELECT version FROM "schema_migrations"
300
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
301
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
302
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
303
+  (0.9ms)  SELECT c.relname as name, c.relkind AS type
304
+ FROM pg_class c
305
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
306
+ WHERE c.relkind IN ('v')
307
+ AND n.nspname = ANY (current_schemas(false))
308
+ ORDER BY c.oid ASC
309
+ 
310
+  (0.1ms) BEGIN
311
+ -------------------
312
+ TaskTest: test_dump
313
+ -------------------
314
+ ActiveRecord::SchemaMigration Load (1.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
315
+  (2.3ms) 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
316
+ FROM pg_constraint c
317
+ JOIN pg_class t1 ON c.conrelid = t1.oid
318
+ JOIN pg_class t2 ON c.confrelid = t2.oid
319
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
320
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
321
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
322
+ WHERE c.contype = 'f'
323
+ AND t1.relname = 'products'
324
+ AND t3.nspname = ANY (current_schemas(false))
325
+ ORDER BY c.conname
326
+
327
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
328
+ FROM pg_class c
329
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
330
+ WHERE c.relkind IN ('v')
331
+ AND n.nspname = ANY (current_schemas(false))
332
+ ORDER BY c.oid ASC
333
+ 
334
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
335
+  (1.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
336
+ FROM pg_constraint c
337
+ JOIN pg_class t1 ON c.conrelid = t1.oid
338
+ JOIN pg_class t2 ON c.confrelid = t2.oid
339
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
340
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
341
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
342
+ WHERE c.contype = 'f'
343
+ AND t1.relname = 'products'
344
+ AND t3.nspname = ANY (current_schemas(false))
345
+ ORDER BY c.conname
346
+ 
347
+  (0.5ms) SELECT c.relname as name, c.relkind AS type
348
+ FROM pg_class c
349
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
350
+ WHERE c.relkind IN ('v')
351
+ AND n.nspname = ANY (current_schemas(false))
352
+ ORDER BY c.oid ASC
353
+
354
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
355
+  (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
356
+ FROM pg_constraint c
357
+ JOIN pg_class t1 ON c.conrelid = t1.oid
358
+ JOIN pg_class t2 ON c.confrelid = t2.oid
359
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
360
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
361
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
362
+ WHERE c.contype = 'f'
363
+ AND t1.relname = 'products'
364
+ AND t3.nspname = ANY (current_schemas(false))
365
+ ORDER BY c.conname
366
+
367
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
368
+ FROM pg_class c
369
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
370
+ WHERE c.relkind IN ('v')
371
+ AND n.nspname = ANY (current_schemas(false))
372
+ ORDER BY c.oid ASC
373
+ 
374
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
375
+  (1.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
376
+ FROM pg_constraint c
377
+ JOIN pg_class t1 ON c.conrelid = t1.oid
378
+ JOIN pg_class t2 ON c.confrelid = t2.oid
379
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
380
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
381
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
382
+ WHERE c.contype = 'f'
383
+ AND t1.relname = 'products'
384
+ AND t3.nspname = ANY (current_schemas(false))
385
+ ORDER BY c.conname
386
+ 
387
+  (0.4ms) SELECT c.relname as name, c.relkind AS type
388
+ FROM pg_class c
389
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
390
+ WHERE c.relkind IN ('v')
391
+ AND n.nspname = ANY (current_schemas(false))
392
+ ORDER BY c.oid ASC
393
+
394
+  (0.2ms) ROLLBACK
395
+  (0.1ms) BEGIN
396
+ -----------------------------------
397
+ GeneratorTest: test_file_generation
398
+ -----------------------------------
399
+  (0.2ms) ROLLBACK
400
+  (0.1ms) BEGIN
401
+ --------------------------
402
+ MigrationTest: test_column
403
+ --------------------------
404
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
405
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
406
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
407
+ Migrating to CreateGuitarsView (20161125151623)
408
+  (0.4ms) SAVEPOINT active_record_1
409
+  (18.9ms) DROP VIEW guitars
410
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
208
411
   (0.1ms) RELEASE SAVEPOINT active_record_1
412
+ Migrating to CreateProducts (20161017172847)
209
413
   (0.1ms) SAVEPOINT active_record_1
210
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:10:18.631851"], ["updated_at", "2016-10-17 18:10:18.631851"]]
211
-  (0.1ms) RELEASE SAVEPOINT active_record_1
212
-  (6.8ms) SELECT COUNT(*) FROM guitars
213
-  (0.1ms) ROLLBACK
214
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
215
-  (0.2ms) BEGIN
216
- ----------------------
217
- TasksTest: test_update
218
- ----------------------
219
-  (0.1ms) SAVEPOINT active_record_1
220
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:11:02.587072"], ["updated_at", "2016-10-17 18:11:02.587072"]]
414
+  (0.6ms) DROP TABLE "products"
415
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
221
416
   (0.1ms) RELEASE SAVEPOINT active_record_1
222
-  (0.1ms) SAVEPOINT active_record_1
223
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:11:02.591133"], ["updated_at", "2016-10-17 18:11:02.591133"]]
224
-  (0.1ms) RELEASE SAVEPOINT active_record_1
225
-  (6.5ms) SELECT COUNT(*) FROM guitars
226
-  (0.2ms) ROLLBACK
227
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
228
-  (0.2ms) BEGIN
229
- ----------------------
230
- TasksTest: test_update
231
- ----------------------
417
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
418
+ Migrating to CreateProducts (20161017172847)
232
419
   (0.2ms) SAVEPOINT active_record_1
233
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:29:35.368846"], ["updated_at", "2016-10-17 18:29:35.368846"]]
234
-  (0.1ms) RELEASE SAVEPOINT active_record_1
235
-  (0.1ms) SAVEPOINT active_record_1
236
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:29:35.373130"], ["updated_at", "2016-10-17 18:29:35.373130"]]
420
+  (12.7ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
421
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
237
422
   (0.1ms) RELEASE SAVEPOINT active_record_1
238
-  (6.3ms) SELECT COUNT(*) FROM guitars
239
-  (0.2ms) ROLLBACK
240
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
241
-  (0.2ms) BEGIN
242
- ----------------------
243
- TasksTest: test_update
244
- ----------------------
245
-  (0.1ms) SAVEPOINT active_record_1
246
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:29:57.654568"], ["updated_at", "2016-10-17 18:29:57.654568"]]
247
-  (0.2ms) RELEASE SAVEPOINT active_record_1
248
-  (0.2ms) SAVEPOINT active_record_1
249
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:29:57.659021"], ["updated_at", "2016-10-17 18:29:57.659021"]]
250
-  (0.2ms) RELEASE SAVEPOINT active_record_1
251
-  (6.4ms) SELECT COUNT(*) FROM guitars
252
-  (0.2ms) ROLLBACK
253
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
254
-  (0.2ms) BEGIN
255
- ----------------------
256
- TasksTest: test_update
257
- ----------------------
423
+ Migrating to CreateGuitarsView (20161125151623)
258
424
   (0.1ms) SAVEPOINT active_record_1
259
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:30:52.968188"], ["updated_at", "2016-10-17 18:30:52.968188"]]
260
-  (0.2ms) RELEASE SAVEPOINT active_record_1
261
-  (0.1ms) SAVEPOINT active_record_1
262
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:30:52.972337"], ["updated_at", "2016-10-17 18:30:52.972337"]]
263
-  (0.2ms) RELEASE SAVEPOINT active_record_1
264
-  (6.6ms) SELECT COUNT(*) FROM guitars
265
-  (0.1ms) ROLLBACK
266
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
267
-  (0.2ms) BEGIN
268
- ----------------------
269
- TasksTest: test_update
270
- ----------------------
271
-  (0.1ms) SAVEPOINT active_record_1
272
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:31:06.457128"], ["updated_at", "2016-10-17 18:31:06.457128"]]
273
-  (0.1ms) RELEASE SAVEPOINT active_record_1
274
-  (0.2ms) SAVEPOINT active_record_1
275
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:31:06.461286"], ["updated_at", "2016-10-17 18:31:06.461286"]]
425
+  (0.7ms) CREATE VIEW guitars AS
426
+ SELECT
427
+ *
428
+ FROM
429
+ products
430
+ WHERE
431
+ category = 'Guitar'
432
+
433
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
276
434
   (0.1ms) RELEASE SAVEPOINT active_record_1
277
-  (6.6ms) SELECT COUNT(*) FROM guitars
278
-  (0.3ms) DROP VIEW IF EXISTS guitars
279
-  (0.2ms) ROLLBACK
280
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
435
+  (6.0ms) ROLLBACK
436
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
281
437
   (0.2ms) BEGIN
282
- ----------------------
283
- TasksTest: test_update
284
- ----------------------
285
-  (0.1ms) SAVEPOINT active_record_1
286
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:32:11.889772"], ["updated_at", "2016-10-17 18:32:11.889772"]]
287
-  (0.1ms) RELEASE SAVEPOINT active_record_1
288
-  (0.1ms) SAVEPOINT active_record_1
289
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:32:11.893827"], ["updated_at", "2016-10-17 18:32:11.893827"]]
290
-  (0.1ms) RELEASE SAVEPOINT active_record_1
291
-  (6.6ms) SELECT COUNT(*) FROM guitars
292
-  (0.3ms) DROP VIEW guitars IF EXISTS
438
+ -----------------------------------
439
+ GeneratorTest: test_file_generation
440
+ -----------------------------------
293
441
   (0.2ms) ROLLBACK
442
+  (0.1ms) BEGIN
443
+ -------------------
444
+ TaskTest: test_dump
445
+ -------------------
294
446
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
295
-  (0.2ms) BEGIN
296
- ----------------------
297
- TasksTest: test_update
298
- ----------------------
447
+  (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
448
+ FROM pg_constraint c
449
+ JOIN pg_class t1 ON c.conrelid = t1.oid
450
+ JOIN pg_class t2 ON c.confrelid = t2.oid
451
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
452
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
453
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
454
+ WHERE c.contype = 'f'
455
+ AND t1.relname = 'products'
456
+ AND t3.nspname = ANY (current_schemas(false))
457
+ ORDER BY c.conname
458
+
459
+  (0.4ms)  SELECT c.relname as name, c.relkind AS type
460
+ FROM pg_class c
461
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
462
+ WHERE c.relkind IN ('v')
463
+ AND n.nspname = ANY (current_schemas(false))
464
+ ORDER BY c.oid ASC
465
+ 
466
+  (0.1ms) ROLLBACK
467
+  (0.1ms) BEGIN
468
+ -------------------
469
+ TaskTest: test_load
470
+ -------------------
471
+  (110.8ms) DROP DATABASE IF EXISTS "views_test"
472
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
473
+  (289.8ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
474
+  (0.6ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
475
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
476
+  (5.0ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
477
+  (0.4ms) DROP VIEW IF EXISTS guitars
478
+  (8.0ms) CREATE VIEW guitars AS
479
+ SELECT
480
+ *
481
+ FROM
482
+ products
483
+ WHERE
484
+ category = 'Guitar'
485
+ 
486
+  (12.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
487
+  (4.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
488
+  (0.3ms) SELECT version FROM "schema_migrations"
489
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
490
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
491
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
492
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
493
+  (7.8ms) DROP TABLE "products" CASCADE
494
+  (2.7ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
495
+  (0.3ms) DROP VIEW IF EXISTS guitars
496
+  (1.5ms) CREATE VIEW guitars AS
497
+ SELECT
498
+ *
499
+ FROM
500
+ products
501
+ WHERE
502
+ category = 'Guitar'
503
+
504
+  (0.3ms) SELECT version FROM "schema_migrations"
505
+  (1.0ms) SELECT c.relname as name, c.relkind AS type
506
+ FROM pg_class c
507
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
508
+ WHERE c.relkind IN ('v')
509
+ AND n.nspname = ANY (current_schemas(false))
510
+ ORDER BY c.oid ASC
511
+
512
+  (0.1ms) BEGIN
513
+ --------------------------
514
+ MigrationTest: test_column
515
+ --------------------------
516
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
517
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
518
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
519
+ Migrating to CreateGuitarsView (20161125151623)
299
520
   (0.2ms) SAVEPOINT active_record_1
300
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:32:41.704051"], ["updated_at", "2016-10-17 18:32:41.704051"]]
301
-  (0.2ms) RELEASE SAVEPOINT active_record_1
302
-  (0.2ms) SAVEPOINT active_record_1
303
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:32:41.708326"], ["updated_at", "2016-10-17 18:32:41.708326"]]
304
-  (0.1ms) RELEASE SAVEPOINT active_record_1
305
-  (6.5ms) SELECT COUNT(*) FROM guitars
306
-  (0.3ms) DROP VIEW IF EXISTS guitars
307
-  (0.2ms) ROLLBACK
308
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
309
-  (0.2ms) BEGIN
310
- ----------------------
311
- TasksTest: test_update
312
- ----------------------
313
-  (0.1ms) SAVEPOINT active_record_1
314
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:34:43.126856"], ["updated_at", "2016-10-17 18:34:43.126856"]]
315
-  (0.2ms) RELEASE SAVEPOINT active_record_1
316
-  (0.1ms) SAVEPOINT active_record_1
317
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:34:43.131098"], ["updated_at", "2016-10-17 18:34:43.131098"]]
318
-  (0.1ms) RELEASE SAVEPOINT active_record_1
319
-  (6.4ms) SELECT COUNT(*) FROM guitars
320
-  (0.3ms) DROP VIEW IF EXISTS guitars
321
-  (0.1ms) ROLLBACK
322
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
323
-  (0.2ms) BEGIN
324
- ----------------------
325
- TasksTest: test_update
326
- ----------------------
327
-  (0.1ms) SAVEPOINT active_record_1
328
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:34:55.609565"], ["updated_at", "2016-10-17 18:34:55.609565"]]
329
-  (0.1ms) RELEASE SAVEPOINT active_record_1
330
-  (0.1ms) SAVEPOINT active_record_1
331
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:34:55.612768"], ["updated_at", "2016-10-17 18:34:55.612768"]]
521
+  (1.3ms) DROP VIEW guitars
522
+ SQL (0.5ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
332
523
   (0.1ms) RELEASE SAVEPOINT active_record_1
333
-  (0.3ms) SELECT COUNT(*) FROM guitars
334
-  (0.1ms) ROLLBACK
335
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
336
-  (0.3ms) BEGIN
337
- ----------------------
338
- TasksTest: test_update
339
- ----------------------
524
+ Migrating to CreateProducts (20161017172847)
340
525
   (0.1ms) SAVEPOINT active_record_1
341
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:35:06.067217"], ["updated_at", "2016-10-17 18:35:06.067217"]]
342
-  (0.2ms) RELEASE SAVEPOINT active_record_1
526
+  (1.0ms) DROP TABLE "products"
527
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
528
+  (0.2ms) RELEASE SAVEPOINT active_record_1
529
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
530
+ Migrating to CreateProducts (20161017172847)
343
531
   (0.1ms) SAVEPOINT active_record_1
344
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:35:06.070640"], ["updated_at", "2016-10-17 18:35:06.070640"]]
345
-  (0.1ms) RELEASE SAVEPOINT active_record_1
346
-  (0.3ms) SELECT COUNT(*) FROM guitars
347
-  (0.3ms) DROP VIEW IF EXISTS guitars
348
-  (0.2ms) ROLLBACK
349
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
350
-  (0.4ms) BEGIN
351
- ----------------------
352
- TasksTest: test_update
353
- ----------------------
354
-  (0.2ms) SAVEPOINT active_record_1
355
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:37:51.655249"], ["updated_at", "2016-10-17 18:37:51.655249"]]
532
+  (8.2ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
533
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
356
534
   (0.2ms) RELEASE SAVEPOINT active_record_1
535
+ Migrating to CreateGuitarsView (20161125151623)
357
536
   (0.1ms) SAVEPOINT active_record_1
358
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:37:51.659542"], ["updated_at", "2016-10-17 18:37:51.659542"]]
359
-  (0.2ms) RELEASE SAVEPOINT active_record_1
360
-  (8.7ms) SELECT COUNT(*) FROM guitars
361
-  (0.3ms) DROP VIEW IF EXISTS guitars
362
-  (0.1ms) ROLLBACK
363
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
364
-  (0.2ms) BEGIN
365
- ----------------------
366
- TasksTest: test_update
367
- ----------------------
368
-  (0.2ms) SAVEPOINT active_record_1
369
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:38:21.925906"], ["updated_at", "2016-10-17 18:38:21.925906"]]
537
+  (1.0ms) CREATE VIEW guitars AS
538
+ SELECT
539
+ *
540
+ FROM
541
+ products
542
+ WHERE
543
+ category = 'Guitar'
544
+ 
545
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
370
546
   (0.1ms) RELEASE SAVEPOINT active_record_1
371
-  (0.1ms) SAVEPOINT active_record_1
372
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:38:21.929877"], ["updated_at", "2016-10-17 18:38:21.929877"]]
373
-  (0.1ms) RELEASE SAVEPOINT active_record_1
374
-  (6.5ms) SELECT COUNT(*) FROM guitars
375
-  (0.2ms) DROP VIEW IF EXISTS guitars
376
-  (0.1ms) ROLLBACK
547
+  (6.1ms) ROLLBACK
377
548
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
378
549
   (0.2ms) BEGIN
379
- ----------------------
380
- TasksTest: test_update
381
- ----------------------
382
-  (0.1ms) SAVEPOINT active_record_1
383
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:38:30.982831"], ["updated_at", "2016-10-17 18:38:30.982831"]]
384
-  (0.1ms) RELEASE SAVEPOINT active_record_1
385
-  (0.1ms) SAVEPOINT active_record_1
386
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:38:30.987091"], ["updated_at", "2016-10-17 18:38:30.987091"]]
387
-  (0.1ms) RELEASE SAVEPOINT active_record_1
388
-  (6.6ms) SELECT COUNT(*) FROM guitars
389
-  (4.6ms) DROP VIEW IF EXISTS guitars
390
- ActiveRecord::SchemaMigration Load (28.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
391
-  (0.2ms) BEGIN
392
- ----------------------
393
- TasksTest: test_update
394
- ----------------------
395
-  (0.2ms) SAVEPOINT active_record_1
396
- SQL (20.0ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:43:15.466944"], ["updated_at", "2016-10-17 18:43:15.466944"]]
397
-  (0.1ms) RELEASE SAVEPOINT active_record_1
398
-  (0.1ms) SAVEPOINT active_record_1
399
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:43:15.490666"], ["updated_at", "2016-10-17 18:43:15.490666"]]
400
-  (0.1ms) RELEASE SAVEPOINT active_record_1
401
-  (0.4ms) SELECT COUNT(*) FROM guitars
402
-  (0.3ms) SELECT COUNT(*) FROM guitars
403
-  (0.1ms) ROLLBACK
550
+ -------------------
551
+ TaskTest: test_dump
552
+ -------------------
404
553
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
405
-  (0.2ms) BEGIN
406
- ----------------------
407
- TasksTest: test_update
408
- ----------------------
409
-  (0.1ms) SAVEPOINT active_record_1
410
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:43:46.281907"], ["updated_at", "2016-10-17 18:43:46.281907"]]
411
-  (0.1ms) RELEASE SAVEPOINT active_record_1
412
-  (0.2ms) SAVEPOINT active_record_1
413
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:43:46.285332"], ["updated_at", "2016-10-17 18:43:46.285332"]]
414
-  (0.1ms) RELEASE SAVEPOINT active_record_1
415
-  (0.4ms) SELECT COUNT(*) FROM guitars
416
-  (0.3ms) DROP VIEW IF EXISTS guitars
417
-  (0.2ms) ROLLBACK
418
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
419
-  (0.2ms) BEGIN
420
- ----------------------
421
- TasksTest: test_update
422
- ----------------------
423
-  (0.1ms) SAVEPOINT active_record_1
424
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:44:12.050055"], ["updated_at", "2016-10-17 18:44:12.050055"]]
425
-  (0.1ms) RELEASE SAVEPOINT active_record_1
426
-  (0.1ms) SAVEPOINT active_record_1
427
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:44:12.053579"], ["updated_at", "2016-10-17 18:44:12.053579"]]
428
-  (0.3ms) RELEASE SAVEPOINT active_record_1
429
-  (6.5ms) DROP VIEW IF EXISTS guitars
430
-  (37.3ms) CREATE VIEW guitars AS
431
-
554
+  (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
555
+ FROM pg_constraint c
556
+ JOIN pg_class t1 ON c.conrelid = t1.oid
557
+ JOIN pg_class t2 ON c.confrelid = t2.oid
558
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
559
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
560
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
561
+ WHERE c.contype = 'f'
562
+ AND t1.relname = 'products'
563
+ AND t3.nspname = ANY (current_schemas(false))
564
+ ORDER BY c.conname
565
+
566
+  (0.4ms)  SELECT c.relname as name, c.relkind AS type
567
+ FROM pg_class c
568
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
569
+ WHERE c.relkind IN ('v')
570
+ AND n.nspname = ANY (current_schemas(false))
571
+ ORDER BY c.oid ASC
572
+ 
573
+  (0.2ms) ROLLBACK
574
+  (0.1ms) BEGIN
575
+ -------------------
576
+ TaskTest: test_load
577
+ -------------------
578
+  (111.6ms) DROP DATABASE IF EXISTS "views_test"
579
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
580
+  (266.8ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
581
+  (0.7ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
582
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
583
+  (4.7ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
584
+  (0.4ms) DROP VIEW IF EXISTS guitars
585
+  (7.9ms) CREATE VIEW guitars AS
432
586
  SELECT
433
- products.*
587
+ *
434
588
  FROM
435
589
  products
436
590
  WHERE
437
- products.category = 'Guitar'
438
-
439
-  (1.1ms) SELECT COUNT(*) FROM guitars
440
-  (0.2ms) ROLLBACK
441
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
442
-  (0.3ms) BEGIN
443
- ----------------------
444
- TasksTest: test_update
445
- ----------------------
446
-  (0.2ms) SAVEPOINT active_record_1
447
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:44:26.063973"], ["updated_at", "2016-10-17 18:44:26.063973"]]
448
-  (0.2ms) RELEASE SAVEPOINT active_record_1
449
-  (0.3ms) SAVEPOINT active_record_1
450
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:44:26.067650"], ["updated_at", "2016-10-17 18:44:26.067650"]]
451
-  (0.2ms) RELEASE SAVEPOINT active_record_1
452
-  (0.4ms) SELECT COUNT(*) FROM guitars
453
-  (0.1ms) ROLLBACK
454
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
455
-  (0.2ms) BEGIN
456
- ----------------------
457
- TasksTest: test_update
458
- ----------------------
459
-  (0.2ms) SAVEPOINT active_record_1
460
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:44:33.946308"], ["updated_at", "2016-10-17 18:44:33.946308"]]
461
-  (0.1ms) RELEASE SAVEPOINT active_record_1
462
-  (0.1ms) SAVEPOINT active_record_1
463
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:44:33.949592"], ["updated_at", "2016-10-17 18:44:33.949592"]]
464
-  (0.2ms) RELEASE SAVEPOINT active_record_1
465
-  (0.3ms) SELECT COUNT(*) FROM guitars
466
-  (0.1ms) ROLLBACK
467
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
468
-  (0.3ms) BEGIN
469
- ----------------------
470
- TasksTest: test_update
471
- ----------------------
472
-  (0.1ms) SAVEPOINT active_record_1
473
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:44:39.741873"], ["updated_at", "2016-10-17 18:44:39.741873"]]
474
-  (0.2ms) RELEASE SAVEPOINT active_record_1
475
-  (0.1ms) SAVEPOINT active_record_1
476
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:44:39.745171"], ["updated_at", "2016-10-17 18:44:39.745171"]]
477
-  (0.1ms) RELEASE SAVEPOINT active_record_1
478
-  (0.3ms) SELECT COUNT(*) FROM guitars
479
-  (0.4ms) ROLLBACK
591
+ category = 'Guitar'
592
+ 
593
+  (16.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
594
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
595
+  (0.3ms) SELECT version FROM "schema_migrations"
596
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
597
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
598
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
599
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
600
+  (8.1ms) DROP TABLE "products" CASCADE
601
+  (3.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
480
602
   (0.3ms) DROP VIEW IF EXISTS guitars
481
-  (11.1ms) CREATE VIEW guitars AS
482
-
603
+  (1.1ms) CREATE VIEW guitars AS
483
604
  SELECT
484
- products.*
605
+ *
485
606
  FROM
486
607
  products
487
608
  WHERE
488
- products.category = 'Guitar'
609
+ category = 'Guitar'
489
610
 
490
-  (0.4ms) SELECT COUNT(*) FROM guitars
491
-  (0.2ms) ROLLBACK
492
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
493
-  (0.2ms) BEGIN
494
- ----------------------
495
- TasksTest: test_update
496
- ----------------------
611
+  (0.3ms) SELECT version FROM "schema_migrations"
612
+  (0.9ms) SELECT c.relname as name, c.relkind AS type
613
+ FROM pg_class c
614
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
615
+ WHERE c.relkind IN ('v')
616
+ AND n.nspname = ANY (current_schemas(false))
617
+ ORDER BY c.oid ASC
618
+
619
+  (0.1ms) BEGIN
620
+ --------------------------
621
+ MigrationTest: test_column
622
+ --------------------------
623
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
624
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
625
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
626
+ Migrating to CreateGuitarsView (20161125151623)
497
627
   (0.1ms) SAVEPOINT active_record_1
498
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:46:09.650503"], ["updated_at", "2016-10-17 18:46:09.650503"]]
499
-  (0.1ms) RELEASE SAVEPOINT active_record_1
628
+  (0.7ms) DROP VIEW guitars
629
+ SQL (2.8ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
630
+  (0.5ms) RELEASE SAVEPOINT active_record_1
631
+ Migrating to CreateProducts (20161017172847)
632
+  (0.2ms) SAVEPOINT active_record_1
633
+  (0.7ms) DROP TABLE "products"
634
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
635
+  (0.1ms) RELEASE SAVEPOINT active_record_1
636
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
637
+ Migrating to CreateProducts (20161017172847)
500
638
   (0.1ms) SAVEPOINT active_record_1
501
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:46:09.653828"], ["updated_at", "2016-10-17 18:46:09.653828"]]
502
-  (0.2ms) RELEASE SAVEPOINT active_record_1
503
-  (0.3ms) SELECT COUNT(*) FROM guitars
504
-  (0.2ms) ROLLBACK
505
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
506
-  (0.2ms) BEGIN
507
- ----------------------
508
- TasksTest: test_update
509
- ----------------------
510
-  (0.1ms) SAVEPOINT active_record_1
511
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:46:47.399246"], ["updated_at", "2016-10-17 18:46:47.399246"]]
639
+  (19.1ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
640
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
512
641
   (0.1ms) RELEASE SAVEPOINT active_record_1
642
+ Migrating to CreateGuitarsView (20161125151623)
513
643
   (0.1ms) SAVEPOINT active_record_1
514
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:46:47.402398"], ["updated_at", "2016-10-17 18:46:47.402398"]]
515
-  (0.1ms) RELEASE SAVEPOINT active_record_1
516
-  (0.3ms) SELECT COUNT(*) FROM guitars
517
-  (8.3ms) DROP VIEW IF EXISTS guitars
518
-  (0.2ms) ROLLBACK
519
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
520
-  (0.3ms) BEGIN
521
- ----------------------
522
- TasksTest: test_update
523
- ----------------------
524
-  (0.1ms) SAVEPOINT active_record_1
525
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:46:49.802296"], ["updated_at", "2016-10-17 18:46:49.802296"]]
644
+  (0.7ms) CREATE VIEW guitars AS
645
+ SELECT
646
+ *
647
+ FROM
648
+ products
649
+ WHERE
650
+ category = 'Guitar'
651
+ 
652
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
526
653
   (0.1ms) RELEASE SAVEPOINT active_record_1
527
-  (0.1ms) SAVEPOINT active_record_1
528
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:46:49.805594"], ["updated_at", "2016-10-17 18:46:49.805594"]]
529
-  (0.1ms) RELEASE SAVEPOINT active_record_1
530
-  (0.4ms) SELECT COUNT(*) FROM guitars
531
-  (0.6ms) DROP VIEW IF EXISTS guitars
532
-  (0.2ms) ROLLBACK
533
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
654
+  (6.2ms) ROLLBACK
655
+  (0.1ms) BEGIN
656
+ -----------------------------------
657
+ GeneratorTest: test_file_generation
658
+ -----------------------------------
659
+  (0.4ms) ROLLBACK
660
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
534
661
   (0.2ms) BEGIN
535
- ----------------------
536
- TasksTest: test_update
537
- ----------------------
538
-  (0.1ms) SAVEPOINT active_record_1
539
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:46:54.821916"], ["updated_at", "2016-10-17 18:46:54.821916"]]
540
-  (0.2ms) RELEASE SAVEPOINT active_record_1
541
-  (0.1ms) SAVEPOINT active_record_1
542
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:46:54.825418"], ["updated_at", "2016-10-17 18:46:54.825418"]]
543
-  (0.2ms) RELEASE SAVEPOINT active_record_1
544
-  (0.3ms) SELECT COUNT(*) FROM guitars
545
-  (0.5ms) DROP VIEW IF EXISTS guitars
546
-  (0.1ms) ROLLBACK
662
+ -------------------
663
+ TaskTest: test_dump
664
+ -------------------
547
665
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
548
-  (0.2ms) BEGIN
549
- ----------------------
550
- TasksTest: test_update
551
- ----------------------
666
+  (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
667
+ FROM pg_constraint c
668
+ JOIN pg_class t1 ON c.conrelid = t1.oid
669
+ JOIN pg_class t2 ON c.confrelid = t2.oid
670
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
671
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
672
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
673
+ WHERE c.contype = 'f'
674
+ AND t1.relname = 'products'
675
+ AND t3.nspname = ANY (current_schemas(false))
676
+ ORDER BY c.conname
677
+
678
+  (0.4ms)  SELECT c.relname as name, c.relkind AS type
679
+ FROM pg_class c
680
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
681
+ WHERE c.relkind IN ('v')
682
+ AND n.nspname = ANY (current_schemas(false))
683
+ ORDER BY c.oid ASC
684
+ 
685
+  (0.3ms) ROLLBACK
686
+  (0.1ms) BEGIN
687
+ -------------------
688
+ TaskTest: test_load
689
+ -------------------
690
+  (115.4ms) DROP DATABASE IF EXISTS "views_test"
691
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
692
+  (346.3ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
693
+  (0.6ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
694
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
695
+  (4.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
696
+  (0.3ms) DROP VIEW IF EXISTS guitars
697
+  (6.7ms) CREATE VIEW guitars AS
698
+ SELECT
699
+ *
700
+ FROM
701
+ products
702
+ WHERE
703
+ category = 'Guitar'
704
+ 
705
+  (18.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
706
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
707
+  (0.2ms) SELECT version FROM "schema_migrations"
708
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
709
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
710
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
711
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
712
+  (7.3ms) DROP TABLE "products" CASCADE
713
+  (6.7ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
714
+  (0.4ms) DROP VIEW IF EXISTS guitars
715
+  (1.0ms) CREATE VIEW guitars AS
716
+ SELECT
717
+ *
718
+ FROM
719
+ products
720
+ WHERE
721
+ category = 'Guitar'
722
+
723
+  (0.2ms) SELECT version FROM "schema_migrations"
724
+  (0.9ms) SELECT c.relname as name, c.relkind AS type
725
+ FROM pg_class c
726
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
727
+ WHERE c.relkind IN ('v')
728
+ AND n.nspname = ANY (current_schemas(false))
729
+ ORDER BY c.oid ASC
730
+
731
+  (0.2ms) BEGIN
732
+ --------------------------
733
+ MigrationTest: test_column
734
+ --------------------------
735
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
736
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
737
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
738
+ Migrating to CreateGuitarsView (20161125151623)
552
739
   (0.1ms) SAVEPOINT active_record_1
553
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:47:07.440374"], ["updated_at", "2016-10-17 18:47:07.440374"]]
554
-  (0.1ms) RELEASE SAVEPOINT active_record_1
555
-  (0.1ms) SAVEPOINT active_record_1
556
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:47:07.443561"], ["updated_at", "2016-10-17 18:47:07.443561"]]
740
+  (0.8ms) DROP VIEW guitars
741
+ SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
557
742
   (0.1ms) RELEASE SAVEPOINT active_record_1
558
-  (0.4ms) SELECT COUNT(*) FROM guitars
559
-  (0.1ms) ROLLBACK
560
-  (4.8ms) DROP VIEW IF EXISTS guitars
561
-  (0.2ms) ROLLBACK
562
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
563
-  (0.3ms) BEGIN
564
- ----------------------
565
- TasksTest: test_update
566
- ----------------------
743
+ Migrating to CreateProducts (20161017172847)
567
744
   (0.1ms) SAVEPOINT active_record_1
568
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:47:26.698502"], ["updated_at", "2016-10-17 18:47:26.698502"]]
569
-  (0.2ms) RELEASE SAVEPOINT active_record_1
570
-  (0.1ms) SAVEPOINT active_record_1
571
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:47:26.701795"], ["updated_at", "2016-10-17 18:47:26.701795"]]
745
+  (0.9ms) DROP TABLE "products"
746
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
572
747
   (0.1ms) RELEASE SAVEPOINT active_record_1
573
-  (0.6ms) DROP VIEW guitars
574
-  (0.5ms) SELECT COUNT(*) FROM guitars
575
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
576
-  (0.2ms) BEGIN
577
- ----------------------
578
- TasksTest: test_update
579
- ----------------------
580
-  (0.2ms) SAVEPOINT active_record_1
581
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:48:27.140736"], ["updated_at", "2016-10-17 18:48:27.140736"]]
582
-  (0.1ms) RELEASE SAVEPOINT active_record_1
748
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
749
+ Migrating to CreateProducts (20161017172847)
583
750
   (0.1ms) SAVEPOINT active_record_1
584
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:48:27.143939"], ["updated_at", "2016-10-17 18:48:27.143939"]]
585
-  (0.2ms) RELEASE SAVEPOINT active_record_1
586
-  (0.3ms) DROP VIEW guitars
587
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
588
-  (0.3ms) BEGIN
589
- ----------------------
590
- TasksTest: test_update
591
- ----------------------
592
-  (0.1ms) SAVEPOINT active_record_1
593
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:48:47.573425"], ["updated_at", "2016-10-17 18:48:47.573425"]]
594
-  (0.2ms) RELEASE SAVEPOINT active_record_1
595
-  (0.1ms) SAVEPOINT active_record_1
596
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:48:47.576814"], ["updated_at", "2016-10-17 18:48:47.576814"]]
597
-  (0.2ms) RELEASE SAVEPOINT active_record_1
598
-  (0.3ms) DROP VIEW guitars
599
-  (0.1ms) ROLLBACK
600
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
601
-  (0.2ms) BEGIN
602
- ----------------------
603
- TasksTest: test_update
604
- ----------------------
605
-  (0.1ms) SAVEPOINT active_record_1
606
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:49:08.997442"], ["updated_at", "2016-10-17 18:49:08.997442"]]
751
+  (19.1ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
752
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
607
753
   (0.1ms) RELEASE SAVEPOINT active_record_1
754
+ Migrating to CreateGuitarsView (20161125151623)
608
755
   (0.1ms) SAVEPOINT active_record_1
609
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:49:09.000651"], ["updated_at", "2016-10-17 18:49:09.000651"]]
610
-  (0.1ms) RELEASE SAVEPOINT active_record_1
611
-  (0.4ms) DROP VIEW guitars
612
-  (0.2ms) ROLLBACK
613
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
614
-  (0.2ms) BEGIN
615
- ----------------------
616
- TasksTest: test_update
617
- ----------------------
618
-  (0.2ms) SAVEPOINT active_record_1
619
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:49:42.845540"], ["updated_at", "2016-10-17 18:49:42.845540"]]
756
+  (0.7ms) CREATE VIEW guitars AS
757
+ SELECT
758
+ *
759
+ FROM
760
+ products
761
+ WHERE
762
+ category = 'Guitar'
763
+ 
764
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
620
765
   (0.1ms) RELEASE SAVEPOINT active_record_1
621
-  (0.1ms) SAVEPOINT active_record_1
622
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:49:42.848770"], ["updated_at", "2016-10-17 18:49:42.848770"]]
623
-  (0.2ms) RELEASE SAVEPOINT active_record_1
624
-  (0.3ms) DROP VIEW guitars
625
-  (0.1ms) ROLLBACK
626
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
627
-  (0.2ms) BEGIN
628
- ----------------------
629
- TasksTest: test_update
630
- ----------------------
631
-  (0.2ms) SAVEPOINT active_record_1
632
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:49:58.048008"], ["updated_at", "2016-10-17 18:49:58.048008"]]
633
-  (0.2ms) RELEASE SAVEPOINT active_record_1
634
-  (0.1ms) SAVEPOINT active_record_1
635
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:49:58.051280"], ["updated_at", "2016-10-17 18:49:58.051280"]]
636
-  (0.2ms) RELEASE SAVEPOINT active_record_1
637
-  (0.4ms) DROP VIEW guitars
638
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
766
+  (6.0ms) ROLLBACK
767
+  (0.1ms) BEGIN
768
+ -----------------------------------
769
+ GeneratorTest: test_file_generation
770
+ -----------------------------------
771
+  (0.3ms) ROLLBACK
772
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
639
773
   (0.2ms) BEGIN
640
- ----------------------
641
- TasksTest: test_update
642
- ----------------------
643
-  (0.1ms) SAVEPOINT active_record_1
644
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:50:53.628433"], ["updated_at", "2016-10-17 18:50:53.628433"]]
645
-  (0.1ms) RELEASE SAVEPOINT active_record_1
774
+ --------------------------
775
+ MigrationTest: test_column
776
+ --------------------------
777
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
778
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
779
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
780
+ Migrating to CreateGuitarsView (20161125151623)
646
781
   (0.2ms) SAVEPOINT active_record_1
647
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:50:53.631564"], ["updated_at", "2016-10-17 18:50:53.631564"]]
648
-  (0.1ms) RELEASE SAVEPOINT active_record_1
649
-  (0.4ms) DROP VIEW guitars
650
-  (0.2ms) ROLLBACK
651
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
652
-  (0.3ms) BEGIN
653
- ----------------------
654
- TasksTest: test_update
655
- ----------------------
656
-  (0.1ms) SAVEPOINT active_record_1
657
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:50:58.375081"], ["updated_at", "2016-10-17 18:50:58.375081"]]
782
+  (0.8ms) DROP VIEW guitars
783
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
658
784
   (0.1ms) RELEASE SAVEPOINT active_record_1
785
+ Migrating to CreateProducts (20161017172847)
659
786
   (0.1ms) SAVEPOINT active_record_1
660
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:50:58.378427"], ["updated_at", "2016-10-17 18:50:58.378427"]]
661
-  (0.1ms) RELEASE SAVEPOINT active_record_1
662
-  (0.3ms) DROP VIEW guitars
663
-  (0.2ms) ROLLBACK
664
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
665
-  (0.2ms) BEGIN
666
- ----------------------
667
- TasksTest: test_update
668
- ----------------------
669
-  (0.1ms) SAVEPOINT active_record_1
670
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:51:26.619707"], ["updated_at", "2016-10-17 18:51:26.619707"]]
671
-  (0.1ms) RELEASE SAVEPOINT active_record_1
672
-  (0.1ms) SAVEPOINT active_record_1
673
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:51:26.622938"], ["updated_at", "2016-10-17 18:51:26.622938"]]
674
-  (0.2ms) RELEASE SAVEPOINT active_record_1
675
-  (0.4ms) DROP VIEW guitars
676
-  (0.4ms) SELECT COUNT(*) FROM "products"
677
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
678
-  (0.2ms) BEGIN
679
- ----------------------
680
- TasksTest: test_update
681
- ----------------------
682
-  (0.1ms) SAVEPOINT active_record_1
683
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:52:16.020181"], ["updated_at", "2016-10-17 18:52:16.020181"]]
787
+  (0.7ms) DROP TABLE "products"
788
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
684
789
   (0.1ms) RELEASE SAVEPOINT active_record_1
685
-  (0.1ms) SAVEPOINT active_record_1
686
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:52:16.023473"], ["updated_at", "2016-10-17 18:52:16.023473"]]
687
-  (0.2ms) RELEASE SAVEPOINT active_record_1
688
-  (0.4ms) DROP VIEW guitars
689
-  (0.1ms) ROLLBACK
690
-  (0.2ms) ROLLBACK
691
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
692
-  (0.3ms) BEGIN
693
- ----------------------
694
- TasksTest: test_update
695
- ----------------------
790
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
791
+ Migrating to CreateProducts (20161017172847)
696
792
   (0.1ms) SAVEPOINT active_record_1
697
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:52:25.378397"], ["updated_at", "2016-10-17 18:52:25.378397"]]
698
-  (0.2ms) RELEASE SAVEPOINT active_record_1
699
-  (0.2ms) SAVEPOINT active_record_1
700
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:52:25.381747"], ["updated_at", "2016-10-17 18:52:25.381747"]]
793
+  (7.0ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
794
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
701
795
   (0.1ms) RELEASE SAVEPOINT active_record_1
702
-  (0.3ms) DROP VIEW guitars
703
-  (0.1ms) ROLLBACK
704
-  (0.2ms) ROLLBACK
705
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
706
-  (0.2ms) BEGIN
707
- ----------------------
708
- TasksTest: test_update
709
- ----------------------
796
+ Migrating to CreateGuitarsView (20161125151623)
710
797
   (0.1ms) SAVEPOINT active_record_1
711
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:52:34.396206"], ["updated_at", "2016-10-17 18:52:34.396206"]]
712
-  (0.1ms) RELEASE SAVEPOINT active_record_1
713
-  (0.1ms) SAVEPOINT active_record_1
714
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:52:34.400014"], ["updated_at", "2016-10-17 18:52:34.400014"]]
715
-  (0.1ms) RELEASE SAVEPOINT active_record_1
716
-  (0.4ms) DROP VIEW guitars
717
-  (0.1ms) ROLLBACK
718
-  (0.1ms) ROLLBACK
798
+  (0.7ms) CREATE VIEW guitars AS
799
+ SELECT
800
+ *
801
+ FROM
802
+ products
803
+ WHERE
804
+ category = 'Guitar'
805
+
806
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
807
+  (0.2ms) RELEASE SAVEPOINT active_record_1
808
+  (1.3ms) ROLLBACK
809
+  (0.1ms) BEGIN
810
+ -------------------
811
+ TaskTest: test_dump
812
+ -------------------
813
+  (0.2ms) ROLLBACK
814
+  (0.1ms) BEGIN
815
+ -------------------
816
+ TaskTest: test_load
817
+ -------------------
818
+  (0.3ms) ROLLBACK
819
+  (0.1ms) BEGIN
820
+ -----------------------------------
821
+ GeneratorTest: test_file_generation
822
+ -----------------------------------
823
+  (0.7ms) ROLLBACK
719
824
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
720
825
   (0.2ms) BEGIN
721
- ----------------------
722
- TasksTest: test_update
723
- ----------------------
724
-  (0.1ms) SAVEPOINT active_record_1
725
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:54:06.207860"], ["updated_at", "2016-10-17 18:54:06.207860"]]
726
-  (0.2ms) RELEASE SAVEPOINT active_record_1
727
-  (0.1ms) SAVEPOINT active_record_1
728
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:54:06.212767"], ["updated_at", "2016-10-17 18:54:06.212767"]]
729
-  (0.1ms) RELEASE SAVEPOINT active_record_1
826
+ -----------------------------------
827
+ GeneratorTest: test_file_generation
828
+ -----------------------------------
730
829
   (0.2ms) ROLLBACK
731
- ActiveRecord::SchemaMigration Load (27.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
732
-  (0.3ms) BEGIN
733
- ----------------------
734
- TasksTest: test_update
735
- ----------------------
736
-  (0.2ms) SAVEPOINT active_record_1
737
- SQL (20.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:54:40.149586"], ["updated_at", "2016-10-17 18:54:40.149586"]]
738
-  (0.3ms) RELEASE SAVEPOINT active_record_1
739
-  (0.2ms) SAVEPOINT active_record_1
740
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:54:40.175449"], ["updated_at", "2016-10-17 18:54:40.175449"]]
741
-  (0.1ms) RELEASE SAVEPOINT active_record_1
830
+  (0.1ms) BEGIN
831
+ -------------------
832
+ TaskTest: test_dump
833
+ -------------------
742
834
   (0.2ms) ROLLBACK
835
+  (0.1ms) BEGIN
836
+ -------------------
837
+ TaskTest: test_load
838
+ -------------------
839
+  (0.2ms) ROLLBACK
840
+  (0.1ms) BEGIN
841
+ --------------------------
842
+ MigrationTest: test_column
843
+ --------------------------
743
844
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
744
-  (0.3ms) BEGIN
745
- ----------------------
746
- TasksTest: test_update
747
- ----------------------
748
-  (0.2ms) SAVEPOINT active_record_1
749
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:54:51.683967"], ["updated_at", "2016-10-17 18:54:51.683967"]]
845
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
846
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
847
+ Migrating to CreateGuitarsView (20161125151623)
848
+  (0.1ms) SAVEPOINT active_record_1
849
+  (0.8ms) DROP VIEW guitars
850
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
750
851
   (0.1ms) RELEASE SAVEPOINT active_record_1
852
+ Migrating to CreateProducts (20161017172847)
751
853
   (0.1ms) SAVEPOINT active_record_1
752
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:54:51.688306"], ["updated_at", "2016-10-17 18:54:51.688306"]]
753
-  (0.2ms) RELEASE SAVEPOINT active_record_1
754
- ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
755
-  (0.3ms) BEGIN
756
- ----------------------
757
- TasksTest: test_update
758
- ----------------------
759
-  (0.1ms) SAVEPOINT active_record_1
760
- SQL (0.6ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:55:30.709837"], ["updated_at", "2016-10-17 18:55:30.709837"]]
761
-  (0.2ms) RELEASE SAVEPOINT active_record_1
762
-  (0.2ms) SAVEPOINT active_record_1
763
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:55:30.714589"], ["updated_at", "2016-10-17 18:55:30.714589"]]
764
-  (0.2ms) RELEASE SAVEPOINT active_record_1
765
-  (0.3ms) SELECT COUNT(*) FROM guitars
766
-  (0.2ms) ROLLBACK
767
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
768
-  (0.2ms) BEGIN
769
- ----------------------
770
- TasksTest: test_update
771
- ----------------------
854
+  (0.6ms) DROP TABLE "products"
855
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
856
+  (0.1ms) RELEASE SAVEPOINT active_record_1
857
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
858
+ Migrating to CreateProducts (20161017172847)
772
859
   (0.1ms) SAVEPOINT active_record_1
773
- SQL (0.6ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:55:36.846494"], ["updated_at", "2016-10-17 18:55:36.846494"]]
774
-  (0.2ms) RELEASE SAVEPOINT active_record_1
775
-  (0.2ms) SAVEPOINT active_record_1
776
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:55:36.851551"], ["updated_at", "2016-10-17 18:55:36.851551"]]
860
+  (23.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
861
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
777
862
   (0.1ms) RELEASE SAVEPOINT active_record_1
778
-  (2.0ms) DROP VIEW IF EXISTS guitars
779
-  (39.9ms) CREATE VIEW guitars AS
780
-
863
+ Migrating to CreateGuitarsView (20161125151623)
864
+  (0.1ms) SAVEPOINT active_record_1
865
+  (0.7ms) CREATE VIEW guitars AS
781
866
  SELECT
782
- products.*
867
+ *
783
868
  FROM
784
869
  products
785
870
  WHERE
786
- products.category = 'Guitar'
871
+ category = 'Guitar'
787
872
 
788
-  (0.9ms) SELECT COUNT(*) FROM guitars
789
-  (0.2ms) ROLLBACK
873
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
874
+  (0.1ms) RELEASE SAVEPOINT active_record_1
875
+  (9.8ms) ROLLBACK
790
876
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
791
877
   (0.2ms) BEGIN
792
- ----------------------
793
- TasksTest: test_update
794
- ----------------------
795
-  (0.4ms) SAVEPOINT active_record_1
796
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:56:27.445312"], ["updated_at", "2016-10-17 18:56:27.445312"]]
878
+ --------------------------
879
+ MigrationTest: test_column
880
+ --------------------------
881
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
882
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
883
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
884
+ Migrating to CreateGuitarsView (20161125151623)
885
+  (0.2ms) SAVEPOINT active_record_1
886
+  (1.2ms) DROP VIEW guitars
887
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
797
888
   (0.1ms) RELEASE SAVEPOINT active_record_1
889
+ Migrating to CreateProducts (20161017172847)
798
890
   (0.1ms) SAVEPOINT active_record_1
799
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:56:27.449562"], ["updated_at", "2016-10-17 18:56:27.449562"]]
891
+  (1.0ms) DROP TABLE "products"
892
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
893
+  (0.1ms) RELEASE SAVEPOINT active_record_1
894
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
895
+ Migrating to CreateProducts (20161017172847)
896
+  (0.1ms) SAVEPOINT active_record_1
897
+  (20.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
898
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
899
+  (0.1ms) RELEASE SAVEPOINT active_record_1
900
+ Migrating to CreateGuitarsView (20161125151623)
901
+  (0.1ms) SAVEPOINT active_record_1
902
+  (1.0ms) CREATE VIEW guitars AS
903
+ SELECT
904
+ *
905
+ FROM
906
+ products
907
+ WHERE
908
+ category = 'Guitar'
909
+
910
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
800
911
   (0.1ms) RELEASE SAVEPOINT active_record_1
912
+  (6.3ms) ROLLBACK
913
+  (0.1ms) BEGIN
914
+ -----------------------------------
915
+ GeneratorTest: test_file_generation
916
+ -----------------------------------
917
+  (0.2ms) ROLLBACK
918
+  (0.1ms) BEGIN
919
+ -------------------
920
+ TaskTest: test_dump
921
+ -------------------
922
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
923
+  (2.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
924
+ FROM pg_constraint c
925
+ JOIN pg_class t1 ON c.conrelid = t1.oid
926
+ JOIN pg_class t2 ON c.confrelid = t2.oid
927
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
928
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
929
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
930
+ WHERE c.contype = 'f'
931
+ AND t1.relname = 'products'
932
+ AND t3.nspname = ANY (current_schemas(false))
933
+ ORDER BY c.conname
934
+
935
+  (0.4ms)  SELECT c.relname as name, c.relkind AS type
936
+ FROM pg_class c
937
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
938
+ WHERE c.relkind IN ('v')
939
+ AND n.nspname = ANY (current_schemas(false))
940
+ ORDER BY c.oid ASC
941
+ 
942
+  (0.1ms) ROLLBACK
943
+  (0.1ms) BEGIN
944
+ -------------------
945
+ TaskTest: test_load
946
+ -------------------
947
+  (115.6ms) DROP DATABASE IF EXISTS "views_test"
948
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
949
+  (434.6ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
950
+  (0.6ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
951
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
952
+  (4.0ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
953
+  (0.2ms) DROP VIEW IF EXISTS guitars
954
+  (1.4ms) CREATE VIEW guitars AS
955
+ SELECT
956
+ *
957
+ FROM
958
+ products
959
+ WHERE
960
+ category = 'Guitar'
961
+ 
962
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
963
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
964
+  (0.4ms) SELECT version FROM "schema_migrations"
965
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
966
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
967
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
968
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
969
+  (8.1ms) DROP TABLE "products" CASCADE
970
+  (7.0ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
801
971
   (0.2ms) DROP VIEW IF EXISTS guitars
802
-  (1.2ms) CREATE VIEW guitars AS
803
-
972
+  (0.9ms) CREATE VIEW guitars AS
804
973
  SELECT
805
- products.*
974
+ *
806
975
  FROM
807
976
  products
808
977
  WHERE
809
- products.category = 'Guitar'
978
+ category = 'Guitar'
979
+
980
+  (0.4ms) SELECT version FROM "schema_migrations"
981
+  (1.1ms) SELECT c.relname as name, c.relkind AS type
982
+ FROM pg_class c
983
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
984
+ WHERE c.relkind IN ('v')
985
+ AND n.nspname = ANY (current_schemas(false))
986
+ ORDER BY c.oid ASC
810
987
 
811
-  (0.3ms) SELECT COUNT(*) FROM guitars
812
-  (0.2ms) ROLLBACK
813
988
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
814
989
   (0.3ms) BEGIN
815
- ----------------------
816
- TasksTest: test_update
817
- ----------------------
818
-  (0.2ms) SAVEPOINT active_record_1
819
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:56:36.909002"], ["updated_at", "2016-10-17 18:56:36.909002"]]
820
-  (0.2ms) RELEASE SAVEPOINT active_record_1
990
+ -----------------------------------
991
+ GeneratorTest: test_file_generation
992
+ -----------------------------------
993
+  (0.3ms) ROLLBACK
994
+  (0.1ms) BEGIN
995
+ --------------------------
996
+ MigrationTest: test_column
997
+ --------------------------
998
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
999
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1000
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1001
+ Migrating to CreateGuitarsView (20161125151623)
1002
+  (0.2ms) SAVEPOINT active_record_1
1003
+  (1.0ms) DROP VIEW guitars
1004
+ SQL (11.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
1005
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1006
+ Migrating to CreateProducts (20161017172847)
821
1007
   (0.1ms) SAVEPOINT active_record_1
822
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:56:36.912595"], ["updated_at", "2016-10-17 18:56:36.912595"]]
823
-  (0.2ms) RELEASE SAVEPOINT active_record_1
824
-  (0.4ms) DROP VIEW IF EXISTS guitars
825
-  (1.2ms) CREATE VIEW guitars AS
826
-
1008
+  (0.9ms) DROP TABLE "products"
1009
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1010
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1011
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1012
+ Migrating to CreateProducts (20161017172847)
1013
+  (0.1ms) SAVEPOINT active_record_1
1014
+  (18.7ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1015
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1016
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1017
+ Migrating to CreateGuitarsView (20161125151623)
1018
+  (0.1ms) SAVEPOINT active_record_1
1019
+  (0.7ms) CREATE VIEW guitars AS
827
1020
  SELECT
828
- products.*
1021
+ *
829
1022
  FROM
830
1023
  products
831
1024
  WHERE
832
- products.category = 'Guitar'
1025
+ category = 'Guitar'
833
1026
 
834
-  (0.2ms) SELECT COUNT(*) FROM guitars
835
-  (0.2ms) ROLLBACK
836
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
837
-  (0.2ms) BEGIN
838
- ----------------------
839
- TasksTest: test_update
840
- ----------------------
841
-  (0.2ms) SAVEPOINT active_record_1
842
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 18:56:41.159087"], ["updated_at", "2016-10-17 18:56:41.159087"]]
843
-  (0.1ms) RELEASE SAVEPOINT active_record_1
844
-  (0.1ms) SAVEPOINT active_record_1
845
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 18:56:41.162571"], ["updated_at", "2016-10-17 18:56:41.162571"]]
1027
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
846
1028
   (0.1ms) RELEASE SAVEPOINT active_record_1
847
-  (0.5ms) DROP VIEW IF EXISTS guitars
848
-  (1.4ms) CREATE VIEW guitars AS
849
-
1029
+  (6.1ms) ROLLBACK
1030
+  (0.1ms) BEGIN
1031
+ -------------------
1032
+ TaskTest: test_dump
1033
+ -------------------
1034
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1035
+  (2.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
1036
+ FROM pg_constraint c
1037
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1038
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1039
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1040
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1041
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1042
+ WHERE c.contype = 'f'
1043
+ AND t1.relname = 'products'
1044
+ AND t3.nspname = ANY (current_schemas(false))
1045
+ ORDER BY c.conname
1046
+
1047
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
1048
+ FROM pg_class c
1049
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1050
+ WHERE c.relkind IN ('v')
1051
+ AND n.nspname = ANY (current_schemas(false))
1052
+ ORDER BY c.oid ASC
1053
+ 
1054
+  (0.1ms) ROLLBACK
1055
+  (0.1ms) BEGIN
1056
+ -------------------
1057
+ TaskTest: test_load
1058
+ -------------------
1059
+  (187.4ms) DROP DATABASE IF EXISTS "views_test"
1060
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
1061
+  (363.2ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1062
+  (0.6ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1063
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1064
+  (5.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1065
+  (0.3ms) DROP VIEW IF EXISTS guitars
1066
+  (2.8ms) CREATE VIEW guitars AS
850
1067
  SELECT
851
- products.*
1068
+ *
852
1069
  FROM
853
1070
  products
854
1071
  WHERE
855
- products.category = 'Guitar'
856
-
857
-  (0.5ms) SELECT COUNT(*) FROM guitars
858
-  (0.3ms) ROLLBACK
859
- ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
860
-  (0.2ms) BEGIN
861
- ----------------------
862
- TasksTest: test_update
863
- ----------------------
864
-  (0.2ms) SAVEPOINT active_record_1
865
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 20:02:07.717407"], ["updated_at", "2016-10-17 20:02:07.717407"]]
866
-  (0.2ms) RELEASE SAVEPOINT active_record_1
867
-  (0.1ms) SAVEPOINT active_record_1
868
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 20:02:07.722542"], ["updated_at", "2016-10-17 20:02:07.722542"]]
869
-  (0.2ms) RELEASE SAVEPOINT active_record_1
870
-  (0.3ms) DROP VIEW IF EXISTS guitars
871
-  (2.2ms) CREATE VIEW guitars AS
872
-
1072
+ category = 'Guitar'
1073
+ 
1074
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
1075
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1076
+  (0.3ms) SELECT version FROM "schema_migrations"
1077
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161126212242')
1078
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1079
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
1080
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1081
+  (7.6ms) DROP TABLE "products" CASCADE
1082
+  (6.6ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1083
+  (0.2ms) DROP VIEW IF EXISTS guitars
1084
+  (1.0ms) CREATE VIEW guitars AS
873
1085
  SELECT
874
- products.*
1086
+ *
875
1087
  FROM
876
1088
  products
877
1089
  WHERE
878
- products.category = 'Guitar'
1090
+ category = 'Guitar'
1091
+
1092
+  (0.3ms) SELECT version FROM "schema_migrations"
1093
+  (1.1ms) SELECT c.relname as name, c.relkind AS type
1094
+ FROM pg_class c
1095
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1096
+ WHERE c.relkind IN ('v')
1097
+ AND n.nspname = ANY (current_schemas(false))
1098
+ ORDER BY c.oid ASC
879
1099
 
880
-  (0.3ms) SELECT 1 FROM guitars
881
-  (0.2ms) ROLLBACK
882
1100
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
883
1101
   (0.2ms) BEGIN
884
- ----------------------
885
- TasksTest: test_update
886
- ----------------------
887
-  (0.2ms) SAVEPOINT active_record_1
888
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 20:02:15.526046"], ["updated_at", "2016-10-17 20:02:15.526046"]]
1102
+ --------------------------
1103
+ MigrationTest: test_column
1104
+ --------------------------
1105
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1106
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1107
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1108
+ Migrating to CreateGuitarsView (20161125151623)
1109
+  (0.2ms) SAVEPOINT active_record_1
1110
+  (1.1ms) DROP VIEW guitars
1111
+ SQL (7.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
889
1112
   (0.1ms) RELEASE SAVEPOINT active_record_1
1113
+ Migrating to CreateProducts (20161017172847)
890
1114
   (0.1ms) SAVEPOINT active_record_1
891
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 20:02:15.530310"], ["updated_at", "2016-10-17 20:02:15.530310"]]
892
-  (0.1ms) RELEASE SAVEPOINT active_record_1
893
-  (6.7ms) SELECT 1 FROM guitars
894
-  (0.1ms) ROLLBACK
895
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
896
-  (0.3ms) BEGIN
897
- ----------------------
898
- TasksTest: test_update
899
- ----------------------
900
-  (0.3ms) DROP VIEW IF EXISTS guitars
901
-  (1.3ms) CREATE VIEW guitars AS
902
-
1115
+  (0.6ms) DROP TABLE "products"
1116
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1117
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1118
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1119
+ Migrating to CreateProducts (20161017172847)
1120
+  (0.1ms) SAVEPOINT active_record_1
1121
+  (13.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1122
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1123
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1124
+ Migrating to CreateGuitarsView (20161125151623)
1125
+  (0.1ms) SAVEPOINT active_record_1
1126
+  (0.8ms) CREATE VIEW guitars AS
903
1127
  SELECT
904
- products.*
1128
+ *
905
1129
  FROM
906
1130
  products
907
1131
  WHERE
908
- products.category = 'Guitar'
1132
+ category = 'Guitar'
909
1133
 
910
-  (0.3ms) SELECT 1 FROM guitars
911
-  (0.2ms) ROLLBACK
912
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
913
-  (0.2ms) BEGIN
914
- ----------------------
915
- TasksTest: test_update
916
- ----------------------
917
-  (0.3ms) DROP VIEW IF EXISTS guitars
918
-  (7.7ms) CREATE VIEW guitars AS
919
-
1134
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1135
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1136
+  (6.0ms) ROLLBACK
1137
+  (0.1ms) BEGIN
1138
+ -------------------
1139
+ TaskTest: test_load
1140
+ -------------------
1141
+  (111.8ms) DROP DATABASE IF EXISTS "views_test"
1142
+  (35.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
1143
+  (11.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1144
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
1145
+ Migrating to CreateProducts (20161017172847)
1146
+  (0.1ms) BEGIN
1147
+  (27.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1148
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1149
+  (5.5ms) COMMIT
1150
+ Migrating to CreateGuitarsView (20161125151623)
1151
+  (5.4ms) BEGIN
1152
+  (28.3ms) CREATE VIEW guitars AS
920
1153
  SELECT
921
- products.*
1154
+ *
922
1155
  FROM
923
1156
  products
924
1157
  WHERE
925
- products.category = 'Guitar'
1158
+ category = 'Guitar'
1159
+ 
1160
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1161
+  (0.3ms) COMMIT
1162
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1163
+  (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
1164
+ FROM pg_constraint c
1165
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1166
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1167
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1168
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1169
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1170
+ WHERE c.contype = 'f'
1171
+ AND t1.relname = 'products'
1172
+ AND t3.nspname = ANY (current_schemas(false))
1173
+ ORDER BY c.conname
1174
+ 
1175
+  (0.4ms) SELECT c.relname as name, c.relkind AS type
1176
+ FROM pg_class c
1177
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1178
+ WHERE c.relkind IN ('v')
1179
+ AND n.nspname = ANY (current_schemas(false))
1180
+ ORDER BY c.oid ASC
926
1181
 
927
-  (0.4ms) SELECT 1 FROM guitars
928
-  (0.2ms) ROLLBACK
929
1182
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
930
1183
   (0.2ms) BEGIN
931
- ----------------------
932
- TasksTest: test_update
933
- ----------------------
934
-  (0.3ms) DROP VIEW IF EXISTS guitars
935
-  (1.3ms) CREATE VIEW guitars AS
936
-
1184
+ -----------------------------------
1185
+ GeneratorTest: test_file_generation
1186
+ -----------------------------------
1187
+  (0.2ms) ROLLBACK
1188
+  (0.1ms) BEGIN
1189
+ -------------------
1190
+ TaskTest: test_dump
1191
+ -------------------
1192
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1193
+  (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
1194
+ FROM pg_constraint c
1195
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1196
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1197
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1198
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1199
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1200
+ WHERE c.contype = 'f'
1201
+ AND t1.relname = 'products'
1202
+ AND t3.nspname = ANY (current_schemas(false))
1203
+ ORDER BY c.conname
1204
+
1205
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
1206
+ FROM pg_class c
1207
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1208
+ WHERE c.relkind IN ('v')
1209
+ AND n.nspname = ANY (current_schemas(false))
1210
+ ORDER BY c.oid ASC
1211
+ 
1212
+  (0.1ms) ROLLBACK
1213
+  (0.1ms) BEGIN
1214
+ -------------------
1215
+ TaskTest: test_load
1216
+ -------------------
1217
+  (130.4ms) DROP DATABASE IF EXISTS "views_test"
1218
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
1219
+  (403.9ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1220
+  (0.7ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1221
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1222
+  (4.6ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1223
+  (0.3ms) DROP VIEW IF EXISTS guitars
1224
+  (11.7ms) CREATE VIEW guitars AS
937
1225
  SELECT
938
- products.*
1226
+ *
939
1227
  FROM
940
1228
  products
941
1229
  WHERE
942
- products.category = 'Guitar'
943
-
944
-  (0.2ms) ROLLBACK
1230
+ category = 'Guitar'
1231
+ 
1232
+  (11.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
1233
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1234
+  (0.2ms) SELECT version FROM "schema_migrations"
1235
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
1236
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1237
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1238
+  (7.5ms) DROP TABLE "products" CASCADE
1239
+  (6.9ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1240
+  (0.2ms) DROP VIEW IF EXISTS guitars
1241
+  (0.9ms) CREATE VIEW guitars AS
1242
+ SELECT
1243
+ *
1244
+ FROM
1245
+ products
1246
+ WHERE
1247
+ category = 'Guitar'
1248
+ 
1249
+  (0.2ms) SELECT version FROM "schema_migrations"
945
1250
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
946
-  (0.3ms) BEGIN
947
- ----------------------
948
- TasksTest: test_update
949
- ----------------------
950
-  (0.4ms) DROP VIEW IF EXISTS guitars
951
-  (1.2ms) CREATE VIEW guitars AS
952
-
1251
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1252
+  (0.6ms)  SELECT c.relname as name, c.relkind AS type
1253
+ FROM pg_class c
1254
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1255
+ WHERE c.relkind IN ('v')
1256
+ AND n.nspname = ANY (current_schemas(false))
1257
+ ORDER BY c.oid ASC
1258
+ 
1259
+  (0.1ms) BEGIN
1260
+ --------------------------
1261
+ MigrationTest: test_column
1262
+ --------------------------
1263
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1264
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1265
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1266
+ Migrating to CreateGuitarsView (20161125151623)
1267
+  (0.1ms) SAVEPOINT active_record_1
1268
+  (0.9ms) DROP VIEW guitars
1269
+ SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
1270
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1271
+ Migrating to CreateProducts (20161017172847)
1272
+  (0.1ms) SAVEPOINT active_record_1
1273
+  (0.8ms) DROP TABLE "products"
1274
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1275
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1276
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1277
+ Migrating to CreateProducts (20161017172847)
1278
+  (0.1ms) SAVEPOINT active_record_1
1279
+  (18.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1280
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1281
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1282
+ Migrating to CreateGuitarsView (20161125151623)
1283
+  (0.1ms) SAVEPOINT active_record_1
1284
+  (0.9ms) CREATE VIEW guitars AS
953
1285
  SELECT
954
- products.*
1286
+ *
955
1287
  FROM
956
1288
  products
957
1289
  WHERE
958
- products.category = 'Guitar'
1290
+ category = 'Guitar'
959
1291
 
960
-  (0.4ms) SELECT 1 FROM guitars
961
-  (0.3ms) SELECT 1 FROM guitars
962
-  (0.7ms) SELECT 1 FROM guitars
963
-  (0.5ms) SELECT 1 FROM guitars
964
-  (0.6ms) SELECT 1 FROM guitars
965
-  (0.5ms) SELECT 1 FROM guitars
966
-  (0.3ms) SELECT 1 FROM guitars
967
-  (0.2ms) ROLLBACK
1292
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1293
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1294
+  (6.0ms) ROLLBACK
968
1295
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
969
-  (0.3ms) BEGIN
970
- ----------------------
971
- TasksTest: test_update
972
- ----------------------
973
-  (0.3ms) DROP VIEW IF EXISTS guitars
1296
+  (0.2ms) BEGIN
1297
+ --------------------------
1298
+ MigrationTest: test_column
1299
+ --------------------------
1300
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1301
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1302
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1303
+ Migrating to CreateGuitarsView (20161125151623)
1304
+  (0.2ms) SAVEPOINT active_record_1
1305
+  (0.8ms) DROP VIEW guitars
1306
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
1307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1308
+ Migrating to CreateProducts (20161017172847)
1309
+  (0.1ms) SAVEPOINT active_record_1
1310
+  (0.6ms) DROP TABLE "products"
1311
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1312
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1313
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1314
+ Migrating to CreateProducts (20161017172847)
1315
+  (0.1ms) SAVEPOINT active_record_1
1316
+  (13.4ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1317
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1318
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1319
+ Migrating to CreateGuitarsView (20161125151623)
1320
+  (0.1ms) SAVEPOINT active_record_1
1321
+  (0.9ms) CREATE VIEW guitars AS
1322
+ SELECT
1323
+ *
1324
+ FROM
1325
+ products
1326
+ WHERE
1327
+ category = 'Guitar'
1328
+
1329
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1330
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1331
+  (6.2ms) ROLLBACK
1332
+  (0.1ms) BEGIN
1333
+ -----------------------------------
1334
+ GeneratorTest: test_file_generation
1335
+ -----------------------------------
1336
+  (0.2ms) ROLLBACK
1337
+  (0.1ms) BEGIN
1338
+ -------------------
1339
+ TaskTest: test_load
1340
+ -------------------
1341
+  (177.2ms) DROP DATABASE IF EXISTS "views_test"
1342
+  (309.8ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1343
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1344
+  (3.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1345
+  (0.2ms) DROP VIEW IF EXISTS guitars
974
1346
   (1.2ms) CREATE VIEW guitars AS
975
-
976
1347
  SELECT
977
- products.*
1348
+ *
978
1349
  FROM
979
1350
  products
980
1351
  WHERE
981
- products.category = 'Guitar'
1352
+ category = 'Guitar'
982
1353
 
983
-  (0.3ms) SELECT * FROM guitars
984
-  (0.2ms) ROLLBACK
985
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1354
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
1355
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1356
+  (0.2ms) SELECT version FROM "schema_migrations"
1357
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
1358
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1359
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1360
+  (0.6ms)  SELECT c.relname as name, c.relkind AS type
1361
+ FROM pg_class c
1362
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1363
+ WHERE c.relkind IN ('v')
1364
+ AND n.nspname = ANY (current_schemas(false))
1365
+ ORDER BY c.oid ASC
1366
+ 
1367
+  (0.1ms) BEGIN
1368
+ -------------------
1369
+ TaskTest: test_dump
1370
+ -------------------
1371
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1372
+  (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
1373
+ FROM pg_constraint c
1374
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1375
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1376
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1377
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1378
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1379
+ WHERE c.contype = 'f'
1380
+ AND t1.relname = 'products'
1381
+ AND t3.nspname = ANY (current_schemas(false))
1382
+ ORDER BY c.conname
1383
+
1384
+  (0.4ms)  SELECT c.relname as name, c.relkind AS type
1385
+ FROM pg_class c
1386
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1387
+ WHERE c.relkind IN ('v')
1388
+ AND n.nspname = ANY (current_schemas(false))
1389
+ ORDER BY c.oid ASC
1390
+ 
1391
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1392
+  (1.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
1393
+ FROM pg_constraint c
1394
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1395
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1396
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1397
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1398
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1399
+ WHERE c.contype = 'f'
1400
+ AND t1.relname = 'products'
1401
+ AND t3.nspname = ANY (current_schemas(false))
1402
+ ORDER BY c.conname
1403
+ 
1404
+  (0.4ms) SELECT c.relname as name, c.relkind AS type
1405
+ FROM pg_class c
1406
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1407
+ WHERE c.relkind IN ('v')
1408
+ AND n.nspname = ANY (current_schemas(false))
1409
+ ORDER BY c.oid ASC
1410
+
1411
+  (0.2ms) ROLLBACK
1412
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
986
1413
   (0.2ms) BEGIN
987
- ----------------------
988
- TasksTest: test_update
989
- ----------------------
990
-  (0.1ms) SAVEPOINT active_record_1
991
- SQL (0.5ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-17 20:04:25.644481"], ["updated_at", "2016-10-17 20:04:25.644481"]]
1414
+ --------------------------
1415
+ MigrationTest: test_column
1416
+ --------------------------
1417
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1418
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1419
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1420
+ Migrating to CreateGuitarsView (20161125151623)
1421
+  (0.1ms) SAVEPOINT active_record_1
1422
+  (0.9ms) DROP VIEW guitars
1423
+ SQL (0.3ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
992
1424
   (0.1ms) RELEASE SAVEPOINT active_record_1
1425
+ Migrating to CreateProducts (20161017172847)
993
1426
   (0.1ms) SAVEPOINT active_record_1
994
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-17 20:04:25.648742"], ["updated_at", "2016-10-17 20:04:25.648742"]]
1427
+  (0.7ms) DROP TABLE "products"
1428
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1429
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1430
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1431
+ Migrating to CreateProducts (20161017172847)
1432
+  (0.1ms) SAVEPOINT active_record_1
1433
+  (13.6ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1434
+ SQL (1.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
995
1435
   (0.2ms) RELEASE SAVEPOINT active_record_1
996
-  (0.3ms) DROP VIEW IF EXISTS guitars
997
-  (1.1ms) CREATE VIEW guitars AS
998
-
1436
+ Migrating to CreateGuitarsView (20161125151623)
1437
+  (0.1ms) SAVEPOINT active_record_1
1438
+  (1.3ms) CREATE VIEW guitars AS
999
1439
  SELECT
1000
- products.*
1440
+ *
1001
1441
  FROM
1002
1442
  products
1003
1443
  WHERE
1004
- products.category = 'Guitar'
1444
+ category = 'Guitar'
1445
+
1446
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1447
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1448
+  (6.1ms) ROLLBACK
1449
+  (0.1ms) BEGIN
1450
+ -------------------
1451
+ TaskTest: test_dump
1452
+ -------------------
1453
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1454
+  (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
1455
+ FROM pg_constraint c
1456
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1457
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1458
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1459
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1460
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1461
+ WHERE c.contype = 'f'
1462
+ AND t1.relname = 'products'
1463
+ AND t3.nspname = ANY (current_schemas(false))
1464
+ ORDER BY c.conname
1005
1465
 
1006
-  (0.2ms) SELECT * FROM guitars
1466
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
1467
+ FROM pg_class c
1468
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1469
+ WHERE c.relkind IN ('v')
1470
+ AND n.nspname = ANY (current_schemas(false))
1471
+ ORDER BY c.oid ASC
1472
+ 
1007
1473
   (0.2ms) ROLLBACK
1008
-  (184.8ms) DROP DATABASE IF EXISTS "views_test"
1009
-  (354.8ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1474
+  (0.1ms) BEGIN
1475
+ -------------------
1476
+ TaskTest: test_load
1477
+ -------------------
1478
+  (148.7ms) DROP DATABASE IF EXISTS "views_test"
1479
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
1480
+  (293.4ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1481
+  (0.7ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1482
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1483
+  (3.9ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1484
+  (0.2ms) DROP VIEW IF EXISTS guitars
1485
+  (1.3ms) CREATE VIEW guitars AS
1486
+ SELECT
1487
+ *
1488
+ FROM
1489
+ products
1490
+ WHERE
1491
+ category = 'Guitar'
1492
+ 
1493
+  (2.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
1494
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1495
+  (0.4ms) SELECT version FROM "schema_migrations"
1496
+  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
1497
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1010
1498
  SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1011
-  (3.8ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1012
-  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
1013
-  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1014
-  (0.3ms) SELECT version FROM "schema_migrations"
1015
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1499
+  (7.2ms) DROP TABLE "products" CASCADE
1500
+  (7.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1501
+  (0.2ms) DROP VIEW IF EXISTS guitars
1502
+  (0.9ms) CREATE VIEW guitars AS
1503
+ SELECT
1504
+ *
1505
+ FROM
1506
+ products
1507
+ WHERE
1508
+ category = 'Guitar'
1509
+ 
1510
+  (0.3ms) SELECT version FROM "schema_migrations"
1016
1511
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1512
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1513
+  (0.7ms)  SELECT c.relname as name, c.relkind AS type
1514
+ FROM pg_class c
1515
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1516
+ WHERE c.relkind IN ('v')
1517
+ AND n.nspname = ANY (current_schemas(false))
1518
+ ORDER BY c.oid ASC
1519
+ 
1520
+  (0.1ms) BEGIN
1521
+ -----------------------------------
1522
+ GeneratorTest: test_file_generation
1523
+ -----------------------------------
1524
+  (0.2ms) ROLLBACK
1017
1525
  ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
1018
-  (0.2ms) BEGIN
1019
- ------------------------------------
1020
- GeneratorsTest: test_file_generation
1021
- ------------------------------------
1022
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1023
-  (0.2ms) BEGIN
1024
- ----------------------
1025
- TasksTest: test_update
1026
- ----------------------
1027
-  (0.2ms) SAVEPOINT active_record_1
1028
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-18 00:58:47.739724"], ["updated_at", "2016-10-18 00:58:47.739724"]]
1526
+  (0.3ms) BEGIN
1527
+ -----------------------------------
1528
+ GeneratorTest: test_file_generation
1529
+ -----------------------------------
1530
+  (0.2ms) ROLLBACK
1531
+  (0.1ms) BEGIN
1532
+ --------------------------
1533
+ MigrationTest: test_column
1534
+ --------------------------
1535
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1536
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1537
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1538
+ Migrating to CreateGuitarsView (20161125151623)
1539
+  (0.1ms) SAVEPOINT active_record_1
1540
+  (1.1ms) DROP VIEW guitars
1541
+ SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
1029
1542
   (0.1ms) RELEASE SAVEPOINT active_record_1
1543
+ Migrating to CreateProducts (20161017172847)
1030
1544
   (0.1ms) SAVEPOINT active_record_1
1031
- SQL (0.1ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-18 00:58:47.743798"], ["updated_at", "2016-10-18 00:58:47.743798"]]
1545
+  (0.8ms) DROP TABLE "products"
1546
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1547
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1548
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1549
+ Migrating to CreateProducts (20161017172847)
1550
+  (0.1ms) SAVEPOINT active_record_1
1551
+  (3.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1552
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1032
1553
   (0.1ms) RELEASE SAVEPOINT active_record_1
1033
-  (0.2ms) DROP VIEW IF EXISTS guitars
1034
-  (1.4ms) CREATE VIEW guitars AS
1035
-
1554
+ Migrating to CreateGuitarsView (20161125151623)
1555
+  (0.1ms) SAVEPOINT active_record_1
1556
+  (1.0ms) CREATE VIEW guitars AS
1036
1557
  SELECT
1037
- products.*
1558
+ *
1038
1559
  FROM
1039
1560
  products
1040
1561
  WHERE
1041
- products.category = 'Guitar'
1562
+ category = 'Guitar'
1042
1563
 
1043
-  (0.3ms) SELECT * FROM guitars
1044
-  (0.2ms) ROLLBACK
1045
-  (0.1ms) BEGIN
1046
- ------------------------------------
1047
- GeneratorsTest: test_file_generation
1048
- ------------------------------------
1049
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
1050
-  (0.3ms) BEGIN
1051
- ----------------------
1052
- TasksTest: test_update
1053
- ----------------------
1054
-  (0.2ms) SAVEPOINT active_record_1
1055
- SQL (0.9ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-18 00:58:53.320941"], ["updated_at", "2016-10-18 00:58:53.320941"]]
1056
-  (0.2ms) RELEASE SAVEPOINT active_record_1
1057
-  (0.1ms) SAVEPOINT active_record_1
1058
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-18 00:58:53.326151"], ["updated_at", "2016-10-18 00:58:53.326151"]]
1059
-  (0.4ms) RELEASE SAVEPOINT active_record_1
1564
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1565
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1566
+  (1.1ms) ROLLBACK
1567
+  (0.1ms) BEGIN
1568
+ -------------------
1569
+ TaskTest: test_load
1570
+ -------------------
1571
+  (136.1ms) DROP DATABASE IF EXISTS "views_test"
1572
+  (281.1ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1573
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1574
+  (4.1ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1060
1575
   (0.2ms) DROP VIEW IF EXISTS guitars
1061
-  (1.7ms) CREATE VIEW guitars AS
1062
-
1576
+  (1.5ms) CREATE VIEW guitars AS
1063
1577
  SELECT
1064
- products.*
1578
+ *
1065
1579
  FROM
1066
1580
  products
1067
1581
  WHERE
1068
- products.category = 'Guitar'
1582
+ category = 'Guitar'
1069
1583
 
1070
-  (0.3ms) SELECT * FROM guitars
1071
-  (0.2ms) ROLLBACK
1584
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
1585
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1586
+  (0.3ms) SELECT version FROM "schema_migrations"
1587
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
1588
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1589
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1590
+  (0.6ms)  SELECT c.relname as name, c.relkind AS type
1591
+ FROM pg_class c
1592
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1593
+ WHERE c.relkind IN ('v')
1594
+ AND n.nspname = ANY (current_schemas(false))
1595
+ ORDER BY c.oid ASC
1596
+ 
1597
+  (0.1ms) BEGIN
1598
+ -------------------
1599
+ TaskTest: test_dump
1600
+ -------------------
1601
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1602
+  (2.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
1603
+ FROM pg_constraint c
1604
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1605
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1606
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1607
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1608
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1609
+ WHERE c.contype = 'f'
1610
+ AND t1.relname = 'products'
1611
+ AND t3.nspname = ANY (current_schemas(false))
1612
+ ORDER BY c.conname
1613
+
1614
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
1615
+ FROM pg_class c
1616
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1617
+ WHERE c.relkind IN ('v')
1618
+ AND n.nspname = ANY (current_schemas(false))
1619
+ ORDER BY c.oid ASC
1620
+ 
1621
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1622
+  (1.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
1623
+ FROM pg_constraint c
1624
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1625
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1626
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1627
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1628
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1629
+ WHERE c.contype = 'f'
1630
+ AND t1.relname = 'products'
1631
+ AND t3.nspname = ANY (current_schemas(false))
1632
+ ORDER BY c.conname
1633
+ 
1634
+  (0.5ms) SELECT c.relname as name, c.relkind AS type
1635
+ FROM pg_class c
1636
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1637
+ WHERE c.relkind IN ('v')
1638
+ AND n.nspname = ANY (current_schemas(false))
1639
+ ORDER BY c.oid ASC
1640
+
1641
+  (0.1ms) ROLLBACK
1642
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
1643
+  (0.3ms) BEGIN
1644
+ -------------------
1645
+ TaskTest: test_dump
1646
+ -------------------
1647
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1648
+  (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
1649
+ FROM pg_constraint c
1650
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1651
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1652
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1653
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1654
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1655
+ WHERE c.contype = 'f'
1656
+ AND t1.relname = 'products'
1657
+ AND t3.nspname = ANY (current_schemas(false))
1658
+ ORDER BY c.conname
1659
+
1660
+  (0.4ms)  SELECT c.relname as name, c.relkind AS type
1661
+ FROM pg_class c
1662
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1663
+ WHERE c.relkind IN ('v')
1664
+ AND n.nspname = ANY (current_schemas(false))
1665
+ ORDER BY c.oid ASC
1666
+ 
1667
+  (0.1ms) ROLLBACK
1072
1668
   (0.1ms) BEGIN
1073
- ------------------------------------
1074
- GeneratorsTest: test_file_generation
1075
- ------------------------------------
1076
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
1077
-  (0.2ms) BEGIN
1078
- ------------------------------------
1079
- GeneratorsTest: test_file_generation
1080
- ------------------------------------
1669
+ -------------------
1670
+ TaskTest: test_load
1671
+ -------------------
1672
+  (130.5ms) DROP DATABASE IF EXISTS "views_test"
1673
+  (0.2ms) DROP DATABASE IF EXISTS "views_test"
1674
+  (313.1ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1675
+  (0.6ms) CREATE DATABASE "views_test" ENCODING = 'utf8'
1676
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1677
+  (16.9ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1678
+  (0.2ms) DROP VIEW IF EXISTS guitars
1679
+  (6.6ms) CREATE VIEW guitars AS
1680
+ SELECT
1681
+ *
1682
+ FROM
1683
+ products
1684
+ WHERE
1685
+ category = 'Guitar'
1686
+ 
1687
+  (17.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
1688
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1689
+  (0.3ms) SELECT version FROM "schema_migrations"
1690
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161125151623')
1691
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20161017172847')
1692
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1693
+  (12.5ms) DROP TABLE "products" CASCADE
1694
+  (2.9ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1695
+  (0.2ms) DROP VIEW IF EXISTS guitars
1696
+  (0.9ms) CREATE VIEW guitars AS
1697
+ SELECT
1698
+ *
1699
+ FROM
1700
+ products
1701
+ WHERE
1702
+ category = 'Guitar'
1703
+ 
1704
+  (0.3ms) SELECT version FROM "schema_migrations"
1081
1705
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1082
-  (0.3ms) BEGIN
1083
- ------------------------------------
1084
- GeneratorsTest: test_file_generation
1085
- ------------------------------------
1086
-  (0.3ms) ROLLBACK
1087
-  (0.2ms) BEGIN
1088
- ----------------------
1089
- TasksTest: test_update
1090
- ----------------------
1091
-  (0.2ms) SAVEPOINT active_record_1
1092
- SQL (0.3ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-18 00:59:44.742494"], ["updated_at", "2016-10-18 00:59:44.742494"]]
1706
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1707
+  (0.5ms)  SELECT c.relname as name, c.relkind AS type
1708
+ FROM pg_class c
1709
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
1710
+ WHERE c.relkind IN ('v')
1711
+ AND n.nspname = ANY (current_schemas(false))
1712
+ ORDER BY c.oid ASC
1713
+ 
1714
+  (0.1ms) BEGIN
1715
+ -----------------------------------
1716
+ GeneratorTest: test_file_generation
1717
+ -----------------------------------
1718
+  (0.2ms) ROLLBACK
1719
+  (0.1ms) BEGIN
1720
+ -----------------------------------
1721
+ MigrationTest: test_create_and_drop
1722
+ -----------------------------------
1723
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1724
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1725
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1726
+ Migrating to CreateGuitarsView (20161125151623)
1727
+  (0.2ms) SAVEPOINT active_record_1
1728
+  (2.8ms) DROP VIEW guitars
1729
+ SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161125151623"]]
1093
1730
   (0.1ms) RELEASE SAVEPOINT active_record_1
1731
+ Migrating to CreateProducts (20161017172847)
1094
1732
   (0.1ms) SAVEPOINT active_record_1
1095
- SQL (0.1ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-18 00:59:44.745453"], ["updated_at", "2016-10-18 00:59:44.745453"]]
1733
+  (0.7ms) DROP TABLE "products"
1734
+ SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20161017172847"]]
1735
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1736
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1737
+ Migrating to CreateProducts (20161017172847)
1738
+  (0.1ms) SAVEPOINT active_record_1
1739
+  (13.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying, "category" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1740
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161017172847"]]
1096
1741
   (0.1ms) RELEASE SAVEPOINT active_record_1
1097
-  (0.2ms) DROP VIEW IF EXISTS guitars
1098
-  (1.5ms) CREATE VIEW guitars AS
1099
-
1742
+ Migrating to CreateGuitarsView (20161125151623)
1743
+  (0.1ms) SAVEPOINT active_record_1
1744
+  (0.7ms) CREATE VIEW guitars AS
1100
1745
  SELECT
1101
- products.*
1746
+ *
1102
1747
  FROM
1103
1748
  products
1104
1749
  WHERE
1105
- products.category = 'Guitar'
1750
+ category = 'Guitar'
1106
1751
 
1107
-  (0.3ms) DROP VIEW IF EXISTS tests
1108
-  (6.0ms) CREATE VIEW tests AS
1109
-
1110
-  (0.1ms) ROLLBACK
1111
- ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
1112
-  (0.2ms) BEGIN
1113
- ----------------------
1114
- TasksTest: test_update
1115
- ----------------------
1116
-  (0.1ms) SAVEPOINT active_record_1
1117
- SQL (0.4ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Les Paul"], ["category", "Guitar"], ["created_at", "2016-10-18 01:01:02.810985"], ["updated_at", "2016-10-18 01:01:02.810985"]]
1118
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1119
-  (0.1ms) SAVEPOINT active_record_1
1120
- SQL (0.2ms) INSERT INTO "products" ("name", "category", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["name", "Laney"], ["category", "Amps"], ["created_at", "2016-10-18 01:01:02.816600"], ["updated_at", "2016-10-18 01:01:02.816600"]]
1752
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161125151623"]]
1121
1753
   (0.1ms) RELEASE SAVEPOINT active_record_1
1122
-  (0.2ms) DROP VIEW IF EXISTS guitars
1123
-  (1.1ms) CREATE VIEW guitars AS
1124
-
1754
+  (6.7ms) ROLLBACK
1755
+  (0.1ms) BEGIN
1756
+ --------------------------
1757
+ MigrationTest: test_change
1758
+ --------------------------
1759
+  (0.4ms) DROP VIEW guitars
1760
+  (0.6ms) CREATE VIEW guitars AS
1125
1761
  SELECT
1126
- products.*
1762
+ *
1127
1763
  FROM
1128
1764
  products
1129
1765
  WHERE
1130
- products.category = 'Guitar'
1766
+ category = 'Guitar'
1131
1767
 
1132
-  (0.3ms) SELECT * FROM guitars
1133
-  (0.2ms) ROLLBACK
1134
-  (0.1ms) BEGIN
1135
- ------------------------------------
1136
- GeneratorsTest: test_file_generation
1137
- ------------------------------------
1138
-  (0.2ms) ROLLBACK
1768
+  (0.1ms) ROLLBACK