test/dummy_app/log/test.log in active_snapshot-0.2.1 vs test/dummy_app/log/test.log in active_snapshot-0.2.2

- old
+ new

@@ -1364,5 +1364,721 @@ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) rollback transaction +  (2.4ms) SELECT sqlite_version(*) +  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (1.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (1.2ms) DELETE FROM posts; +  (1.3ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (3.1ms) DELETE FROM snapshots; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (1.8ms) DELETE FROM snapshot_items; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-27 20:45:59.108921"], ["updated_at", "2021-08-27 20:45:59.108921"]] + TRANSACTION (0.6ms) commit transaction + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:45:59.125328"]] + TRANSACTION (0.6ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.5ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.6ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.1ms) SELECT sqlite_version(*) + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- +id: 1 +a: 1 +b: 3 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-27 20:45:59.108921000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.108921000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-27 20:45:59.108921000 Z +','2021-08-27 20:45:59.147514',NULL) + TRANSACTION (0.6ms) commit transaction + Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:45:59.151704"]] + TRANSACTION (0.5ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-27 20:45:59.108921000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.108921000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-27 20:45:59.108921000 Z +','2021-08-27 20:45:59.154831',NULL) + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.1ms) begin transaction +------------------------------------------- +SnapshotsConcernTest: test_create_snapshot! +------------------------------------------- + Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (1.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-27 20:45:59.199189"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.108921000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: *1 + time: 2021-08-27 20:45:59.108921000 Z +','2021-08-27 20:45:59.203510',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:45:59.205310"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.108921000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: *1 + time: 2021-08-27 20:45:59.108921000 Z +','2021-08-27 20:45:59.207556',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:45:59.209081"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.108921000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: *1 + time: 2021-08-27 20:45:59.108921000 Z +','2021-08-27 20:45:59.211345',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 + TRANSACTION (0.3ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------------- +SnapshotsConcernTest: test_relationships +---------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------------ +SnapshotsConcernTest: test_has_snapshot_children +------------------------------------------------ + Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------ +SnapshotItemTest: test_relationships +------------------------------------ + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------- +SnapshotItemTest: test_validations +---------------------------------- + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------- +SnapshotItemTest: test_object +----------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------ +SnapshotItemTest: test_restore_item! +------------------------------------ + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.2ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------- +ActiveSnapshotTest: test_snapshot_lifecycle +------------------------------------------- + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-27 20:45:59.248858"], ["updated_at", "2021-08-27 20:45:59.248858"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:45:59.251463"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.108921000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.108921000 Z + zone: *1 + time: 2021-08-27 20:45:59.108921000 Z +','2021-08-27 20:45:59.254446',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.248858000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:45:59.248858000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:45:59.248858000 Z + zone: *1 + time: 2021-08-27 20:45:59.248858000 Z +','2021-08-27 20:45:59.254446','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-28 20:45:59.255601"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-28 20:45:59.256049"], ["id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-27 20:45:59.257086"], ["updated_at", "2021-08-27 20:45:59.257086"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-27 20:45:59.257919"], ["updated_at", "2021-08-27 20:45:59.257919"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-27 20:45:59.108921"], ["id", 1]] + Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-27 20:45:59.248858"], ["updated_at", "2021-08-27 20:45:59.248858"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.3ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------------- +ActiveSnapshotTest: test_exposes_main_module +-------------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------------- +ActiveSnapshotTest: test_exposes_version +---------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------- +SnapshotTest: test_build_snapshot_item +-------------------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------- +SnapshotTest: test_fetch_reified_items +-------------------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------- +SnapshotTest: test_restore +-------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.3ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +--------------------------- +SnapshotTest: test_metadata +--------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------ +SnapshotTest: test_validations +------------------------------ + ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction +  (1.5ms) SELECT sqlite_version(*) +  (0.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (1.4ms) DELETE FROM posts; +  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.8ms) DELETE FROM snapshots; +  (0.6ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.9ms) DELETE FROM snapshot_items; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-27 20:46:32.110903"], ["updated_at", "2021-08-27 20:46:32.110903"]] + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:32.123411"]] + TRANSACTION (0.6ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (1.4ms) SELECT sqlite_version(*) +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (1.2ms) DELETE FROM posts; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.8ms) DELETE FROM snapshots; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.8ms) DELETE FROM snapshot_items; +  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-27 20:46:36.394557"], ["updated_at", "2021-08-27 20:46:36.394557"]] + TRANSACTION (0.5ms) commit transaction + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:36.407070"]] + TRANSACTION (0.8ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (1.5ms) SELECT sqlite_version(*) +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (1.3ms) DELETE FROM posts; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.7ms) DELETE FROM snapshots; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.7ms) DELETE FROM snapshot_items; +  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-27 20:46:45.337718"], ["updated_at", "2021-08-27 20:46:45.337718"]] + TRANSACTION (0.5ms) commit transaction + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:45.350182"]] + TRANSACTION (0.7ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.0ms) SELECT sqlite_version(*) + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- +id: 1 +a: 1 +b: 3 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-27 20:46:45.337718000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.337718000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-27 20:46:45.337718000 Z +','2021-08-27 20:46:45.366180',NULL) + TRANSACTION (0.5ms) commit transaction + Post Update (0.7ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:45.369589"]] + TRANSACTION (0.7ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-27 20:46:45.337718000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.337718000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-27 20:46:45.337718000 Z +','2021-08-27 20:46:45.372362',NULL) + TRANSACTION (0.5ms) commit transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------- +SnapshotTest: test_restore +-------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.2ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------- +SnapshotTest: test_build_snapshot_item +-------------------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------ +SnapshotTest: test_validations +------------------------------ + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------- +SnapshotTest: test_fetch_reified_items +-------------------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +--------------------------- +SnapshotTest: test_metadata +--------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------------- +ActiveSnapshotTest: test_exposes_main_module +-------------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------------- +ActiveSnapshotTest: test_exposes_version +---------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------- +ActiveSnapshotTest: test_snapshot_lifecycle +------------------------------------------- + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-27 20:46:45.427588"], ["updated_at", "2021-08-27 20:46:45.427588"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:45.430393"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.337718000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: *1 + time: 2021-08-27 20:46:45.337718000 Z +','2021-08-27 20:46:45.433489',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.427588000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.427588000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.427588000 Z + zone: *1 + time: 2021-08-27 20:46:45.427588000 Z +','2021-08-27 20:46:45.433489','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-28 20:46:45.434798"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-28 20:46:45.435324"], ["id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-27 20:46:45.436673"], ["updated_at", "2021-08-27 20:46:45.436673"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-27 20:46:45.437717"], ["updated_at", "2021-08-27 20:46:45.437717"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-27 20:46:45.337718"], ["id", 1]] + Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-27 20:46:45.427588"], ["updated_at", "2021-08-27 20:46:45.427588"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.3ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------ +SnapshotItemTest: test_relationships +------------------------------------ + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------ +SnapshotItemTest: test_restore_item! +------------------------------------ + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.2ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------- +SnapshotItemTest: test_validations +---------------------------------- + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------- +SnapshotItemTest: test_object +----------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------------ +SnapshotsConcernTest: test_has_snapshot_children +------------------------------------------------ + Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------------- +SnapshotsConcernTest: test_relationships +---------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------- +SnapshotsConcernTest: test_create_snapshot! +------------------------------------------- + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-27 20:46:45.472428"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.337718000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: *1 + time: 2021-08-27 20:46:45.337718000 Z +','2021-08-27 20:46:45.475771',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:45.477983"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.337718000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: *1 + time: 2021-08-27 20:46:45.337718000 Z +','2021-08-27 20:46:45.480667',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-27 20:46:45.482456"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-27 20:46:45.337718000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-27 20:46:45.337718000 Z + zone: *1 + time: 2021-08-27 20:46:45.337718000 Z +','2021-08-27 20:46:45.485020',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 + TRANSACTION (0.3ms) rollback transaction