test/dummy/log/test.log in rails_sql_views4-0.0.2 vs test/dummy/log/test.log in rails_sql_views4-0.0.3

- old
+ new

@@ -34276,5 +34276,9443 @@ ------------------------------------ SchemaDumperTest: test_dump_and_load ------------------------------------  (0.1ms) drop view if exists V_PEOPLE  (0.1ms) drop view if exists V_PROFILE +  (112.9ms) DROP DATABASE IF EXISTS "rails_sql_views_unittest" +  (239.1ms) CREATE DATABASE "rails_sql_views_unittest" ENCODING = 'unicode' + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (3.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.8ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (2.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (3.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)  +  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200440') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200436') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200437') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200438') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200439') + ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (2.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (1.3ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.8ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 11:32:28.245375"], ["updated_at", "2015-12-19 11:32:28.245375"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (4.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (1.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) SAVEPOINT active_record_1 + SQL (2.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:21:52.688234"], ["updated_at", "2015-12-19 13:21:52.688234"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (2.4ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 4], ["created_at", "2015-12-19 13:21:52.733365"], ["updated_at", "2015-12-19 13:21:52.733365"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 4], ["created_at", "2015-12-19 13:21:52.743065"], ["updated_at", "2015-12-19 13:21:52.743065"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:21:52.747599"], ["updated_at", "2015-12-19 13:21:52.747599"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:21:52.751310"], ["updated_at", "2015-12-19 13:21:52.751310"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:21:52.754803"], ["updated_at", "2015-12-19 13:21:52.754803"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 4], ["item_id", 3], ["created_at", "2015-12-19 13:21:52.785071"], ["updated_at", "2015-12-19 13:21:52.785071"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 4], ["item_id", 5], ["created_at", "2015-12-19 13:21:52.793896"], ["updated_at", "2015-12-19 13:21:52.793896"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (2.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (2.0ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:11.094106"], ["updated_at", "2015-12-19 13:22:11.094106"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 5], ["created_at", "2015-12-19 13:22:11.135615"], ["updated_at", "2015-12-19 13:22:11.135615"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 5], ["created_at", "2015-12-19 13:22:11.141568"], ["updated_at", "2015-12-19 13:22:11.141568"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:11.145615"], ["updated_at", "2015-12-19 13:22:11.145615"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:11.149321"], ["updated_at", "2015-12-19 13:22:11.149321"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:11.153001"], ["updated_at", "2015-12-19 13:22:11.153001"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 5], ["item_id", 8], ["created_at", "2015-12-19 13:22:11.183173"], ["updated_at", "2015-12-19 13:22:11.183173"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 5], ["item_id", 10], ["created_at", "2015-12-19 13:22:11.191311"], ["updated_at", "2015-12-19 13:22:11.191311"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:13.616665"], ["updated_at", "2015-12-19 13:22:13.616665"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 3]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 6], ["created_at", "2015-12-19 13:22:13.629839"], ["updated_at", "2015-12-19 13:22:13.629839"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 6], ["created_at", "2015-12-19 13:22:13.635310"], ["updated_at", "2015-12-19 13:22:13.635310"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:13.640226"], ["updated_at", "2015-12-19 13:22:13.640226"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:13.644803"], ["updated_at", "2015-12-19 13:22:13.644803"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:13.648620"], ["updated_at", "2015-12-19 13:22:13.648620"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 6], ["item_id", 13], ["created_at", "2015-12-19 13:22:13.658505"], ["updated_at", "2015-12-19 13:22:13.658505"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 6], ["item_id", 15], ["created_at", "2015-12-19 13:22:13.667457"], ["updated_at", "2015-12-19 13:22:13.667457"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:15.830616"], ["updated_at", "2015-12-19 13:22:15.830616"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 7], ["created_at", "2015-12-19 13:22:15.843170"], ["updated_at", "2015-12-19 13:22:15.843170"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 7], ["created_at", "2015-12-19 13:22:15.849392"], ["updated_at", "2015-12-19 13:22:15.849392"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:15.853830"], ["updated_at", "2015-12-19 13:22:15.853830"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:15.858440"], ["updated_at", "2015-12-19 13:22:15.858440"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:15.862208"], ["updated_at", "2015-12-19 13:22:15.862208"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 7], ["item_id", 18], ["created_at", "2015-12-19 13:22:15.869884"], ["updated_at", "2015-12-19 13:22:15.869884"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 7], ["item_id", 20], ["created_at", "2015-12-19 13:22:15.878553"], ["updated_at", "2015-12-19 13:22:15.878553"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:19.700495"], ["updated_at", "2015-12-19 13:22:19.700495"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 5]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 8], ["created_at", "2015-12-19 13:22:19.714304"], ["updated_at", "2015-12-19 13:22:19.714304"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 8], ["created_at", "2015-12-19 13:22:19.720364"], ["updated_at", "2015-12-19 13:22:19.720364"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:19.725869"], ["updated_at", "2015-12-19 13:22:19.725869"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:19.730441"], ["updated_at", "2015-12-19 13:22:19.730441"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:19.734357"], ["updated_at", "2015-12-19 13:22:19.734357"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 8], ["item_id", 23], ["created_at", "2015-12-19 13:22:19.749200"], ["updated_at", "2015-12-19 13:22:19.749200"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 8], ["item_id", 25], ["created_at", "2015-12-19 13:22:19.757344"], ["updated_at", "2015-12-19 13:22:19.757344"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:21.963208"], ["updated_at", "2015-12-19 13:22:21.963208"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 6]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 9], ["created_at", "2015-12-19 13:22:21.977864"], ["updated_at", "2015-12-19 13:22:21.977864"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 9], ["created_at", "2015-12-19 13:22:21.984253"], ["updated_at", "2015-12-19 13:22:21.984253"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:21.990826"], ["updated_at", "2015-12-19 13:22:21.990826"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:21.995981"], ["updated_at", "2015-12-19 13:22:21.995981"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:22.000514"], ["updated_at", "2015-12-19 13:22:22.000514"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 9], ["item_id", 28], ["created_at", "2015-12-19 13:22:22.009130"], ["updated_at", "2015-12-19 13:22:22.009130"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 9], ["item_id", 30], ["created_at", "2015-12-19 13:22:22.016499"], ["updated_at", "2015-12-19 13:22:22.016499"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:25.521650"], ["updated_at", "2015-12-19 13:22:25.521650"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 7]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 10], ["created_at", "2015-12-19 13:22:25.535710"], ["updated_at", "2015-12-19 13:22:25.535710"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 10], ["created_at", "2015-12-19 13:22:25.542012"], ["updated_at", "2015-12-19 13:22:25.542012"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:25.547243"], ["updated_at", "2015-12-19 13:22:25.547243"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:25.551550"], ["updated_at", "2015-12-19 13:22:25.551550"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:22:25.555599"], ["updated_at", "2015-12-19 13:22:25.555599"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 10], ["item_id", 33], ["created_at", "2015-12-19 13:22:25.566702"], ["updated_at", "2015-12-19 13:22:25.566702"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 10], ["item_id", 35], ["created_at", "2015-12-19 13:22:25.575847"], ["updated_at", "2015-12-19 13:22:25.575847"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.5ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (2.0ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (19.8ms) DROP TABLE "items" CASCADE +  (3.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (1.9ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.5ms) DROP TABLE "people" CASCADE +  (2.6ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (2.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.3ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.4ms) SELECT version FROM "schema_migrations" +  (0.6ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (2.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.6ms) DROP TABLE "people2" CASCADE +  (2.6ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (2.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (18.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "items_people" CASCADE +  (1.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "people" CASCADE +  (2.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.7ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.2ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:22:41.316997"], ["updated_at", "2015-12-19 13:22:41.316997"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (2.9ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (3.2ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (1.3ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.8ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (1.3ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.5ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.1ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (1.2ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.3ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:28:15.043521"], ["updated_at", "2015-12-19 13:28:15.043521"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 8]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 12], ["created_at", "2015-12-19 13:28:15.092853"], ["updated_at", "2015-12-19 13:28:15.092853"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 12], ["created_at", "2015-12-19 13:28:15.112088"], ["updated_at", "2015-12-19 13:28:15.112088"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:28:15.116745"], ["updated_at", "2015-12-19 13:28:15.116745"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:28:15.120720"], ["updated_at", "2015-12-19 13:28:15.120720"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:28:15.124684"], ["updated_at", "2015-12-19 13:28:15.124684"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 12], ["item_id", 38], ["created_at", "2015-12-19 13:28:15.145392"], ["updated_at", "2015-12-19 13:28:15.145392"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 12], ["item_id", 40], ["created_at", "2015-12-19 13:28:15.152623"], ["updated_at", "2015-12-19 13:28:15.152623"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (1.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (2.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.7ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (1.2ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.7ms) DROP VIEW "v_place" +  (0.4ms) SELECT * FROM v_place +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.4ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (1.4ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (2.0ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.3ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.7ms) DROP TABLE "items" CASCADE +  (17.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "items_people" CASCADE +  (2.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.2ms) DROP TABLE "people" CASCADE +  (3.0ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (3.0ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "items_people" CASCADE +  (2.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "people" CASCADE +  (2.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.6ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "places" CASCADE +  (2.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (18.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "people" CASCADE +  (2.8ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (3.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.1ms) DROP TABLE "places" CASCADE +  (3.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.4ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:34:36.209102"], ["updated_at", "2015-12-19 13:34:36.209102"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (2.0ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.7ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.2ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "people" CASCADE +  (2.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.4ms) drop view if exists V_PROFILE +  (2.4ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.7ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.3ms) DROP TABLE "people2" CASCADE +  (3.3ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) DROP VIEW "v_people" +  (0.5ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.5ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (2.0ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.799175"], ["updated_at", "2015-12-19 13:34:56.799175"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 9]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 18], ["created_at", "2015-12-19 13:34:56.824929"], ["updated_at", "2015-12-19 13:34:56.824929"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 18], ["created_at", "2015-12-19 13:34:56.826786"], ["updated_at", "2015-12-19 13:34:56.826786"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.827830"], ["updated_at", "2015-12-19 13:34:56.827830"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.828922"], ["updated_at", "2015-12-19 13:34:56.828922"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.829882"], ["updated_at", "2015-12-19 13:34:56.829882"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 18], ["item_id", 43], ["created_at", "2015-12-19 13:34:56.839111"], ["updated_at", "2015-12-19 13:34:56.839111"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 18], ["item_id", 45], ["created_at", "2015-12-19 13:34:56.841150"], ["updated_at", "2015-12-19 13:34:56.841150"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.846838"], ["updated_at", "2015-12-19 13:34:56.846838"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 10]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 19], ["created_at", "2015-12-19 13:34:56.850074"], ["updated_at", "2015-12-19 13:34:56.850074"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 19], ["created_at", "2015-12-19 13:34:56.851334"], ["updated_at", "2015-12-19 13:34:56.851334"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.852367"], ["updated_at", "2015-12-19 13:34:56.852367"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.853304"], ["updated_at", "2015-12-19 13:34:56.853304"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.854265"], ["updated_at", "2015-12-19 13:34:56.854265"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 19], ["item_id", 48], ["created_at", "2015-12-19 13:34:56.855997"], ["updated_at", "2015-12-19 13:34:56.855997"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 19], ["item_id", 50], ["created_at", "2015-12-19 13:34:56.857466"], ["updated_at", "2015-12-19 13:34:56.857466"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.862963"], ["updated_at", "2015-12-19 13:34:56.862963"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 11]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 20], ["created_at", "2015-12-19 13:34:56.865922"], ["updated_at", "2015-12-19 13:34:56.865922"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 20], ["created_at", "2015-12-19 13:34:56.867160"], ["updated_at", "2015-12-19 13:34:56.867160"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.868153"], ["updated_at", "2015-12-19 13:34:56.868153"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.869085"], ["updated_at", "2015-12-19 13:34:56.869085"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.870041"], ["updated_at", "2015-12-19 13:34:56.870041"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 20], ["item_id", 53], ["created_at", "2015-12-19 13:34:56.871780"], ["updated_at", "2015-12-19 13:34:56.871780"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 20], ["item_id", 55], ["created_at", "2015-12-19 13:34:56.873251"], ["updated_at", "2015-12-19 13:34:56.873251"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.878781"], ["updated_at", "2015-12-19 13:34:56.878781"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 12]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 21], ["created_at", "2015-12-19 13:34:56.882285"], ["updated_at", "2015-12-19 13:34:56.882285"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 21], ["created_at", "2015-12-19 13:34:56.883580"], ["updated_at", "2015-12-19 13:34:56.883580"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.884579"], ["updated_at", "2015-12-19 13:34:56.884579"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.885523"], ["updated_at", "2015-12-19 13:34:56.885523"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.886452"], ["updated_at", "2015-12-19 13:34:56.886452"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 21], ["item_id", 58], ["created_at", "2015-12-19 13:34:56.888181"], ["updated_at", "2015-12-19 13:34:56.888181"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 21], ["item_id", 60], ["created_at", "2015-12-19 13:34:56.889688"], ["updated_at", "2015-12-19 13:34:56.889688"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.894923"], ["updated_at", "2015-12-19 13:34:56.894923"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 13]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 22], ["created_at", "2015-12-19 13:34:56.899912"], ["updated_at", "2015-12-19 13:34:56.899912"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 22], ["created_at", "2015-12-19 13:34:56.901661"], ["updated_at", "2015-12-19 13:34:56.901661"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.902823"], ["updated_at", "2015-12-19 13:34:56.902823"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.903854"], ["updated_at", "2015-12-19 13:34:56.903854"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.904785"], ["updated_at", "2015-12-19 13:34:56.904785"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 22], ["item_id", 63], ["created_at", "2015-12-19 13:34:56.906853"], ["updated_at", "2015-12-19 13:34:56.906853"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 22], ["item_id", 65], ["created_at", "2015-12-19 13:34:56.908334"], ["updated_at", "2015-12-19 13:34:56.908334"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.914326"], ["updated_at", "2015-12-19 13:34:56.914326"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 14]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 23], ["created_at", "2015-12-19 13:34:56.917749"], ["updated_at", "2015-12-19 13:34:56.917749"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 23], ["created_at", "2015-12-19 13:34:56.919009"], ["updated_at", "2015-12-19 13:34:56.919009"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.920001"], ["updated_at", "2015-12-19 13:34:56.920001"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.920947"], ["updated_at", "2015-12-19 13:34:56.920947"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:34:56.921940"], ["updated_at", "2015-12-19 13:34:56.921940"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 23], ["item_id", 68], ["created_at", "2015-12-19 13:34:56.923635"], ["updated_at", "2015-12-19 13:34:56.923635"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 23], ["item_id", 70], ["created_at", "2015-12-19 13:34:56.925095"], ["updated_at", "2015-12-19 13:34:56.925095"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.2ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.1ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.2ms) DROP TABLE "people" CASCADE +  (2.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.6ms) DROP TABLE "people2" CASCADE +  (2.8ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "places" CASCADE +  (2.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.9ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "items_people" CASCADE +  (3.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (2.6ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (17.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.8ms) DROP TABLE "people2" CASCADE +  (4.4ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) DROP TABLE "places" CASCADE +  (6.9ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:34:57.158329"], ["updated_at", "2015-12-19 13:34:57.158329"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.5ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.9ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "items_people" CASCADE +  (2.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "people" CASCADE +  (2.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.5ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.9ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.3ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.0ms) DROP TABLE "people2" CASCADE +  (2.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.4ms) DROP VIEW "v_people" +  (1.0ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.8ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.0ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (113.4ms) DROP DATABASE IF EXISTS "rails_sql_views_unittest" +  (241.9ms) CREATE DATABASE "rails_sql_views_unittest" ENCODING = 'unicode' + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (3.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (2.0ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)  +  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200440') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200436') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200437') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200438') +  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141228200439') + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (1.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.7ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.5ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.3ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "people" CASCADE +  (2.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.1ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.5ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.9ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.3ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (1.7ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "people" CASCADE +  (2.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "places" CASCADE +  (2.9ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (1.8ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:36:37.443398"], ["updated_at", "2015-12-19 13:36:37.443398"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.5ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "people" CASCADE +  (2.6ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.4ms) DROP TABLE "people2" CASCADE +  (3.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "places" CASCADE +  (3.1ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.4ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.4ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.5ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.7ms) DROP TABLE "items" CASCADE +  (17.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (2.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.0ms) DROP TABLE "people2" CASCADE +  (2.6ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (4.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.8ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.631334"], ["updated_at", "2015-12-19 13:36:37.631334"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 1]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 4], ["created_at", "2015-12-19 13:36:37.660519"], ["updated_at", "2015-12-19 13:36:37.660519"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 4], ["created_at", "2015-12-19 13:36:37.663945"], ["updated_at", "2015-12-19 13:36:37.663945"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.665762"], ["updated_at", "2015-12-19 13:36:37.665762"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.667567"], ["updated_at", "2015-12-19 13:36:37.667567"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.669200"], ["updated_at", "2015-12-19 13:36:37.669200"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 4], ["item_id", 3], ["created_at", "2015-12-19 13:36:37.681941"], ["updated_at", "2015-12-19 13:36:37.681941"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 4], ["item_id", 5], ["created_at", "2015-12-19 13:36:37.684935"], ["updated_at", "2015-12-19 13:36:37.684935"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.691610"], ["updated_at", "2015-12-19 13:36:37.691610"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 2]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 5], ["created_at", "2015-12-19 13:36:37.695427"], ["updated_at", "2015-12-19 13:36:37.695427"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 5], ["created_at", "2015-12-19 13:36:37.697281"], ["updated_at", "2015-12-19 13:36:37.697281"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.698830"], ["updated_at", "2015-12-19 13:36:37.698830"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.700529"], ["updated_at", "2015-12-19 13:36:37.700529"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.701806"], ["updated_at", "2015-12-19 13:36:37.701806"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 5], ["item_id", 8], ["created_at", "2015-12-19 13:36:37.705169"], ["updated_at", "2015-12-19 13:36:37.705169"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 5], ["item_id", 10], ["created_at", "2015-12-19 13:36:37.707776"], ["updated_at", "2015-12-19 13:36:37.707776"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.714550"], ["updated_at", "2015-12-19 13:36:37.714550"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 3]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 6], ["created_at", "2015-12-19 13:36:37.718613"], ["updated_at", "2015-12-19 13:36:37.718613"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 6], ["created_at", "2015-12-19 13:36:37.720699"], ["updated_at", "2015-12-19 13:36:37.720699"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.722710"], ["updated_at", "2015-12-19 13:36:37.722710"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.724137"], ["updated_at", "2015-12-19 13:36:37.724137"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.725684"], ["updated_at", "2015-12-19 13:36:37.725684"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 6], ["item_id", 13], ["created_at", "2015-12-19 13:36:37.728426"], ["updated_at", "2015-12-19 13:36:37.728426"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 6], ["item_id", 15], ["created_at", "2015-12-19 13:36:37.730298"], ["updated_at", "2015-12-19 13:36:37.730298"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.746633"], ["updated_at", "2015-12-19 13:36:37.746633"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 4]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 7], ["created_at", "2015-12-19 13:36:37.750353"], ["updated_at", "2015-12-19 13:36:37.750353"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 7], ["created_at", "2015-12-19 13:36:37.751761"], ["updated_at", "2015-12-19 13:36:37.751761"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.752800"], ["updated_at", "2015-12-19 13:36:37.752800"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.753784"], ["updated_at", "2015-12-19 13:36:37.753784"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.755141"], ["updated_at", "2015-12-19 13:36:37.755141"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 7], ["item_id", 18], ["created_at", "2015-12-19 13:36:37.758362"], ["updated_at", "2015-12-19 13:36:37.758362"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 7], ["item_id", 20], ["created_at", "2015-12-19 13:36:37.761080"], ["updated_at", "2015-12-19 13:36:37.761080"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.767801"], ["updated_at", "2015-12-19 13:36:37.767801"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 5]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 8], ["created_at", "2015-12-19 13:36:37.771068"], ["updated_at", "2015-12-19 13:36:37.771068"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 8], ["created_at", "2015-12-19 13:36:37.772340"], ["updated_at", "2015-12-19 13:36:37.772340"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.773361"], ["updated_at", "2015-12-19 13:36:37.773361"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.774459"], ["updated_at", "2015-12-19 13:36:37.774459"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.776064"], ["updated_at", "2015-12-19 13:36:37.776064"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 8], ["item_id", 23], ["created_at", "2015-12-19 13:36:37.778406"], ["updated_at", "2015-12-19 13:36:37.778406"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 8], ["item_id", 25], ["created_at", "2015-12-19 13:36:37.780143"], ["updated_at", "2015-12-19 13:36:37.780143"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.785314"], ["updated_at", "2015-12-19 13:36:37.785314"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 6]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 9], ["created_at", "2015-12-19 13:36:37.788739"], ["updated_at", "2015-12-19 13:36:37.788739"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 9], ["created_at", "2015-12-19 13:36:37.791219"], ["updated_at", "2015-12-19 13:36:37.791219"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.793086"], ["updated_at", "2015-12-19 13:36:37.793086"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.794596"], ["updated_at", "2015-12-19 13:36:37.794596"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:36:37.795670"], ["updated_at", "2015-12-19 13:36:37.795670"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 9], ["item_id", 28], ["created_at", "2015-12-19 13:36:37.797972"], ["updated_at", "2015-12-19 13:36:37.797972"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 9], ["item_id", 30], ["created_at", "2015-12-19 13:36:37.799536"], ["updated_at", "2015-12-19 13:36:37.799536"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.3ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.2ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (3.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (2.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (3.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (3.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.9ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.3ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.5ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.1ms) DROP TABLE "people2" CASCADE +  (4.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (3.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.9ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (4.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.9ms) DROP TABLE "people2" CASCADE +  (2.6ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.9ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:40:10.178992"], ["updated_at", "2015-12-19 13:40:10.178992"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.3ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.0ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (3.3ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.5ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (3.1ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (2.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.7ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.4ms) DROP VIEW "v_people" +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (1.0ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.2ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.9ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.6ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.5ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.7ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.417904"], ["updated_at", "2015-12-19 13:40:10.417904"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 7]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 13], ["created_at", "2015-12-19 13:40:10.443422"], ["updated_at", "2015-12-19 13:40:10.443422"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 13], ["created_at", "2015-12-19 13:40:10.445934"], ["updated_at", "2015-12-19 13:40:10.445934"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.448003"], ["updated_at", "2015-12-19 13:40:10.448003"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.450091"], ["updated_at", "2015-12-19 13:40:10.450091"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.451953"], ["updated_at", "2015-12-19 13:40:10.451953"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 13], ["item_id", 33], ["created_at", "2015-12-19 13:40:10.464566"], ["updated_at", "2015-12-19 13:40:10.464566"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 13], ["item_id", 35], ["created_at", "2015-12-19 13:40:10.467216"], ["updated_at", "2015-12-19 13:40:10.467216"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.473620"], ["updated_at", "2015-12-19 13:40:10.473620"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 8]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 14], ["created_at", "2015-12-19 13:40:10.477219"], ["updated_at", "2015-12-19 13:40:10.477219"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 14], ["created_at", "2015-12-19 13:40:10.478732"], ["updated_at", "2015-12-19 13:40:10.478732"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.479910"], ["updated_at", "2015-12-19 13:40:10.479910"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.481030"], ["updated_at", "2015-12-19 13:40:10.481030"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.482429"], ["updated_at", "2015-12-19 13:40:10.482429"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 14], ["item_id", 38], ["created_at", "2015-12-19 13:40:10.484662"], ["updated_at", "2015-12-19 13:40:10.484662"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 14], ["item_id", 40], ["created_at", "2015-12-19 13:40:10.486411"], ["updated_at", "2015-12-19 13:40:10.486411"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.492358"], ["updated_at", "2015-12-19 13:40:10.492358"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 9]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 15], ["created_at", "2015-12-19 13:40:10.496060"], ["updated_at", "2015-12-19 13:40:10.496060"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 15], ["created_at", "2015-12-19 13:40:10.497749"], ["updated_at", "2015-12-19 13:40:10.497749"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.499074"], ["updated_at", "2015-12-19 13:40:10.499074"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.500199"], ["updated_at", "2015-12-19 13:40:10.500199"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.501288"], ["updated_at", "2015-12-19 13:40:10.501288"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 15], ["item_id", 43], ["created_at", "2015-12-19 13:40:10.511258"], ["updated_at", "2015-12-19 13:40:10.511258"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 15], ["item_id", 45], ["created_at", "2015-12-19 13:40:10.513084"], ["updated_at", "2015-12-19 13:40:10.513084"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.520041"], ["updated_at", "2015-12-19 13:40:10.520041"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 10]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 16], ["created_at", "2015-12-19 13:40:10.523846"], ["updated_at", "2015-12-19 13:40:10.523846"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 16], ["created_at", "2015-12-19 13:40:10.525272"], ["updated_at", "2015-12-19 13:40:10.525272"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.526320"], ["updated_at", "2015-12-19 13:40:10.526320"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.527412"], ["updated_at", "2015-12-19 13:40:10.527412"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.528382"], ["updated_at", "2015-12-19 13:40:10.528382"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 16], ["item_id", 48], ["created_at", "2015-12-19 13:40:10.530644"], ["updated_at", "2015-12-19 13:40:10.530644"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 16], ["item_id", 50], ["created_at", "2015-12-19 13:40:10.532261"], ["updated_at", "2015-12-19 13:40:10.532261"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.537620"], ["updated_at", "2015-12-19 13:40:10.537620"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 11]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 17], ["created_at", "2015-12-19 13:40:10.541366"], ["updated_at", "2015-12-19 13:40:10.541366"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 17], ["created_at", "2015-12-19 13:40:10.542717"], ["updated_at", "2015-12-19 13:40:10.542717"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.543789"], ["updated_at", "2015-12-19 13:40:10.543789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.544821"], ["updated_at", "2015-12-19 13:40:10.544821"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.545973"], ["updated_at", "2015-12-19 13:40:10.545973"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 17], ["item_id", 53], ["created_at", "2015-12-19 13:40:10.547967"], ["updated_at", "2015-12-19 13:40:10.547967"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 17], ["item_id", 55], ["created_at", "2015-12-19 13:40:10.549557"], ["updated_at", "2015-12-19 13:40:10.549557"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.555502"], ["updated_at", "2015-12-19 13:40:10.555502"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 12]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 18], ["created_at", "2015-12-19 13:40:10.559312"], ["updated_at", "2015-12-19 13:40:10.559312"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 18], ["created_at", "2015-12-19 13:40:10.560631"], ["updated_at", "2015-12-19 13:40:10.560631"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.561884"], ["updated_at", "2015-12-19 13:40:10.561884"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.562964"], ["updated_at", "2015-12-19 13:40:10.562964"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:40:10.564691"], ["updated_at", "2015-12-19 13:40:10.564691"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 18], ["item_id", 58], ["created_at", "2015-12-19 13:40:10.567711"], ["updated_at", "2015-12-19 13:40:10.567711"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 18], ["item_id", 60], ["created_at", "2015-12-19 13:40:10.569753"], ["updated_at", "2015-12-19 13:40:10.569753"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (1.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.306019"], ["updated_at", "2015-12-19 13:46:45.306019"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 13]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 19], ["created_at", "2015-12-19 13:46:45.331237"], ["updated_at", "2015-12-19 13:46:45.331237"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 19], ["created_at", "2015-12-19 13:46:45.333232"], ["updated_at", "2015-12-19 13:46:45.333232"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.334977"], ["updated_at", "2015-12-19 13:46:45.334977"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.336325"], ["updated_at", "2015-12-19 13:46:45.336325"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.337331"], ["updated_at", "2015-12-19 13:46:45.337331"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 19], ["item_id", 63], ["created_at", "2015-12-19 13:46:45.347186"], ["updated_at", "2015-12-19 13:46:45.347186"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 19], ["item_id", 65], ["created_at", "2015-12-19 13:46:45.349350"], ["updated_at", "2015-12-19 13:46:45.349350"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.356624"], ["updated_at", "2015-12-19 13:46:45.356624"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 14]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 20], ["created_at", "2015-12-19 13:46:45.359782"], ["updated_at", "2015-12-19 13:46:45.359782"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 20], ["created_at", "2015-12-19 13:46:45.361080"], ["updated_at", "2015-12-19 13:46:45.361080"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.362097"], ["updated_at", "2015-12-19 13:46:45.362097"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.363092"], ["updated_at", "2015-12-19 13:46:45.363092"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.364090"], ["updated_at", "2015-12-19 13:46:45.364090"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 20], ["item_id", 68], ["created_at", "2015-12-19 13:46:45.365888"], ["updated_at", "2015-12-19 13:46:45.365888"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 20], ["item_id", 70], ["created_at", "2015-12-19 13:46:45.367520"], ["updated_at", "2015-12-19 13:46:45.367520"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.372872"], ["updated_at", "2015-12-19 13:46:45.372872"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 15]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 21], ["created_at", "2015-12-19 13:46:45.375867"], ["updated_at", "2015-12-19 13:46:45.375867"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 21], ["created_at", "2015-12-19 13:46:45.377176"], ["updated_at", "2015-12-19 13:46:45.377176"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.378173"], ["updated_at", "2015-12-19 13:46:45.378173"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.379167"], ["updated_at", "2015-12-19 13:46:45.379167"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.380117"], ["updated_at", "2015-12-19 13:46:45.380117"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 21], ["item_id", 73], ["created_at", "2015-12-19 13:46:45.381860"], ["updated_at", "2015-12-19 13:46:45.381860"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 21], ["item_id", 75], ["created_at", "2015-12-19 13:46:45.383325"], ["updated_at", "2015-12-19 13:46:45.383325"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.389080"], ["updated_at", "2015-12-19 13:46:45.389080"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 16]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 22], ["created_at", "2015-12-19 13:46:45.392239"], ["updated_at", "2015-12-19 13:46:45.392239"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 22], ["created_at", "2015-12-19 13:46:45.393540"], ["updated_at", "2015-12-19 13:46:45.393540"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.394523"], ["updated_at", "2015-12-19 13:46:45.394523"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.395502"], ["updated_at", "2015-12-19 13:46:45.395502"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.396443"], ["updated_at", "2015-12-19 13:46:45.396443"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 22], ["item_id", 78], ["created_at", "2015-12-19 13:46:45.398180"], ["updated_at", "2015-12-19 13:46:45.398180"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 22], ["item_id", 80], ["created_at", "2015-12-19 13:46:45.399646"], ["updated_at", "2015-12-19 13:46:45.399646"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.406339"], ["updated_at", "2015-12-19 13:46:45.406339"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 17]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 23], ["created_at", "2015-12-19 13:46:45.409526"], ["updated_at", "2015-12-19 13:46:45.409526"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 23], ["created_at", "2015-12-19 13:46:45.410833"], ["updated_at", "2015-12-19 13:46:45.410833"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.411842"], ["updated_at", "2015-12-19 13:46:45.411842"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.412805"], ["updated_at", "2015-12-19 13:46:45.412805"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.413781"], ["updated_at", "2015-12-19 13:46:45.413781"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 23], ["item_id", 83], ["created_at", "2015-12-19 13:46:45.415550"], ["updated_at", "2015-12-19 13:46:45.415550"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 23], ["item_id", 85], ["created_at", "2015-12-19 13:46:45.417173"], ["updated_at", "2015-12-19 13:46:45.417173"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.422553"], ["updated_at", "2015-12-19 13:46:45.422553"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 18]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 24], ["created_at", "2015-12-19 13:46:45.425895"], ["updated_at", "2015-12-19 13:46:45.425895"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 24], ["created_at", "2015-12-19 13:46:45.427182"], ["updated_at", "2015-12-19 13:46:45.427182"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.428198"], ["updated_at", "2015-12-19 13:46:45.428198"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.429186"], ["updated_at", "2015-12-19 13:46:45.429186"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:46:45.430147"], ["updated_at", "2015-12-19 13:46:45.430147"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 24], ["item_id", 88], ["created_at", "2015-12-19 13:46:45.431947"], ["updated_at", "2015-12-19 13:46:45.431947"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 24], ["item_id", 90], ["created_at", "2015-12-19 13:46:45.433458"], ["updated_at", "2015-12-19 13:46:45.433458"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.5ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.2ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.0ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (16.7ms) DROP TABLE "items" CASCADE +  (18.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.5ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.2ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "places" CASCADE +  (3.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.1ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.9ms) DROP TABLE "people2" CASCADE +  (4.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.2ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (2.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:46:45.672920"], ["updated_at", "2015-12-19 13:46:45.672920"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.2ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (17.7ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (3.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (3.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.3ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.4ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "places" CASCADE +  (2.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.5ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.8ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (1.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.3ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.8ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.2ms) DROP TABLE "people" CASCADE +  (3.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "places" CASCADE +  (3.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.4ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.9ms) DROP TABLE "people2" CASCADE +  (4.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (2.7ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (3.6ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 13:52:27.961376"], ["updated_at", "2015-12-19 13:52:27.961376"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.3ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (1.9ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.5ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "items_people" CASCADE +  (1.7ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "people" CASCADE +  (2.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.5ms) DROP TABLE "people2" CASCADE +  (2.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (2.9ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.6ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.6ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + Person Load (0.2ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", nil]] + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + Person Load (0.3ms) SELECT "people".* FROM "people" + Person Load (0.4ms) SELECT "people".* FROM "people" + Person Load (0.3ms) SELECT "people".* FROM "people" +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:54:46.858242"], ["updated_at", "2015-12-19 13:54:46.858242"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 19]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 31], ["created_at", "2015-12-19 13:54:48.971203"], ["updated_at", "2015-12-19 13:54:48.971203"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 31], ["created_at", "2015-12-19 13:54:48.981073"], ["updated_at", "2015-12-19 13:54:48.981073"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:54:49.849721"], ["updated_at", "2015-12-19 13:54:49.849721"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:54:49.863130"], ["updated_at", "2015-12-19 13:54:49.863130"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 13:54:49.871200"], ["updated_at", "2015-12-19 13:54:49.871200"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 31], ["item_id", 93], ["created_at", "2015-12-19 13:54:50.733998"], ["updated_at", "2015-12-19 13:54:50.733998"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 31], ["item_id", 95], ["created_at", "2015-12-19 13:54:52.050841"], ["updated_at", "2015-12-19 13:54:52.050841"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.4ms) SELECT "v_people".* FROM "v_people" LIMIT 1 + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + Person Load (0.3ms) SELECT "people".* FROM "people" WHERE "people"."id" = $1 LIMIT 1 [["id", 31]] + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (1.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.1ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.3ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.5ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.2ms) DROP TABLE "people" CASCADE +  (3.8ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.1ms) DROP TABLE "people2" CASCADE +  (2.8ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (3.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (17.1ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.4ms) DROP TABLE "places" CASCADE +  (3.7ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.7ms) DROP TABLE "items" CASCADE +  (17.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (2.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (2.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.9ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 14:03:40.173098"], ["updated_at", "2015-12-19 14:03:40.173098"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "items_people" CASCADE +  (2.8ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "people" CASCADE +  (2.6ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.7ms) DROP TABLE "people2" CASCADE +  (3.3ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.4ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.5ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.5ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.5ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "items_people" CASCADE +  (1.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "people" CASCADE +  (2.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.5ms) DROP TABLE "people2" CASCADE +  (3.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.5ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (3.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (1.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.2ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.1ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.3ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name") VALUES ($1) RETURNING "id" [["first_name", "toto"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + Person Load (0.4ms) SELECT "people".* FROM "people" + VPerson Load (0.4ms) SELECT "v_people".* FROM "v_people" +  (0.5ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (1.4ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (3.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (2.0ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:25.321847"], ["updated_at", "2015-12-19 14:53:25.321847"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 20]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 38], ["created_at", "2015-12-19 14:53:26.431779"], ["updated_at", "2015-12-19 14:53:26.431779"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 38], ["created_at", "2015-12-19 14:53:26.446885"], ["updated_at", "2015-12-19 14:53:26.446885"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:26.916216"], ["updated_at", "2015-12-19 14:53:26.916216"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:26.929006"], ["updated_at", "2015-12-19 14:53:26.929006"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:26.943334"], ["updated_at", "2015-12-19 14:53:26.943334"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 38], ["item_id", 98], ["created_at", "2015-12-19 14:53:27.574631"], ["updated_at", "2015-12-19 14:53:27.574631"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 38], ["item_id", 100], ["created_at", "2015-12-19 14:53:28.214882"], ["updated_at", "2015-12-19 14:53:28.214882"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.6ms) SELECT "v_people".* FROM "v_people" + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 38]] + Place Load (0.4ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 20]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.278036"], ["updated_at", "2015-12-19 14:53:39.278036"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 21]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 39], ["created_at", "2015-12-19 14:53:39.282346"], ["updated_at", "2015-12-19 14:53:39.282346"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 39], ["created_at", "2015-12-19 14:53:39.284157"], ["updated_at", "2015-12-19 14:53:39.284157"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.285233"], ["updated_at", "2015-12-19 14:53:39.285233"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.286222"], ["updated_at", "2015-12-19 14:53:39.286222"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.287195"], ["updated_at", "2015-12-19 14:53:39.287195"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 39], ["item_id", 103], ["created_at", "2015-12-19 14:53:39.289045"], ["updated_at", "2015-12-19 14:53:39.289045"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 39], ["item_id", 105], ["created_at", "2015-12-19 14:53:39.290643"], ["updated_at", "2015-12-19 14:53:39.290643"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 39]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 39]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 39]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (1.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.956227"], ["updated_at", "2015-12-19 14:53:39.956227"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 22]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 40], ["created_at", "2015-12-19 14:53:39.960393"], ["updated_at", "2015-12-19 14:53:39.960393"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 40], ["created_at", "2015-12-19 14:53:39.962328"], ["updated_at", "2015-12-19 14:53:39.962328"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.964341"], ["updated_at", "2015-12-19 14:53:39.964341"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.966005"], ["updated_at", "2015-12-19 14:53:39.966005"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:39.967074"], ["updated_at", "2015-12-19 14:53:39.967074"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 40], ["item_id", 108], ["created_at", "2015-12-19 14:53:39.969023"], ["updated_at", "2015-12-19 14:53:39.969023"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 40], ["item_id", 110], ["created_at", "2015-12-19 14:53:39.970613"], ["updated_at", "2015-12-19 14:53:39.970613"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 40]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:40.527125"], ["updated_at", "2015-12-19 14:53:40.527125"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 23]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 41], ["created_at", "2015-12-19 14:53:40.531199"], ["updated_at", "2015-12-19 14:53:40.531199"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 41], ["created_at", "2015-12-19 14:53:40.532747"], ["updated_at", "2015-12-19 14:53:40.532747"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:40.533803"], ["updated_at", "2015-12-19 14:53:40.533803"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:40.534772"], ["updated_at", "2015-12-19 14:53:40.534772"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:40.535737"], ["updated_at", "2015-12-19 14:53:40.535737"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 41], ["item_id", 113], ["created_at", "2015-12-19 14:53:40.537532"], ["updated_at", "2015-12-19 14:53:40.537532"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 41], ["item_id", 115], ["created_at", "2015-12-19 14:53:40.539004"], ["updated_at", "2015-12-19 14:53:40.539004"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 41]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (1.0ms) DROP TABLE "items" CASCADE +  (17.6ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "items_people" CASCADE +  (3.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.3ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (3.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.1ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) DROP TABLE "people" CASCADE +  (3.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.1ms) DROP TABLE "people2" CASCADE +  (3.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "places" CASCADE +  (3.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.9ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.5ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) DROP TABLE "items_people" CASCADE +  (3.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "people" CASCADE +  (2.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.1ms) DROP TABLE "people2" CASCADE +  (3.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) DROP TABLE "places" CASCADE +  (2.1ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.2ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 14:53:57.534421"], ["updated_at", "2015-12-19 14:53:57.534421"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (2.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.5ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (1.6ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.2ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.3ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.6ms) DROP TABLE "people2" CASCADE +  (4.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) DROP VIEW "v_people" +  (0.5ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.5ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.7ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.5ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.7ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.774558"], ["updated_at", "2015-12-19 14:53:57.774558"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 24]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 45], ["created_at", "2015-12-19 14:53:57.800919"], ["updated_at", "2015-12-19 14:53:57.800919"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 45], ["created_at", "2015-12-19 14:53:57.803454"], ["updated_at", "2015-12-19 14:53:57.803454"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.804600"], ["updated_at", "2015-12-19 14:53:57.804600"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.805739"], ["updated_at", "2015-12-19 14:53:57.805739"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.806819"], ["updated_at", "2015-12-19 14:53:57.806819"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 45], ["item_id", 118], ["created_at", "2015-12-19 14:53:57.817346"], ["updated_at", "2015-12-19 14:53:57.817346"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 45], ["item_id", 120], ["created_at", "2015-12-19 14:53:57.819594"], ["updated_at", "2015-12-19 14:53:57.819594"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 45]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 24]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.830347"], ["updated_at", "2015-12-19 14:53:57.830347"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 25]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 46], ["created_at", "2015-12-19 14:53:57.833989"], ["updated_at", "2015-12-19 14:53:57.833989"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 46], ["created_at", "2015-12-19 14:53:57.835413"], ["updated_at", "2015-12-19 14:53:57.835413"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.836527"], ["updated_at", "2015-12-19 14:53:57.836527"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.837618"], ["updated_at", "2015-12-19 14:53:57.837618"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.838739"], ["updated_at", "2015-12-19 14:53:57.838739"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 46], ["item_id", 123], ["created_at", "2015-12-19 14:53:57.840913"], ["updated_at", "2015-12-19 14:53:57.840913"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 46], ["item_id", 125], ["created_at", "2015-12-19 14:53:57.842714"], ["updated_at", "2015-12-19 14:53:57.842714"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 46]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 46]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 46]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.858128"], ["updated_at", "2015-12-19 14:53:57.858128"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 26]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 47], ["created_at", "2015-12-19 14:53:57.862043"], ["updated_at", "2015-12-19 14:53:57.862043"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 47], ["created_at", "2015-12-19 14:53:57.863810"], ["updated_at", "2015-12-19 14:53:57.863810"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.865075"], ["updated_at", "2015-12-19 14:53:57.865075"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.866420"], ["updated_at", "2015-12-19 14:53:57.866420"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.867540"], ["updated_at", "2015-12-19 14:53:57.867540"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 47], ["item_id", 128], ["created_at", "2015-12-19 14:53:57.869530"], ["updated_at", "2015-12-19 14:53:57.869530"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 47], ["item_id", 130], ["created_at", "2015-12-19 14:53:57.871100"], ["updated_at", "2015-12-19 14:53:57.871100"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 47]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.877001"], ["updated_at", "2015-12-19 14:53:57.877001"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 27]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 48], ["created_at", "2015-12-19 14:53:57.881224"], ["updated_at", "2015-12-19 14:53:57.881224"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 48], ["created_at", "2015-12-19 14:53:57.884217"], ["updated_at", "2015-12-19 14:53:57.884217"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.885610"], ["updated_at", "2015-12-19 14:53:57.885610"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.886762"], ["updated_at", "2015-12-19 14:53:57.886762"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.887821"], ["updated_at", "2015-12-19 14:53:57.887821"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 48], ["item_id", 133], ["created_at", "2015-12-19 14:53:57.889757"], ["updated_at", "2015-12-19 14:53:57.889757"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 48], ["item_id", 135], ["created_at", "2015-12-19 14:53:57.891387"], ["updated_at", "2015-12-19 14:53:57.891387"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 48]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.897349"], ["updated_at", "2015-12-19 14:53:57.897349"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 28]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 49], ["created_at", "2015-12-19 14:53:57.900897"], ["updated_at", "2015-12-19 14:53:57.900897"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 49], ["created_at", "2015-12-19 14:53:57.902216"], ["updated_at", "2015-12-19 14:53:57.902216"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.903337"], ["updated_at", "2015-12-19 14:53:57.903337"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.904356"], ["updated_at", "2015-12-19 14:53:57.904356"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.905389"], ["updated_at", "2015-12-19 14:53:57.905389"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 49], ["item_id", 138], ["created_at", "2015-12-19 14:53:57.907369"], ["updated_at", "2015-12-19 14:53:57.907369"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 49], ["item_id", 140], ["created_at", "2015-12-19 14:53:57.908954"], ["updated_at", "2015-12-19 14:53:57.908954"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 49]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.914808"], ["updated_at", "2015-12-19 14:53:57.914808"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 29]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 50], ["created_at", "2015-12-19 14:53:57.919223"], ["updated_at", "2015-12-19 14:53:57.919223"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 50], ["created_at", "2015-12-19 14:53:57.921018"], ["updated_at", "2015-12-19 14:53:57.921018"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.922288"], ["updated_at", "2015-12-19 14:53:57.922288"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.923381"], ["updated_at", "2015-12-19 14:53:57.923381"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:53:57.924488"], ["updated_at", "2015-12-19 14:53:57.924488"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 50], ["item_id", 143], ["created_at", "2015-12-19 14:53:57.926609"], ["updated_at", "2015-12-19 14:53:57.926609"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 50], ["item_id", 145], ["created_at", "2015-12-19 14:53:57.928243"], ["updated_at", "2015-12-19 14:53:57.928243"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 50]] +  (0.2ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (1.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.9ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.5ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.3ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.7ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "items_people" CASCADE +  (2.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.1ms) DROP TABLE "people" CASCADE +  (3.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (3.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.8ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (18.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.0ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.9ms) DROP TABLE "people2" CASCADE +  (5.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.7ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.5ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.4ms) DROP TABLE "items_people" CASCADE +  (16.1ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.2ms) DROP TABLE "people" CASCADE +  (2.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (2.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (2.9ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 14:57:30.868453"], ["updated_at", "2015-12-19 14:57:30.868453"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.3ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.1ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (13.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "people" CASCADE +  (2.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.6ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.1ms) DROP TABLE "places" CASCADE +  (3.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (2.8ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.2ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (2.8ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.6ms) DROP TABLE "people2" CASCADE +  (3.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "places" CASCADE +  (3.1ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.4ms) DROP VIEW "v_people" +  (1.0ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.5ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.091360"], ["updated_at", "2015-12-19 14:57:31.091360"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 30]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 54], ["created_at", "2015-12-19 14:57:31.112877"], ["updated_at", "2015-12-19 14:57:31.112877"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 54], ["created_at", "2015-12-19 14:57:31.115597"], ["updated_at", "2015-12-19 14:57:31.115597"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.117212"], ["updated_at", "2015-12-19 14:57:31.117212"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.118638"], ["updated_at", "2015-12-19 14:57:31.118638"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.119988"], ["updated_at", "2015-12-19 14:57:31.119988"]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 54], ["item_id", 148], ["created_at", "2015-12-19 14:57:31.132583"], ["updated_at", "2015-12-19 14:57:31.132583"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 54], ["item_id", 150], ["created_at", "2015-12-19 14:57:31.135035"], ["updated_at", "2015-12-19 14:57:31.135035"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 54]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 30]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.150564"], ["updated_at", "2015-12-19 14:57:31.150564"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 31]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 55], ["created_at", "2015-12-19 14:57:31.154431"], ["updated_at", "2015-12-19 14:57:31.154431"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 55], ["created_at", "2015-12-19 14:57:31.156181"], ["updated_at", "2015-12-19 14:57:31.156181"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.157443"], ["updated_at", "2015-12-19 14:57:31.157443"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.158566"], ["updated_at", "2015-12-19 14:57:31.158566"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.159741"], ["updated_at", "2015-12-19 14:57:31.159741"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 55], ["item_id", 153], ["created_at", "2015-12-19 14:57:31.161962"], ["updated_at", "2015-12-19 14:57:31.161962"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 55], ["item_id", 155], ["created_at", "2015-12-19 14:57:31.163872"], ["updated_at", "2015-12-19 14:57:31.163872"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 55]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 55]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 55]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.180829"], ["updated_at", "2015-12-19 14:57:31.180829"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 32]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 56], ["created_at", "2015-12-19 14:57:31.185273"], ["updated_at", "2015-12-19 14:57:31.185273"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 56], ["created_at", "2015-12-19 14:57:31.186986"], ["updated_at", "2015-12-19 14:57:31.186986"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.188215"], ["updated_at", "2015-12-19 14:57:31.188215"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.189311"], ["updated_at", "2015-12-19 14:57:31.189311"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.190414"], ["updated_at", "2015-12-19 14:57:31.190414"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 56], ["item_id", 158], ["created_at", "2015-12-19 14:57:31.192591"], ["updated_at", "2015-12-19 14:57:31.192591"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 56], ["item_id", 160], ["created_at", "2015-12-19 14:57:31.194278"], ["updated_at", "2015-12-19 14:57:31.194278"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 56]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.200232"], ["updated_at", "2015-12-19 14:57:31.200232"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 33]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 57], ["created_at", "2015-12-19 14:57:31.203973"], ["updated_at", "2015-12-19 14:57:31.203973"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 57], ["created_at", "2015-12-19 14:57:31.207117"], ["updated_at", "2015-12-19 14:57:31.207117"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.209318"], ["updated_at", "2015-12-19 14:57:31.209318"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.210792"], ["updated_at", "2015-12-19 14:57:31.210792"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.212056"], ["updated_at", "2015-12-19 14:57:31.212056"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 57], ["item_id", 163], ["created_at", "2015-12-19 14:57:31.214371"], ["updated_at", "2015-12-19 14:57:31.214371"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 57], ["item_id", 165], ["created_at", "2015-12-19 14:57:31.216105"], ["updated_at", "2015-12-19 14:57:31.216105"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 57]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.222733"], ["updated_at", "2015-12-19 14:57:31.222733"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 34]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 58], ["created_at", "2015-12-19 14:57:31.226506"], ["updated_at", "2015-12-19 14:57:31.226506"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 58], ["created_at", "2015-12-19 14:57:31.228049"], ["updated_at", "2015-12-19 14:57:31.228049"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.229164"], ["updated_at", "2015-12-19 14:57:31.229164"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.230253"], ["updated_at", "2015-12-19 14:57:31.230253"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.231775"], ["updated_at", "2015-12-19 14:57:31.231775"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 58], ["item_id", 168], ["created_at", "2015-12-19 14:57:31.234992"], ["updated_at", "2015-12-19 14:57:31.234992"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 58], ["item_id", 170], ["created_at", "2015-12-19 14:57:31.237119"], ["updated_at", "2015-12-19 14:57:31.237119"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 58]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.244054"], ["updated_at", "2015-12-19 14:57:31.244054"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 35]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 59], ["created_at", "2015-12-19 14:57:31.247723"], ["updated_at", "2015-12-19 14:57:31.247723"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 59], ["created_at", "2015-12-19 14:57:31.249235"], ["updated_at", "2015-12-19 14:57:31.249235"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.250375"], ["updated_at", "2015-12-19 14:57:31.250375"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.251524"], ["updated_at", "2015-12-19 14:57:31.251524"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 14:57:31.252578"], ["updated_at", "2015-12-19 14:57:31.252578"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 59], ["item_id", 173], ["created_at", "2015-12-19 14:57:31.255921"], ["updated_at", "2015-12-19 14:57:31.255921"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 59], ["item_id", 175], ["created_at", "2015-12-19 14:57:31.259155"], ["updated_at", "2015-12-19 14:57:31.259155"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 59]] +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (2.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.1ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.7ms) DROP TABLE "items" CASCADE +  (17.5ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (1.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "people" CASCADE +  (2.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.5ms) DROP TABLE "people2" CASCADE +  (2.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "places" CASCADE +  (2.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.8ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.2ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.0ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) DROP TABLE "items_people" CASCADE +  (17.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) DROP TABLE "people" CASCADE +  (3.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.8ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "places" CASCADE +  (2.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (18.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.3ms) DROP TABLE "people2" CASCADE +  (3.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (3.1ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.5ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 15:33:14.556902"], ["updated_at", "2015-12-19 15:33:14.556902"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.2ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.2ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (4.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.4ms) drop view if exists V_PROFILE +  (2.4ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.7ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.4ms) DROP TABLE "items_people" CASCADE +  (2.0ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "people" CASCADE +  (2.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.5ms) DROP TABLE "people2" CASCADE +  (2.3ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "places" CASCADE +  (2.9ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.5ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.4ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.4ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.9ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.3ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.1ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.1ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.3ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.2ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.2ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.1ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.0ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.3ms) select * from people +  (0.3ms) select * from people +  (0.2ms) select * from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.5ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.1ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.8ms) DROP TABLE "items" CASCADE +  (18.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (1.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "people" CASCADE +  (1.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.5ms) DROP TABLE "people2" CASCADE +  (2.0ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "places" CASCADE +  (2.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.8ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.8ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "people" CASCADE +  (3.0ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.4ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) DROP TABLE "places" CASCADE +  (2.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.7ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.3ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) DROP TABLE "items_people" CASCADE +  (1.8ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "people" CASCADE +  (1.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.5ms) DROP TABLE "people2" CASCADE +  (1.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (2.7ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 15:50:20.405085"], ["updated_at", "2015-12-19 15:50:20.405085"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "items_people" CASCADE +  (2.5ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.1ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (1.8ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.9ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.4ms) DROP TABLE "people" CASCADE +  (3.2ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (5.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "places" CASCADE +  (3.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.604425"], ["updated_at", "2015-12-19 15:50:20.604425"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 36]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 66], ["created_at", "2015-12-19 15:50:20.633308"], ["updated_at", "2015-12-19 15:50:20.633308"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 66], ["created_at", "2015-12-19 15:50:20.635619"], ["updated_at", "2015-12-19 15:50:20.635619"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.636942"], ["updated_at", "2015-12-19 15:50:20.636942"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.638138"], ["updated_at", "2015-12-19 15:50:20.638138"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.639190"], ["updated_at", "2015-12-19 15:50:20.639190"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 66], ["item_id", 178], ["created_at", "2015-12-19 15:50:20.649588"], ["updated_at", "2015-12-19 15:50:20.649588"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 66], ["item_id", 180], ["created_at", "2015-12-19 15:50:20.651964"], ["updated_at", "2015-12-19 15:50:20.651964"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 66]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 36]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.662425"], ["updated_at", "2015-12-19 15:50:20.662425"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 37]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 67], ["created_at", "2015-12-19 15:50:20.666227"], ["updated_at", "2015-12-19 15:50:20.666227"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 67], ["created_at", "2015-12-19 15:50:20.667825"], ["updated_at", "2015-12-19 15:50:20.667825"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.669008"], ["updated_at", "2015-12-19 15:50:20.669008"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.670142"], ["updated_at", "2015-12-19 15:50:20.670142"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.671282"], ["updated_at", "2015-12-19 15:50:20.671282"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 67], ["item_id", 183], ["created_at", "2015-12-19 15:50:20.673522"], ["updated_at", "2015-12-19 15:50:20.673522"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 67], ["item_id", 185], ["created_at", "2015-12-19 15:50:20.675255"], ["updated_at", "2015-12-19 15:50:20.675255"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 67]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 67]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 67]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.684025"], ["updated_at", "2015-12-19 15:50:20.684025"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 38]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 68], ["created_at", "2015-12-19 15:50:20.687445"], ["updated_at", "2015-12-19 15:50:20.687445"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 68], ["created_at", "2015-12-19 15:50:20.688966"], ["updated_at", "2015-12-19 15:50:20.688966"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.697206"], ["updated_at", "2015-12-19 15:50:20.697206"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.698601"], ["updated_at", "2015-12-19 15:50:20.698601"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.699817"], ["updated_at", "2015-12-19 15:50:20.699817"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 68], ["item_id", 188], ["created_at", "2015-12-19 15:50:20.702205"], ["updated_at", "2015-12-19 15:50:20.702205"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 68], ["item_id", 190], ["created_at", "2015-12-19 15:50:20.703893"], ["updated_at", "2015-12-19 15:50:20.703893"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 68]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.711143"], ["updated_at", "2015-12-19 15:50:20.711143"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 39]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 69], ["created_at", "2015-12-19 15:50:20.715647"], ["updated_at", "2015-12-19 15:50:20.715647"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 69], ["created_at", "2015-12-19 15:50:20.717036"], ["updated_at", "2015-12-19 15:50:20.717036"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.718021"], ["updated_at", "2015-12-19 15:50:20.718021"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.719024"], ["updated_at", "2015-12-19 15:50:20.719024"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.720014"], ["updated_at", "2015-12-19 15:50:20.720014"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 69], ["item_id", 193], ["created_at", "2015-12-19 15:50:20.721880"], ["updated_at", "2015-12-19 15:50:20.721880"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 69], ["item_id", 195], ["created_at", "2015-12-19 15:50:20.723392"], ["updated_at", "2015-12-19 15:50:20.723392"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 69]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.729105"], ["updated_at", "2015-12-19 15:50:20.729105"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 40]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 70], ["created_at", "2015-12-19 15:50:20.732282"], ["updated_at", "2015-12-19 15:50:20.732282"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 70], ["created_at", "2015-12-19 15:50:20.733580"], ["updated_at", "2015-12-19 15:50:20.733580"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.734624"], ["updated_at", "2015-12-19 15:50:20.734624"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.735674"], ["updated_at", "2015-12-19 15:50:20.735674"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.736665"], ["updated_at", "2015-12-19 15:50:20.736665"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 70], ["item_id", 198], ["created_at", "2015-12-19 15:50:20.738674"], ["updated_at", "2015-12-19 15:50:20.738674"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 70], ["item_id", 200], ["created_at", "2015-12-19 15:50:20.740387"], ["updated_at", "2015-12-19 15:50:20.740387"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 70]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.747156"], ["updated_at", "2015-12-19 15:50:20.747156"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 41]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 71], ["created_at", "2015-12-19 15:50:20.750894"], ["updated_at", "2015-12-19 15:50:20.750894"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 71], ["created_at", "2015-12-19 15:50:20.752224"], ["updated_at", "2015-12-19 15:50:20.752224"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.753251"], ["updated_at", "2015-12-19 15:50:20.753251"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.754249"], ["updated_at", "2015-12-19 15:50:20.754249"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 15:50:20.755206"], ["updated_at", "2015-12-19 15:50:20.755206"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 71], ["item_id", 203], ["created_at", "2015-12-19 15:50:20.757071"], ["updated_at", "2015-12-19 15:50:20.757071"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 71], ["item_id", 205], ["created_at", "2015-12-19 15:50:20.759861"], ["updated_at", "2015-12-19 15:50:20.759861"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.4ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 71]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.7ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.4ms) select * from people +  (0.3ms) select * from people +  (0.4ms) select * from peoples +  (0.4ms) select * from people +  (0.3ms) select * from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (1.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.5ms) select * from people +  (0.3ms) select count(*) from people +  (0.5ms) select count(*) from v_people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +---------------------------------------------- +ViewOperationsTest: test_create_or_update_view +---------------------------------------------- +  (1.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.7ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (1.3ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.5ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.2ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.3ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (1.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.7ms) DROP TABLE "items" CASCADE +  (18.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (1.9ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.2ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.6ms) DROP TABLE "people2" CASCADE +  (2.3ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (3.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.4ms) DROP TABLE "items_people" CASCADE +  (1.5ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "people" CASCADE +  (2.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.7ms) DROP TABLE "people2" CASCADE +  (2.5ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "places" CASCADE +  (3.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.2ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (1.0ms) DROP TABLE "items" CASCADE +  (17.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.2ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.6ms) DROP TABLE "people2" CASCADE +  (4.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "places" CASCADE +  (2.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 16:00:23.995367"], ["updated_at", "2015-12-19 16:00:23.995367"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.3ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.8ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.7ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.3ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.4ms) drop view if exists V_PROFILE +  (2.3ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.1ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.3ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.1ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (2.5ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) DROP VIEW "v_people" +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.9ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.177573"], ["updated_at", "2015-12-19 16:00:24.177573"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 42]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 75], ["created_at", "2015-12-19 16:00:24.198889"], ["updated_at", "2015-12-19 16:00:24.198889"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 75], ["created_at", "2015-12-19 16:00:24.200885"], ["updated_at", "2015-12-19 16:00:24.200885"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.201926"], ["updated_at", "2015-12-19 16:00:24.201926"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.203058"], ["updated_at", "2015-12-19 16:00:24.203058"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.204242"], ["updated_at", "2015-12-19 16:00:24.204242"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 75], ["item_id", 208], ["created_at", "2015-12-19 16:00:24.216879"], ["updated_at", "2015-12-19 16:00:24.216879"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 75], ["item_id", 210], ["created_at", "2015-12-19 16:00:24.219189"], ["updated_at", "2015-12-19 16:00:24.219189"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 75]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 42]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.229912"], ["updated_at", "2015-12-19 16:00:24.229912"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 43]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 76], ["created_at", "2015-12-19 16:00:24.233185"], ["updated_at", "2015-12-19 16:00:24.233185"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 76], ["created_at", "2015-12-19 16:00:24.234478"], ["updated_at", "2015-12-19 16:00:24.234478"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.235540"], ["updated_at", "2015-12-19 16:00:24.235540"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.236542"], ["updated_at", "2015-12-19 16:00:24.236542"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.237571"], ["updated_at", "2015-12-19 16:00:24.237571"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 76], ["item_id", 213], ["created_at", "2015-12-19 16:00:24.239420"], ["updated_at", "2015-12-19 16:00:24.239420"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 76], ["item_id", 215], ["created_at", "2015-12-19 16:00:24.240981"], ["updated_at", "2015-12-19 16:00:24.240981"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 76]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 76]] + Item Load (0.2ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 76]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.249057"], ["updated_at", "2015-12-19 16:00:24.249057"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 44]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 77], ["created_at", "2015-12-19 16:00:24.252251"], ["updated_at", "2015-12-19 16:00:24.252251"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 77], ["created_at", "2015-12-19 16:00:24.253565"], ["updated_at", "2015-12-19 16:00:24.253565"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.254627"], ["updated_at", "2015-12-19 16:00:24.254627"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.255618"], ["updated_at", "2015-12-19 16:00:24.255618"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.256658"], ["updated_at", "2015-12-19 16:00:24.256658"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 77], ["item_id", 218], ["created_at", "2015-12-19 16:00:24.258915"], ["updated_at", "2015-12-19 16:00:24.258915"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 77], ["item_id", 220], ["created_at", "2015-12-19 16:00:24.261829"], ["updated_at", "2015-12-19 16:00:24.261829"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 77]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.268804"], ["updated_at", "2015-12-19 16:00:24.268804"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 45]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 78], ["created_at", "2015-12-19 16:00:24.273621"], ["updated_at", "2015-12-19 16:00:24.273621"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 78], ["created_at", "2015-12-19 16:00:24.275346"], ["updated_at", "2015-12-19 16:00:24.275346"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.276729"], ["updated_at", "2015-12-19 16:00:24.276729"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.277833"], ["updated_at", "2015-12-19 16:00:24.277833"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.278868"], ["updated_at", "2015-12-19 16:00:24.278868"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 78], ["item_id", 223], ["created_at", "2015-12-19 16:00:24.280760"], ["updated_at", "2015-12-19 16:00:24.280760"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 78], ["item_id", 225], ["created_at", "2015-12-19 16:00:24.282301"], ["updated_at", "2015-12-19 16:00:24.282301"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 78]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.288311"], ["updated_at", "2015-12-19 16:00:24.288311"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 46]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 79], ["created_at", "2015-12-19 16:00:24.291939"], ["updated_at", "2015-12-19 16:00:24.291939"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 79], ["created_at", "2015-12-19 16:00:24.293273"], ["updated_at", "2015-12-19 16:00:24.293273"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.294287"], ["updated_at", "2015-12-19 16:00:24.294287"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.295314"], ["updated_at", "2015-12-19 16:00:24.295314"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.296280"], ["updated_at", "2015-12-19 16:00:24.296280"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 79], ["item_id", 228], ["created_at", "2015-12-19 16:00:24.298115"], ["updated_at", "2015-12-19 16:00:24.298115"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 79], ["item_id", 230], ["created_at", "2015-12-19 16:00:24.299631"], ["updated_at", "2015-12-19 16:00:24.299631"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 79]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.306668"], ["updated_at", "2015-12-19 16:00:24.306668"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 47]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 80], ["created_at", "2015-12-19 16:00:24.310933"], ["updated_at", "2015-12-19 16:00:24.310933"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 80], ["created_at", "2015-12-19 16:00:24.312478"], ["updated_at", "2015-12-19 16:00:24.312478"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.313535"], ["updated_at", "2015-12-19 16:00:24.313535"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.314605"], ["updated_at", "2015-12-19 16:00:24.314605"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:00:24.315659"], ["updated_at", "2015-12-19 16:00:24.315659"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 80], ["item_id", 233], ["created_at", "2015-12-19 16:00:24.317639"], ["updated_at", "2015-12-19 16:00:24.317639"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 80], ["item_id", 235], ["created_at", "2015-12-19 16:00:24.319281"], ["updated_at", "2015-12-19 16:00:24.319281"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 80]] +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (1.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.4ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.0ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (2.3ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.8ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------- +ViewOperationsTest: test_create_or_replace_view +----------------------------------------------- +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE OR REPLACE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.5ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.7ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.4ms) DROP VIEW "v_place" +  (0.4ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.7ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.2ms) DROP TABLE "people" CASCADE +  (3.6ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "places" CASCADE +  (3.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (3.0ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.2ms) drop view if exists V_PROFILE +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.7ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "items_people" CASCADE +  (16.8ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.8ms) DROP TABLE "people2" CASCADE +  (3.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "places" CASCADE +  (3.2ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.2ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (15.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (1.8ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 16:02:37.612905"], ["updated_at", "2015-12-19 16:02:37.612905"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (1.1ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.6ms) DROP TABLE "items" CASCADE +  (17.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (2.5ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (3.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.4ms) drop view if exists V_PROFILE +  (2.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.0ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.1ms) DROP TABLE "people2" CASCADE +  (3.8ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.7ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.4ms) DROP VIEW "v_people" +  (0.7ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.8ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.788978"], ["updated_at", "2015-12-19 16:02:37.788978"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 48]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 84], ["created_at", "2015-12-19 16:02:37.812353"], ["updated_at", "2015-12-19 16:02:37.812353"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 84], ["created_at", "2015-12-19 16:02:37.814580"], ["updated_at", "2015-12-19 16:02:37.814580"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.815976"], ["updated_at", "2015-12-19 16:02:37.815976"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.817202"], ["updated_at", "2015-12-19 16:02:37.817202"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.818859"], ["updated_at", "2015-12-19 16:02:37.818859"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 84], ["item_id", 238], ["created_at", "2015-12-19 16:02:37.831023"], ["updated_at", "2015-12-19 16:02:37.831023"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 84], ["item_id", 240], ["created_at", "2015-12-19 16:02:37.834040"], ["updated_at", "2015-12-19 16:02:37.834040"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 84]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 48]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.845554"], ["updated_at", "2015-12-19 16:02:37.845554"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 49]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 85], ["created_at", "2015-12-19 16:02:37.848881"], ["updated_at", "2015-12-19 16:02:37.848881"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 85], ["created_at", "2015-12-19 16:02:37.850185"], ["updated_at", "2015-12-19 16:02:37.850185"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.851250"], ["updated_at", "2015-12-19 16:02:37.851250"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.852272"], ["updated_at", "2015-12-19 16:02:37.852272"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.853244"], ["updated_at", "2015-12-19 16:02:37.853244"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 85], ["item_id", 243], ["created_at", "2015-12-19 16:02:37.855215"], ["updated_at", "2015-12-19 16:02:37.855215"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 85], ["item_id", 245], ["created_at", "2015-12-19 16:02:37.856840"], ["updated_at", "2015-12-19 16:02:37.856840"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 85]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 85]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 85]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.864905"], ["updated_at", "2015-12-19 16:02:37.864905"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 50]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 86], ["created_at", "2015-12-19 16:02:37.868196"], ["updated_at", "2015-12-19 16:02:37.868196"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 86], ["created_at", "2015-12-19 16:02:37.869523"], ["updated_at", "2015-12-19 16:02:37.869523"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.870593"], ["updated_at", "2015-12-19 16:02:37.870593"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.871690"], ["updated_at", "2015-12-19 16:02:37.871690"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.872656"], ["updated_at", "2015-12-19 16:02:37.872656"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 86], ["item_id", 248], ["created_at", "2015-12-19 16:02:37.874460"], ["updated_at", "2015-12-19 16:02:37.874460"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 86], ["item_id", 250], ["created_at", "2015-12-19 16:02:37.876397"], ["updated_at", "2015-12-19 16:02:37.876397"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 86]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.883938"], ["updated_at", "2015-12-19 16:02:37.883938"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 51]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 87], ["created_at", "2015-12-19 16:02:37.888002"], ["updated_at", "2015-12-19 16:02:37.888002"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 87], ["created_at", "2015-12-19 16:02:37.889651"], ["updated_at", "2015-12-19 16:02:37.889651"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.890846"], ["updated_at", "2015-12-19 16:02:37.890846"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.891951"], ["updated_at", "2015-12-19 16:02:37.891951"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.893034"], ["updated_at", "2015-12-19 16:02:37.893034"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 87], ["item_id", 253], ["created_at", "2015-12-19 16:02:37.895655"], ["updated_at", "2015-12-19 16:02:37.895655"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 87], ["item_id", 255], ["created_at", "2015-12-19 16:02:37.897504"], ["updated_at", "2015-12-19 16:02:37.897504"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 87]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.904874"], ["updated_at", "2015-12-19 16:02:37.904874"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 52]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 88], ["created_at", "2015-12-19 16:02:37.908830"], ["updated_at", "2015-12-19 16:02:37.908830"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 88], ["created_at", "2015-12-19 16:02:37.910411"], ["updated_at", "2015-12-19 16:02:37.910411"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.911773"], ["updated_at", "2015-12-19 16:02:37.911773"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.912896"], ["updated_at", "2015-12-19 16:02:37.912896"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.914017"], ["updated_at", "2015-12-19 16:02:37.914017"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 88], ["item_id", 258], ["created_at", "2015-12-19 16:02:37.916811"], ["updated_at", "2015-12-19 16:02:37.916811"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 88], ["item_id", 260], ["created_at", "2015-12-19 16:02:37.920178"], ["updated_at", "2015-12-19 16:02:37.920178"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 88]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.927861"], ["updated_at", "2015-12-19 16:02:37.927861"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 53]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 89], ["created_at", "2015-12-19 16:02:37.931928"], ["updated_at", "2015-12-19 16:02:37.931928"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 89], ["created_at", "2015-12-19 16:02:37.933817"], ["updated_at", "2015-12-19 16:02:37.933817"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.936105"], ["updated_at", "2015-12-19 16:02:37.936105"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.937792"], ["updated_at", "2015-12-19 16:02:37.937792"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:02:37.939050"], ["updated_at", "2015-12-19 16:02:37.939050"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 89], ["item_id", 263], ["created_at", "2015-12-19 16:02:37.941489"], ["updated_at", "2015-12-19 16:02:37.941489"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 89], ["item_id", 265], ["created_at", "2015-12-19 16:02:37.943447"], ["updated_at", "2015-12-19 16:02:37.943447"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 89]] +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.2ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.1ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.8ms) DROP TABLE "items" CASCADE +  (17.4ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "items_people" CASCADE +  (1.7ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "people" CASCADE +  (2.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (1.0ms) DROP TABLE "people2" CASCADE +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.5ms) DROP TABLE "places" CASCADE +  (2.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.3ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.9ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (17.2ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.0ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (2.7ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.6ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.9ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.8ms) DROP TABLE "people2" CASCADE +  (3.2ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "places" CASCADE +  (2.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.3ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (3.5ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.9ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 16:33:59.060085"], ["updated_at", "2015-12-19 16:33:59.060085"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.3ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.0ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.9ms) DROP TABLE "people" CASCADE +  (2.8ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (4.1ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "places" CASCADE +  (2.6ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.5ms) drop view if exists V_PROFILE +  (2.5ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (3.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (3.1ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (1.0ms) DROP TABLE "people2" CASCADE +  (2.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "places" CASCADE +  (2.3ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.4ms) DROP VIEW "v_people" +  (0.9ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.9ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (0.8ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.235067"], ["updated_at", "2015-12-19 16:33:59.235067"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 54]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 91], ["created_at", "2015-12-19 16:33:59.257483"], ["updated_at", "2015-12-19 16:33:59.257483"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 91], ["created_at", "2015-12-19 16:33:59.259579"], ["updated_at", "2015-12-19 16:33:59.259579"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.260988"], ["updated_at", "2015-12-19 16:33:59.260988"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.262137"], ["updated_at", "2015-12-19 16:33:59.262137"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.263189"], ["updated_at", "2015-12-19 16:33:59.263189"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 91], ["item_id", 268], ["created_at", "2015-12-19 16:33:59.273749"], ["updated_at", "2015-12-19 16:33:59.273749"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 91], ["item_id", 270], ["created_at", "2015-12-19 16:33:59.275992"], ["updated_at", "2015-12-19 16:33:59.275992"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 91]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 54]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.289808"], ["updated_at", "2015-12-19 16:33:59.289808"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 55]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 92], ["created_at", "2015-12-19 16:33:59.293126"], ["updated_at", "2015-12-19 16:33:59.293126"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 92], ["created_at", "2015-12-19 16:33:59.294498"], ["updated_at", "2015-12-19 16:33:59.294498"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.295605"], ["updated_at", "2015-12-19 16:33:59.295605"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.296671"], ["updated_at", "2015-12-19 16:33:59.296671"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.297709"], ["updated_at", "2015-12-19 16:33:59.297709"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 92], ["item_id", 273], ["created_at", "2015-12-19 16:33:59.299781"], ["updated_at", "2015-12-19 16:33:59.299781"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 92], ["item_id", 275], ["created_at", "2015-12-19 16:33:59.301494"], ["updated_at", "2015-12-19 16:33:59.301494"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 92]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 92]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 92]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.310334"], ["updated_at", "2015-12-19 16:33:59.310334"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 56]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 93], ["created_at", "2015-12-19 16:33:59.313810"], ["updated_at", "2015-12-19 16:33:59.313810"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 93], ["created_at", "2015-12-19 16:33:59.315486"], ["updated_at", "2015-12-19 16:33:59.315486"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.316689"], ["updated_at", "2015-12-19 16:33:59.316689"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.317824"], ["updated_at", "2015-12-19 16:33:59.317824"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.318952"], ["updated_at", "2015-12-19 16:33:59.318952"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 93], ["item_id", 278], ["created_at", "2015-12-19 16:33:59.327817"], ["updated_at", "2015-12-19 16:33:59.327817"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 93], ["item_id", 280], ["created_at", "2015-12-19 16:33:59.329712"], ["updated_at", "2015-12-19 16:33:59.329712"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 93]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.335750"], ["updated_at", "2015-12-19 16:33:59.335750"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 57]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 94], ["created_at", "2015-12-19 16:33:59.338974"], ["updated_at", "2015-12-19 16:33:59.338974"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 94], ["created_at", "2015-12-19 16:33:59.340351"], ["updated_at", "2015-12-19 16:33:59.340351"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.341536"], ["updated_at", "2015-12-19 16:33:59.341536"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.343544"], ["updated_at", "2015-12-19 16:33:59.343544"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.345296"], ["updated_at", "2015-12-19 16:33:59.345296"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 94], ["item_id", 283], ["created_at", "2015-12-19 16:33:59.347739"], ["updated_at", "2015-12-19 16:33:59.347739"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 94], ["item_id", 285], ["created_at", "2015-12-19 16:33:59.349323"], ["updated_at", "2015-12-19 16:33:59.349323"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 94]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.355009"], ["updated_at", "2015-12-19 16:33:59.355009"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 58]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 95], ["created_at", "2015-12-19 16:33:59.358111"], ["updated_at", "2015-12-19 16:33:59.358111"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 95], ["created_at", "2015-12-19 16:33:59.359419"], ["updated_at", "2015-12-19 16:33:59.359419"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.360457"], ["updated_at", "2015-12-19 16:33:59.360457"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.361491"], ["updated_at", "2015-12-19 16:33:59.361491"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.362506"], ["updated_at", "2015-12-19 16:33:59.362506"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 95], ["item_id", 288], ["created_at", "2015-12-19 16:33:59.364388"], ["updated_at", "2015-12-19 16:33:59.364388"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 95], ["item_id", 290], ["created_at", "2015-12-19 16:33:59.365891"], ["updated_at", "2015-12-19 16:33:59.365891"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 95]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.372006"], ["updated_at", "2015-12-19 16:33:59.372006"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 59]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 96], ["created_at", "2015-12-19 16:33:59.375269"], ["updated_at", "2015-12-19 16:33:59.375269"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 96], ["created_at", "2015-12-19 16:33:59.376939"], ["updated_at", "2015-12-19 16:33:59.376939"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.378632"], ["updated_at", "2015-12-19 16:33:59.378632"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.379969"], ["updated_at", "2015-12-19 16:33:59.379969"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:33:59.381283"], ["updated_at", "2015-12-19 16:33:59.381283"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 96], ["item_id", 293], ["created_at", "2015-12-19 16:33:59.383775"], ["updated_at", "2015-12-19 16:33:59.383775"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 96], ["item_id", 295], ["created_at", "2015-12-19 16:33:59.385565"], ["updated_at", "2015-12-19 16:33:59.385565"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 96]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (1.2ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.9ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.9ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (1.1ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (1.2ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------- +ViewOperationsTest: test_create_or_replace_view +----------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) CREATE VIEW "v_people" AS select id from people +  (0.2ms) DROP VIEW "v_people" +  (0.5ms) CREATE OR REPLACE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.3ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.8ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.8ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.1ms) BEGIN +-------------------------------------- +RailsSqlViews4Test: test_test_the_true +-------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +RailsSqlViews4Test: test_truth +------------------------------ +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_access_cloned_belongs_to_association +-------------------------------------------------------- +  (1.4ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (1.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.531726"], ["updated_at", "2015-12-19 16:34:52.531726"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 60]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 99], ["created_at", "2015-12-19 16:34:52.555878"], ["updated_at", "2015-12-19 16:34:52.555878"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 99], ["created_at", "2015-12-19 16:34:52.557815"], ["updated_at", "2015-12-19 16:34:52.557815"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.558880"], ["updated_at", "2015-12-19 16:34:52.558880"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.559980"], ["updated_at", "2015-12-19 16:34:52.559980"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.560959"], ["updated_at", "2015-12-19 16:34:52.560959"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 99], ["item_id", 298], ["created_at", "2015-12-19 16:34:52.572703"], ["updated_at", "2015-12-19 16:34:52.572703"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 99], ["item_id", 300], ["created_at", "2015-12-19 16:34:52.574894"], ["updated_at", "2015-12-19 16:34:52.574894"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 99]] + Place Load (0.2ms) SELECT "places".* FROM "places" WHERE "places"."id" = $1 LIMIT 1 [["id", 60]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_access_cloned_has_many_association +------------------------------------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.588188"], ["updated_at", "2015-12-19 16:34:52.588188"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 61]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 100], ["created_at", "2015-12-19 16:34:52.591426"], ["updated_at", "2015-12-19 16:34:52.591426"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 100], ["created_at", "2015-12-19 16:34:52.592716"], ["updated_at", "2015-12-19 16:34:52.592716"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.593807"], ["updated_at", "2015-12-19 16:34:52.593807"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.594762"], ["updated_at", "2015-12-19 16:34:52.594762"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.595759"], ["updated_at", "2015-12-19 16:34:52.595759"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 100], ["item_id", 303], ["created_at", "2015-12-19 16:34:52.597537"], ["updated_at", "2015-12-19 16:34:52.597537"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 100], ["item_id", 305], ["created_at", "2015-12-19 16:34:52.599030"], ["updated_at", "2015-12-19 16:34:52.599030"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 100]] +  (0.2ms) SELECT COUNT(*) FROM "items" WHERE "items"."person_id" = $1 [["person_id", 100]] + Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."person_id" = $1 [["person_id", 100]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------------------------------- +ViewModelTest: test_cloned_belongs_to_association_exists +-------------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.606835"], ["updated_at", "2015-12-19 16:34:52.606835"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 62]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 101], ["created_at", "2015-12-19 16:34:52.610447"], ["updated_at", "2015-12-19 16:34:52.610447"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 101], ["created_at", "2015-12-19 16:34:52.611766"], ["updated_at", "2015-12-19 16:34:52.611766"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.612827"], ["updated_at", "2015-12-19 16:34:52.612827"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.613821"], ["updated_at", "2015-12-19 16:34:52.613821"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.614778"], ["updated_at", "2015-12-19 16:34:52.614778"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 101], ["item_id", 308], ["created_at", "2015-12-19 16:34:52.616603"], ["updated_at", "2015-12-19 16:34:52.616603"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 101], ["item_id", 310], ["created_at", "2015-12-19 16:34:52.618411"], ["updated_at", "2015-12-19 16:34:52.618411"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 101]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------- +ViewModelTest: test_cloned_habtm_association_exists +--------------------------------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.625388"], ["updated_at", "2015-12-19 16:34:52.625388"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 63]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 102], ["created_at", "2015-12-19 16:34:52.628598"], ["updated_at", "2015-12-19 16:34:52.628598"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 102], ["created_at", "2015-12-19 16:34:52.629926"], ["updated_at", "2015-12-19 16:34:52.629926"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.631311"], ["updated_at", "2015-12-19 16:34:52.631311"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.633151"], ["updated_at", "2015-12-19 16:34:52.633151"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.634834"], ["updated_at", "2015-12-19 16:34:52.634834"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 102], ["item_id", 313], ["created_at", "2015-12-19 16:34:52.637219"], ["updated_at", "2015-12-19 16:34:52.637219"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 102], ["item_id", 315], ["created_at", "2015-12-19 16:34:52.638951"], ["updated_at", "2015-12-19 16:34:52.638951"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 102]] +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------------------ +ViewModelTest: test_cloned_has_many_association_exists +------------------------------------------------------ +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.644953"], ["updated_at", "2015-12-19 16:34:52.644953"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 64]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 103], ["created_at", "2015-12-19 16:34:52.648330"], ["updated_at", "2015-12-19 16:34:52.648330"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 103], ["created_at", "2015-12-19 16:34:52.649728"], ["updated_at", "2015-12-19 16:34:52.649728"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.650845"], ["updated_at", "2015-12-19 16:34:52.650845"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.651874"], ["updated_at", "2015-12-19 16:34:52.651874"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.652895"], ["updated_at", "2015-12-19 16:34:52.652895"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 103], ["item_id", 318], ["created_at", "2015-12-19 16:34:52.654787"], ["updated_at", "2015-12-19 16:34:52.654787"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 103], ["item_id", 320], ["created_at", "2015-12-19 16:34:52.656334"], ["updated_at", "2015-12-19 16:34:52.656334"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 103]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------- +ViewModelTest: test_same_person +------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "places" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.662319"], ["updated_at", "2015-12-19 16:34:52.662319"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "people" ("first_name", "address_id") VALUES ($1, $2) RETURNING "id" [["first_name", "Primus"], ["address_id", 65]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 104], ["created_at", "2015-12-19 16:34:52.665577"], ["updated_at", "2015-12-19 16:34:52.665577"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "items" ("person_id", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["person_id", 104], ["created_at", "2015-12-19 16:34:52.667368"], ["updated_at", "2015-12-19 16:34:52.667368"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.668940"], ["updated_at", "2015-12-19 16:34:52.668940"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.670320"], ["updated_at", "2015-12-19 16:34:52.670320"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2015-12-19 16:34:52.671699"], ["updated_at", "2015-12-19 16:34:52.671699"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 104], ["item_id", 323], ["created_at", "2015-12-19 16:34:52.674114"], ["updated_at", "2015-12-19 16:34:52.674114"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.1ms) INSERT INTO "items_people" ("person_id", "item_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["person_id", 104], ["item_id", 325], ["created_at", "2015-12-19 16:34:52.675850"], ["updated_at", "2015-12-19 16:34:52.675850"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 + VPerson Load (0.3ms) SELECT "v_people".* FROM "v_people" WHERE "v_people"."id" = $1 LIMIT 1 [["id", 104]] +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_dump_and_load +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.3ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (1.2ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (16.4ms) DROP TABLE "items" CASCADE +  (17.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (2.9ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.3ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (3.4ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.5ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.5ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------- +SchemaDumperTest: test_regex_ignore +----------------------------------- +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.9ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (1.4ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (1.0ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (17.1ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.3ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.0ms) DROP TABLE "people" CASCADE +  (2.7ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.6ms) DROP TABLE "people2" CASCADE +  (3.8ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.8ms) DROP TABLE "places" CASCADE +  (3.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.1ms) SELECT version FROM "schema_migrations" +  (0.2ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.5ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +SchemaDumperTest: test_symbol_ignore +------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (1.1ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.8ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (16.5ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (0.7ms) DROP TABLE "items_people" CASCADE +  (2.1ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp)  +  (1.2ms) DROP TABLE "people" CASCADE +  (3.4ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer)  +  (0.8ms) DROP TABLE "people2" CASCADE +  (2.8ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.5ms) DROP TABLE "places" CASCADE +  (2.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp)  +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.4ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------- +SchemaDumperTest: test_union +---------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "Joe"], ["last_name", "User"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.3ms) INSERT INTO "people2" ("first_name", "last_name", "ssn", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["first_name", "Jane"], ["last_name", "Doe"], ["ssn", "222334444"], ["created_at", "2015-12-19 16:34:52.907609"], ["updated_at", "2015-12-19 16:34:52.907609"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) CREATE VIEW "v_profile" AS select first_name, last_name, ssn from people + UNION + select first_name, last_name, ssn from people2 + + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (1.1ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.8ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_profile' + + SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.4ms) DROP TABLE "items" CASCADE +  (16.8ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.7ms) DROP TABLE "items_people" CASCADE +  (17.6ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.2ms) DROP TABLE "people" CASCADE +  (3.6ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.7ms) DROP TABLE "people2" CASCADE +  (4.9ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "places" CASCADE +  (3.8ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.8ms) CREATE VIEW "v_profile" AS SELECT people.first_name, + people.last_name, + people.ssn + FROM people +UNION + SELECT people2.first_name, + people2.last_name, + people2.ssn + FROM people2; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.1ms) drop view if exists V_PEOPLE +  (0.3ms) drop view if exists V_PROFILE +  (2.0ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------- +SchemaDumperTest: test_view +--------------------------- +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.6ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.4ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------------ +SchemaDumperTest: test_view_creation_order +------------------------------------------ +  (0.1ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn, address_id from people + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.6ms)  SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.9ms)  SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + + SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" +  (0.5ms) DROP TABLE "items" CASCADE +  (18.0ms) CREATE TABLE "items" ("id" serial primary key, "person_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) DROP TABLE "items_people" CASCADE +  (2.4ms) CREATE TABLE "items_people" ("id" serial primary key, "person_id" integer, "item_id" integer, "created_at" timestamp, "updated_at" timestamp) +  (1.0ms) DROP TABLE "people" CASCADE +  (3.0ms) CREATE TABLE "people" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "address_id" integer) +  (0.9ms) DROP TABLE "people2" CASCADE +  (3.4ms) CREATE TABLE "people2" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "ssn" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.9ms) DROP TABLE "places" CASCADE +  (3.0ms) CREATE TABLE "places" ("id" serial primary key, "address" text, "city" character varying, "cstate" character varying, "country" character varying, "created_at" timestamp, "updated_at" timestamp) +  (0.6ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) DROP VIEW "v_people" +  (0.8ms) CREATE VIEW "v_people" AS SELECT people.id, + people.first_name, + people.last_name, + people.ssn, + people.address_id + FROM people; +  (0.2ms) SELECT version FROM "schema_migrations" +  (0.5ms) drop view if exists V_PEOPLE +  (0.1ms) drop view if exists V_PROFILE +  (2.7ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------- +AdapterTest: test_base_tables +----------------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.8ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'BASE TABLE' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------- +AdapterTest: test_columns +------------------------- +  (0.5ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +AdapterTest: test_current_database +---------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_mapped_columns +-------------------------------- +  (0.9ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------ +AdapterTest: test_mapped_views +------------------------------ +  (0.6ms) CREATE VIEW v_people ("f_name", "l_name", "address_id") AS SELECT "first_name", "last_name", "address_id" FROM people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------- +AdapterTest: test_old_name_not_found_error_during_mapping +--------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------------------------------------------- +AdapterTest: test_only_base_table_triggers_are_dropped_for_disabled_ref_integrity +--------------------------------------------------------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +-------------------------------- +AdapterTest: test_supports_views +-------------------------------- +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +------------------------ +AdapterTest: test_tables +------------------------ +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type IN ('BASE TABLE', 'VIEW') + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------- +AdapterTest: test_view_select_statement +--------------------------------------- +  (0.7ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'v_people' + +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +----------------------- +AdapterTest: test_views +----------------------- +  (0.6ms) CREATE VIEW "v_people" AS select first_name, last_name, ssn from people +  (0.7ms) SELECT table_name, table_type + FROM information_schema.tables + WHERE table_schema IN ('"$user"','public') + AND table_type = 'VIEW' + +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +----------------------------------------------- +ViewOperationsTest: test_create_or_replace_view +----------------------------------------------- +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) CREATE VIEW "v_people" AS select id from people +  (0.4ms) DROP VIEW "v_people" +  (1.2ms) CREATE OR REPLACE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.4ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +------------------------------------ +ViewOperationsTest: test_create_view +------------------------------------ +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.2ms) INSERT INTO "people" ("first_name", "last_name", "ssn") VALUES ($1, $2, $3) RETURNING "id" [["first_name", "John"], ["last_name", "Doe"], ["ssn", "123456789"]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) CREATE VIEW "v_people" AS select id, first_name, last_name, ssn from people + Person Load (0.2ms) SELECT "people".* FROM "people" ORDER BY "people"."id" ASC LIMIT 1 + VPerson Load (0.2ms) SELECT "v_people".* FROM "v_people" ORDER BY "v_people"."id" ASC LIMIT 1 +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +---------------------------------- +ViewOperationsTest: test_drop_view +---------------------------------- +  (0.6ms) CREATE VIEW "v_place" AS select address, city, cstate, country from places +  (0.3ms) DROP VIEW "v_place" +  (0.3ms) SELECT * FROM v_place +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +--------------------------------------------- +ViewOperationsTest: test_no_view_raises_error +--------------------------------------------- +  (0.6ms) SELECT view_definition + FROM information_schema.views + WHERE table_catalog = (SELECT catalog_name FROM information_schema.information_schema_catalog_name) + AND table_schema IN ('"$user"','public') + AND table_name = 'foo' + +  (0.1ms) ROLLBACK