test/dummy_app/log/test.log in active_snapshot-0.2.3 vs test/dummy_app/log/test.log in active_snapshot-0.2.4

- old
+ new

@@ -1,1346 +1,2109 @@ -  (1.8ms) SELECT sqlite_version(*) -  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) +  (1.7ms) SELECT sqlite_version(*) +  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to SetUpTestTables (20210128155312) TRANSACTION (0.0ms) begin transaction -  (0.3ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "a" integer, "b" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) +  (0.4ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "a" integer, "b" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)  (0.1ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "post_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)  (0.1ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")  (0.1ms) CREATE TABLE "notes" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "post_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)  (0.1ms) CREATE INDEX "index_notes_on_post_id" ON "notes" ("post_id") - ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.7ms) commit transaction + ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] + TRANSACTION (0.8ms) commit transaction Migrating to CreateSnapshotsTables (20210306100122) - TRANSACTION (0.1ms) begin transaction -  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" text, "created_at" datetime NOT NULL) + TRANSACTION (0.0ms) begin transaction +  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" text, "created_at" datetime(6) NOT NULL)  (0.1ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")  (0.1ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")  (0.1ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.1ms) CREATE TABLE "snapshot_items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "snapshot_id" integer NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "object" text NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) +  (0.1ms) CREATE TABLE "snapshot_items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "snapshot_id" integer NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "object" text NOT NULL, "created_at" datetime(6) NOT NULL, "child_group_name" varchar)  (0.1ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")  (0.1ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306100122"]] - TRANSACTION (0.6ms) commit transaction - ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] + TRANSACTION (0.8ms) commit transaction + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-19 23:28:07.589659"], ["updated_at", "2021-08-19 23:28:07.589659"]] + ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2022-02-25 19:12:04.897521"], ["updated_at", "2022-02-25 19:12:04.897521"]] TRANSACTION (0.6ms) commit transaction -  (0.7ms) DELETE FROM posts; +  (1.0ms) DELETE FROM posts;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.7ms) DELETE FROM snapshots; +  (0.8ms) DELETE FROM snapshots;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.7ms) DELETE FROM snapshot_items; +  (0.9ms) 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]] + Post Load (0.2ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:12:04.909679"], ["updated_at", "2022-02-25 19:12:04.909679"]] + TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction - Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:07.601363"], ["updated_at", "2021-08-19 23:28:07.601363"]] + 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", "2022-02-25 19:12:04.928557"]] + 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.1ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (6.6ms) DELETE FROM posts; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.9ms) DELETE FROM snapshots; +  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.9ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:12:12.893690"], ["updated_at", "2022-02-25 19:12:12.893690"]] + TRANSACTION (0.8ms) 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", "2022-02-25 19:12:12.908543"]] 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]] +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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]] +  (6.5ms) DELETE FROM posts; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.9ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:13:03.860645"], ["updated_at", "2022-02-25 19:13:03.860645"]] + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.1ms) 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-19 23:28:07.616280"]] - TRANSACTION (1.2ms) commit transaction - Post Load (0.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["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", "2022-02-25 19:13:03.875638"]] + 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]]  (0.0ms) 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-19 23:28:07.601363000 Z + utc: &1 2022-02-25 19:13:03.860645000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.601363000 Z + time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:28:07.601363000 Z -','2021-08-19 23:28:07.639023',NULL) - TRANSACTION (0.8ms) commit transaction + time: 2022-02-25 19:13:03.860645000 Z +','2022-02-25 19:13:03.893865',NULL) + TRANSACTION (0.7ms) 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.2ms) 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-19 23:28:07.643299"]] - TRANSACTION (0.5ms) commit transaction + 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", "2022-02-25 19:13:03.898486"]] + 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]] 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-19 23:28:07.601363000 Z + utc: &1 2022-02-25 19:13:03.860645000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.601363000 Z + time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:28:07.601363000 Z -','2021-08-19 23:28:07.646425',NULL) - TRANSACTION (0.8ms) commit transaction + time: 2022-02-25 19:13:03.860645000 Z +','2022-02-25 19:13:03.902588',NULL) + TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction +----------------------------- +SnapshotItemTest: test_object +----------------------------- + ActiveSnapshot::Snapshot Load (0.3ms) 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.1ms) 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.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 +---------------------------------- +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_relationships +------------------------------------ + 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.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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]] + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Comment Create (0.4ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:13:03.964212"], ["updated_at", "2022-02-25 19:13:03.964212"]] 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 Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + 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", "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-19 23:28:07.691182"]] + 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", "2022-02-25 19:13:03.968271"]] 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]] + 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.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,'--- + 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-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.601363000 Z + time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: *1 - time: 2021-08-19 23:28:07.601363000 Z -','2021-08-19 23:28:07.694320',NULL),(NULL,3,'Comment',1,'--- + time: 2022-02-25 19:13:03.860645000 Z +','2022-02-25 19:13:03.972211',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:07.688491000 Z + utc: 2022-02-25 19:13:03.964212000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.688491000 Z + time: 2022-02-25 19:13:03.964212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:07.688491000 Z + utc: 2022-02-25 19:13:03.964212000 Z zone: *1 - time: 2021-08-19 23:28:07.688491000 Z -','2021-08-19 23:28:07.694320','comments') + time: 2022-02-25 19:13:03.964212000 Z +','2022-02-25 19:13:03.972211','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) 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-20 23:28:07.695499"], ["id", 1]] - Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:07.695924"], ["id", 1]] + ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:13:03.973406"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:13:03.973883"], ["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-19 23:28:07.696917"], ["updated_at", "2021-08-19 23:28:07.696917"]] - TRANSACTION (0.1ms) RELEASE 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", "2022-02-25 19:13:03.975029"], ["updated_at", "2022-02-25 19:13:03.975029"]] + 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-19 23:28:07.697739"], ["updated_at", "2021-08-19 23:28:07.697739"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:13:03.975912"], ["updated_at", "2022-02-25 19:13:03.975912"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) 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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + 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-19 23:28:07.601363"], ["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-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:13:03.860645"], ["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", "2022-02-25 19:13:03.964212"], ["updated_at", "2022-02-25 19:13:03.964212"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.3ms) rollback transaction + TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- + 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_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + SubPost Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:13:03.995905"], ["updated_at", "2022-02-25 19:13:03.995905"]] + 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", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:13:03.998326"], ["updated_at", "2022-02-25 19:13:03.998326"]] + TRANSACTION (0.1ms) 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", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:04.000765"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:13:03.995905000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:13:03.995905000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:13:03.995905000 Z +','2022-02-25 19:13:04.004888',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:13:03.998326000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:13:03.998326000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:13:03.998326000 Z + zone: *1 + time: 2022-02-25 19:13:03.998326000 Z +','2022-02-25 19:13:04.004888','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) 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 +-------------------------------------- +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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) 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 + 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.0ms) 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]] + 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.4ms) 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.1ms) 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 +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:13:04.021808"], ["updated_at", "2022-02-25 19:13:04.021808"]] + 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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:04.024515"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.4ms) 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 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 --------------------------------- -SnapshotTest: test_relationships --------------------------------- - 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.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 ------------------------------------- -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.6ms) rollback transaction - TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction + 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 ---------------------------------------- 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 + 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 (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-19 23:28:07.754325"]] + 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", "2022-02-25 19:13:04.040908"]] 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.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-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.601363000 Z + time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: *1 - time: 2021-08-19 23:28:07.601363000 Z -','2021-08-19 23:28:07.757455',NULL) + time: 2022-02-25 19:13:03.860645000 Z +','2022-02-25 19:13:04.043969',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) SAVEPOINT active_record_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 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-19 23:28:07.759398"]] + 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", "2022-02-25 19:13:04.057459"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 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.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-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.601363000 Z + time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: *1 - time: 2021-08-19 23:28:07.601363000 Z -','2021-08-19 23:28:07.762080',NULL) - TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + time: 2022-02-25 19:13:03.860645000 Z +','2022-02-25 19:13:04.060607',NULL) + TRANSACTION (0.4ms) 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-19 23:28:07.764341"]] + 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", "2022-02-25 19:13:04.063001"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) 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]] 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-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:07.601363000 Z + time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:07.601363000 Z + utc: 2022-02-25 19:13:03.860645000 Z zone: *1 - time: 2021-08-19 23:28:07.601363000 Z -','2021-08-19 23:28:07.767417',NULL) + time: 2022-02-25 19:13:03.860645000 Z +','2022-02-25 19:13:04.066440',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 + TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- - TRANSACTION (0.0ms) rollback transaction -  (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 + TRANSACTION (0.1ms) rollback transaction +  (1.1ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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.9ms) DELETE FROM posts; -  (1.4ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (1.2ms) DELETE FROM snapshots; -  (1.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (1.0ms) DELETE FROM snapshot_items; -  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; +  (6.6ms) DELETE FROM posts; +  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.8ms) DELETE FROM snapshots; +  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.9ms) DELETE FROM snapshot_items; +  (0.8ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:46.603059"], ["updated_at", "2021-08-19 23:28:46.603059"]] - TRANSACTION (0.8ms) commit transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:15:25.078053"], ["updated_at", "2022-02-25 19:15:25.078053"]] + 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-19 23:28:46.616208"]] - TRANSACTION (0.8ms) commit transaction + 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", "2022-02-25 19:15:25.092481"]] + 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,'--- + 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-19 23:28:46.603059000 Z + utc: &1 2022-02-25 19:15:25.078053000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.603059000 Z + time: 2022-02-25 19:15:25.078053000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:28:46.603059000 Z -','2021-08-19 23:28:46.631882',NULL) - TRANSACTION (0.6ms) commit transaction - Post Update (0.7ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + time: 2022-02-25 19:15:25.078053000 Z +','2022-02-25 19:15:25.111188',NULL) + TRANSACTION (0.7ms) 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-19 23:28:46.635496"]] - TRANSACTION (0.6ms) commit transaction + 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", "2022-02-25 19:15:25.115568"]] + 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]] + 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.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-19 23:28:46.603059000 Z + utc: &1 2022-02-25 19:15:25.078053000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.603059000 Z + time: 2022-02-25 19:15:25.078053000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:28:46.603059000 Z -','2021-08-19 23:28:46.638687',NULL) - TRANSACTION (0.5ms) commit transaction + time: 2022-02-25 19:15:25.078053000 Z +','2022-02-25 19:15:25.119373',NULL) + TRANSACTION (0.6ms) 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.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", "2022-02-25 19:15:25.153158"]] + 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: 2022-02-25 19:15:25.078053000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:15:25.078053000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:15:25.078053000 Z + zone: *1 + time: 2022-02-25 19:15:25.078053000 Z +','2022-02-25 19:15:25.156246',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", "2022-02-25 19:15:25.157969"]] + 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: 2022-02-25 19:15:25.078053000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:15:25.078053000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:15:25.078053000 Z + zone: *1 + time: 2022-02-25 19:15:25.078053000 Z +','2022-02-25 19:15:25.160211',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", "2022-02-25 19:15:25.161627"]] + 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: 2022-02-25 19:15:25.078053000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:15:25.078053000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:15:25.078053000 Z + zone: *1 + time: 2022-02-25 19:15:25.078053000 Z +','2022-02-25 19:15:25.163956',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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- -ActiveSnapshotTest: test_exposes_version +SnapshotsConcernTest: test_relationships ---------------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------------ +SnapshotsConcernTest: test_has_snapshot_children +------------------------------------------------ + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------- +SnapshotItemTest: test_object +----------------------------- + ActiveSnapshot::Snapshot Load (0.3ms) 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_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_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.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.4ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:15:25.194468"], ["updated_at", "2022-02-25 19:15:25.194468"]] + 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", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:15:25.198294"], ["updated_at", "2022-02-25 19:15:25.198294"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.200794"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + TRANSACTION (0.1ms) 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:15:25.194468000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:15:25.194468000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:15:25.194468000 Z +','2022-02-25 19:15:25.205518',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:15:25.198294000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:15:25.198294000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:15:25.198294000 Z + zone: *1 + time: 2022-02-25 19:15:25.198294000 Z +','2022-02-25 19:15:25.205518','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.5ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:15:25.213227"], ["updated_at", "2022-02-25 19:15:25.213227"]] + 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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.216071"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:15:25.213227000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:15:25.213227000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:15:25.213227000 Z +','2022-02-25 19:15:25.217553',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:15:25.218410"], ["id", 2]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) 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.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_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.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.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_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.2ms) 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.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_relationships +-------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------------- +ActiveSnapshotTest: test_exposes_main_module +-------------------------------------------- + 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]] + Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:15:25.250285"], ["updated_at", "2022-02-25 19:15:25.250285"]] 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 Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + 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", "snapshot-1"], ["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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.670427"]] + 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", "2022-02-25 19:15:25.254114"]] 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,'--- + 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,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.603059000 Z + utc: 2022-02-25 19:15:25.078053000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.603059000 Z + time: 2022-02-25 19:15:25.078053000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.603059000 Z + utc: 2022-02-25 19:15:25.078053000 Z zone: *1 - time: 2021-08-19 23:28:46.603059000 Z -','2021-08-19 23:28:46.672991',NULL),(NULL,3,'Comment',1,'--- + time: 2022-02-25 19:15:25.078053000 Z +','2022-02-25 19:15:25.258085',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.668148000 Z + utc: 2022-02-25 19:15:25.250285000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.668148000 Z + time: 2022-02-25 19:15:25.250285000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.668148000 Z + utc: 2022-02-25 19:15:25.250285000 Z zone: *1 - time: 2021-08-19 23:28:46.668148000 Z -','2021-08-19 23:28:46.672991','comments') + time: 2022-02-25 19:15:25.250285000 Z +','2022-02-25 19:15:25.258085','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-20 23:28:46.673978"], ["id", 1]] - Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:46.674338"], ["id", 1]] + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:15:25.269725"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:15:25.270370"], ["id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 - Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 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-19 23:28:46.675175"], ["updated_at", "2021-08-19 23:28:46.675175"]] - TRANSACTION (0.0ms) RELEASE 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", "2022-02-25 19:15:25.271722"], ["updated_at", "2022-02-25 19:15:25.271722"]] + TRANSACTION (0.1ms) 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-19 23:28:46.675840"], ["updated_at", "2021-08-19 23:28:46.675840"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:15:25.273014"], ["updated_at", "2022-02-25 19:15:25.273014"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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.1ms) 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.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:28:46.603059"], ["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-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]] + 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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:15:25.078053"], ["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", "2022-02-25 19:15:25.250285"], ["updated_at", "2022-02-25 19:15:25.250285"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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]] + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.2ms) rollback transaction - TRANSACTION (0.0ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- + TRANSACTION (108.7ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +---------------------------------------- +ActiveSnapshotTest: test_exposes_version +---------------------------------------- TRANSACTION (0.0ms) rollback transaction +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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]] +  (6.5ms) DELETE FROM posts; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.8ms) DELETE FROM snapshots; +  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.9ms) DELETE FROM snapshot_items; +  (0.8ms) 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.3ms) begin transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:16:53.817957"], ["updated_at", "2022-02-25 19:16:53.817957"]] + 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", "2022-02-25 19:16:53.832548"]] + 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.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 2022-02-25 19:16:53.817957000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:16:53.817957000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:16:53.817957000 Z +','2022-02-25 19:16:53.851096',NULL) + TRANSACTION (0.7ms) 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.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.855336"]] + 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]] + 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 2022-02-25 19:16:53.817957000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:16:53.817957000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:16:53.817957000 Z +','2022-02-25 19:16:53.859488',NULL) + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.1ms) begin transaction +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.1ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.2ms) 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_relationships --------------------------------- - TRANSACTION (0.0ms) rollback transaction +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:16:53.899474"], ["updated_at", "2022-02-25 19:16:53.899474"]] + 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", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:16:53.902868"], ["updated_at", "2022-02-25 19:16:53.902868"]] + 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", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.904842"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:16:53.899474000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:16:53.899474000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:16:53.899474000 Z +','2022-02-25 19:16:53.908424',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:16:53.902868000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:16:53.902868000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:16:53.902868000 Z + zone: *1 + time: 2022-02-25 19:16:53.902868000 Z +','2022-02-25 19:16:53.908424','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.5ms) 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]] +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:16:53.915861"], ["updated_at", "2022-02-25 19:16:53.915861"]] + 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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.919313"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:16:53.915861000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:16:53.915861000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:16:53.915861000 Z +','2022-02-25 19:16:53.920892',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:16:53.921931"], ["id", 2]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +-------------------------------------- +SnapshotTest: test_build_snapshot_item +-------------------------------------- + ActiveSnapshot::Snapshot Load (0.2ms) 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.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_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 -------------------------- 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 + ActiveSnapshot::Snapshot Load (0.2ms) 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.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["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.1ms) 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.2ms) 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_build_snapshot_item --------------------------------------- +--------------------------- +SnapshotTest: test_metadata +--------------------------- 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ - TRANSACTION (0.1ms) 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.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 (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-19 23:28:46.720422"]] + 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", "2022-02-25 19:17:11.237904"]] 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.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- + TRANSACTION (0.1ms) 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-19 23:28:46.603059000 Z + utc: 2022-02-25 19:16:53.817957000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.603059000 Z + time: 2022-02-25 19:16:53.817957000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.603059000 Z + utc: 2022-02-25 19:16:53.817957000 Z zone: *1 - time: 2021-08-19 23:28:46.603059000 Z -','2021-08-19 23:28:46.723268',NULL) + time: 2022-02-25 19:16:53.817957000 Z +','2022-02-25 19:17:11.241539',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-19 23:28:46.725154"]] + 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", "2022-02-25 19:17:11.244057"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) 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]] 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-19 23:28:46.603059000 Z + utc: 2022-02-25 19:16:53.817957000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.603059000 Z + time: 2022-02-25 19:16:53.817957000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.603059000 Z + utc: 2022-02-25 19:16:53.817957000 Z zone: *1 - time: 2021-08-19 23:28:46.603059000 Z -','2021-08-19 23:28:46.727906',NULL) - TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) SAVEPOINT active_record_1 + time: 2022-02-25 19:16:53.817957000 Z +','2022-02-25 19:17:11.247382',NULL) + TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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 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-19 23:28:46.729775"]] + 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", "2022-02-25 19:17:11.250501"]] 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.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-19 23:28:46.603059000 Z + utc: 2022-02-25 19:16:53.817957000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:28:46.603059000 Z + time: 2022-02-25 19:16:53.817957000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:28:46.603059000 Z + utc: 2022-02-25 19:16:53.817957000 Z zone: *1 - time: 2021-08-19 23:28:46.603059000 Z -','2021-08-19 23:28:46.732939',NULL) + time: 2022-02-25 19:16:53.817957000 Z +','2022-02-25 19:17:11.254169',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.4ms) rollback transaction + TRANSACTION (0.0ms) 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 +------------------------------------ +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.4ms) rollback transaction + TRANSACTION (0.1ms) 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.1ms) 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::Snapshot Load (0.0ms) 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.2ms) 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_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.1ms) 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.3ms) rollback transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------- -SnapshotItemTest: test_relationships ------------------------------------- +-------------------------------------------- +ActiveSnapshotTest: test_exposes_main_module +-------------------------------------------- TRANSACTION (0.0ms) rollback transaction -  (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 + 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.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) 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", "2022-02-25 19:17:11.285298"], ["updated_at", "2022-02-25 19:17:11.285298"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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", "2022-02-25 19:17:11.288619"]] + 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: 2022-02-25 19:16:53.817957000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:16:53.817957000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:16:53.817957000 Z + zone: *1 + time: 2022-02-25 19:16:53.817957000 Z +','2022-02-25 19:17:11.291952',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:17:11.285298000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:17:11.285298000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:17:11.285298000 Z + zone: *1 + time: 2022-02-25 19:17:11.285298000 Z +','2022-02-25 19:17:11.291952','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:17:11.293152"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:17:11.293750"], ["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", "2022-02-25 19:17:11.295547"], ["updated_at", "2022-02-25 19:17:11.295547"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.1ms) 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", "2022-02-25 19:17:11.296717"], ["updated_at", "2022-02-25 19:17:11.296717"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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", "2022-02-25 19:16:53.817957"], ["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", "2022-02-25 19:17:11.285298"], ["updated_at", "2022-02-25 19:17:11.285298"]] + TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] + Post Load (0.1ms) 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]] + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.4ms) rollback transaction +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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.9ms) DELETE FROM posts; -  (1.3ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (1.2ms) DELETE FROM snapshots; +  (6.5ms) DELETE FROM posts; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.8ms) DELETE FROM snapshots;  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (1.1ms) DELETE FROM snapshot_items; -  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; +  (1.0ms) DELETE FROM snapshot_items; +  (0.8ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:11.308109"], ["updated_at", "2021-08-19 23:29:11.308109"]] + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:18:38.895863"], ["updated_at", "2022-02-25 19:18:38.895863"]] TRANSACTION (0.6ms) commit transaction - TRANSACTION (0.0ms) begin transaction + TRANSACTION (0.1ms) 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-19 23:29:11.320795"]] - TRANSACTION (0.6ms) commit transaction + 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", "2022-02-25 19:18:38.910682"]] + 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]]  (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,'--- + 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-19 23:29:11.308109000 Z + utc: &1 2022-02-25 19:18:38.895863000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.308109000 Z + time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:29:11.308109000 Z -','2021-08-19 23:29:11.336271',NULL) - TRANSACTION (0.6ms) commit transaction - Post Update (0.6ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + time: 2022-02-25 19:18:38.895863000 Z +','2022-02-25 19:18:38.929364',NULL) + TRANSACTION (0.7ms) 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.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-19 23:29:11.339527"]] - TRANSACTION (0.5ms) commit transaction + 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", "2022-02-25 19:18:38.933744"]] + 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]] + 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.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- + 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-19 23:29:11.308109000 Z + utc: &1 2022-02-25 19:18:38.895863000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.308109000 Z + time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:29:11.308109000 Z -','2021-08-19 23:29:11.342050',NULL) - TRANSACTION (0.4ms) commit transaction + time: 2022-02-25 19:18:38.895863000 Z +','2022-02-25 19:18:38.937428',NULL) + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.1ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) 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.0ms) 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_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 --------------------------------- -SnapshotTest: test_relationships --------------------------------- - TRANSACTION (0.0ms) rollback transaction - TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- - ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::Snapshot Load (0.2ms) 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]] + 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.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.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:18:38.986638"], ["updated_at", "2022-02-25 19:18:38.986638"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:38.990142"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:18:38.986638000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:18:38.986638000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:18:38.986638000 Z +','2022-02-25 19:18:38.992515',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:18:38.993451"], ["id", 2]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (222.6ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- + 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_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_build_snapshot_item -------------------------------------- - ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + 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 -------------------------------------------- -ActiveSnapshotTest: test_snapshot_lifecycle -------------------------------------------- - Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.0ms) SAVEPOINT active_record_1 - Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]] +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + SubPost Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:18:39.254042"], ["updated_at", "2022-02-25 19:18:39.254042"]] 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.1ms) 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-19 23:29:11.386301"]] + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:18:39.258961"], ["updated_at", "2022-02-25 19:18:39.258961"]] 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 + 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", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:39.261360"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + TRANSACTION (0.1ms) 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.308109000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone + utc: &1 2022-02-25 19:18:39.254042000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.308109000 Z + time: 2022-02-25 19:18:39.254042000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.308109000 Z - zone: *1 - time: 2021-08-19 23:29:11.308109000 Z -','2021-08-19 23:29:11.389012',NULL),(NULL,3,'Comment',1,'--- + utc: *1 + zone: *2 + time: 2022-02-25 19:18:39.254042000 Z +','2022-02-25 19:18:39.265432',NULL),(NULL,3,'Comment',1,'--- id: 1 -content: foo -post_id: 1 +content: Example comment +post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.384159000 Z + utc: 2022-02-25 19:18:39.258961000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.384159000 Z + time: 2022-02-25 19:18:39.258961000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.384159000 Z + utc: 2022-02-25 19:18:39.258961000 Z zone: *1 - time: 2021-08-19 23:29:11.384159000 Z -','2021-08-19 23:29:11.389012','comments') + time: 2022-02-25 19:18:39.258961000 Z +','2022-02-25 19:18:39.265432','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-20 23:29:11.390035"], ["id", 1]] - Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:11.390390"], ["id", 1]] - TRANSACTION (0.0ms) SAVEPOINT active_record_1 - Comment Destroy (0.0ms) 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-19 23:29:11.391260"], ["updated_at", "2021-08-19 23:29:11.391260"]] - TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) SAVEPOINT active_record_1 - Comment Create (0.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391968"], ["updated_at", "2021-08-19 23:29:11.391968"]] - 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.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 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.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:29:11.308109"], ["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-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]] - 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.0ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.3ms) rollback transaction + TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - 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 ------------------------------------- -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.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 ----------------------------------- -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.0ms) 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_create_snapshot! ------------------------------------------- - Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.0ms) SAVEPOINT active_record_1 + 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-19 23:29:11.411538"]] + ActiveSnapshot::Snapshot Create (0.4ms) 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", "2022-02-25 19:18:39.272765"]] 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,'--- + 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-19 23:29:11.308109000 Z + utc: 2022-02-25 19:18:38.895863000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.308109000 Z + time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.308109000 Z + utc: 2022-02-25 19:18:38.895863000 Z zone: *1 - time: 2021-08-19 23:29:11.308109000 Z -','2021-08-19 23:29:11.413742',NULL) + time: 2022-02-25 19:18:38.895863000 Z +','2022-02-25 19:18:39.276423',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-19 23:29:11.415146"]] + 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", "2022-02-25 19:18:39.278218"]] 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-19 23:29:11.308109000 Z + utc: 2022-02-25 19:18:38.895863000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.308109000 Z + time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.308109000 Z + utc: 2022-02-25 19:18:38.895863000 Z zone: *1 - time: 2021-08-19 23:29:11.308109000 Z -','2021-08-19 23:29:11.417040',NULL) + time: 2022-02-25 19:18:38.895863000 Z +','2022-02-25 19:18:39.280872',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-19 23:29:11.418345"]] + 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", "2022-02-25 19:18:39.282819"]] 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-19 23:29:11.308109000 Z + utc: 2022-02-25 19:18:38.895863000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:11.308109000 Z + time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:11.308109000 Z + utc: 2022-02-25 19:18:38.895863000 Z zone: *1 - time: 2021-08-19 23:29:11.308109000 Z -','2021-08-19 23:29:11.420235',NULL) + time: 2022-02-25 19:18:38.895863000 Z +','2022-02-25 19:18:39.285362',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) SAVEPOINT active_record_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 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) ROLLBACK TO SAVEPOINT active_record_1 + TRANSACTION (0.4ms) 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 ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction -  (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 +-------------------------------------------- +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", "2022-02-25 19:18:39.294715"], ["updated_at", "2022-02-25 19:18:39.294715"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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", "2022-02-25 19:18:39.297819"]] + 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: 2022-02-25 19:18:38.895863000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:18:38.895863000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:18:38.895863000 Z + zone: *1 + time: 2022-02-25 19:18:38.895863000 Z +','2022-02-25 19:18:39.301421',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:18:39.294715000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:18:39.294715000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:18:39.294715000 Z + zone: *1 + time: 2022-02-25 19:18:39.294715000 Z +','2022-02-25 19:18:39.301421','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:18:39.302761"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:18:39.303707"], ["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", "2022-02-25 19:18:39.305622"], ["updated_at", "2022-02-25 19:18:39.305622"]] + 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", "2022-02-25 19:18:39.306646"], ["updated_at", "2022-02-25 19:18:39.306646"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) 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.1ms) 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", "2022-02-25 19:18:38.895863"], ["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", "2022-02-25 19:18:39.294715"], ["updated_at", "2022-02-25 19:18:39.294715"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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.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]] + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.5ms) 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 +------------------------------------ +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.4ms) 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 +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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.8ms) DELETE FROM posts; -  (1.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (1.1ms) DELETE FROM snapshots; -  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.9ms) DELETE FROM snapshot_items; -  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; +  (6.7ms) DELETE FROM posts; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.9ms) DELETE FROM snapshots; +  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.8ms) DELETE FROM snapshot_items; +  (0.8ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:21.079132"], ["updated_at", "2021-08-19 23:29:21.079132"]] - TRANSACTION (0.8ms) commit transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:19:22.963999"], ["updated_at", "2022-02-25 19:19:22.963999"]] + 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-19 23:29:21.092194"]] - TRANSACTION (0.8ms) commit transaction + 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", "2022-02-25 19:19:22.978887"]] + 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,'--- + 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-19 23:29:21.079132000 Z + utc: &1 2022-02-25 19:19:22.963999000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.079132000 Z + time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:29:21.079132000 Z -','2021-08-19 23:29:21.107905',NULL) - TRANSACTION (1.0ms) commit transaction - Post Update (1.0ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + time: 2022-02-25 19:19:22.963999000 Z +','2022-02-25 19:19:22.997867',NULL) + TRANSACTION (0.9ms) 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.4ms) 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-19 23:29:21.113375"]] - TRANSACTION (0.8ms) commit transaction + 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", "2022-02-25 19:19:23.002578"]] + 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]] + 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.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-19 23:29:21.079132000 Z + utc: &1 2022-02-25 19:19:22.963999000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.079132000 Z + time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 - time: 2021-08-19 23:29:21.079132000 Z -','2021-08-19 23:29:21.117615',NULL) - TRANSACTION (0.6ms) commit transaction + time: 2022-02-25 19:19:22.963999000 Z +','2022-02-25 19:19:23.006416',NULL) + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.1ms) 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]] + Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) 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", "2022-02-25 19:19:23.043351"], ["updated_at", "2022-02-25 19:19:23.043351"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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.1ms) 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-19 23:29:21.151063"]] + 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", "2022-02-25 19:19:23.046474"]] 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-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.079132000 Z + time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: *1 - time: 2021-08-19 23:29:21.079132000 Z -','2021-08-19 23:29:21.153591',NULL),(NULL,3,'Comment',1,'--- + time: 2022-02-25 19:19:22.963999000 Z +','2022-02-25 19:19:23.049655',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:21.148886000 Z + utc: 2022-02-25 19:19:23.043351000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.148886000 Z + time: 2022-02-25 19:19:23.043351000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:21.148886000 Z + utc: 2022-02-25 19:19:23.043351000 Z zone: *1 - time: 2021-08-19 23:29:21.148886000 Z -','2021-08-19 23:29:21.153591','comments') + time: 2022-02-25 19:19:23.043351000 Z +','2022-02-25 19:19:23.049655','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-20 23:29:21.154558"], ["id", 1]] - Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:21.154916"], ["id", 1]] + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:19:23.050847"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:19:23.051327"], ["id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 - Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 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-19 23:29:21.155758"], ["updated_at", "2021-08-19 23:29:21.155758"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:19:23.052418"], ["updated_at", "2022-02-25 19:19:23.052418"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 - Comment Create (0.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.156425"], ["updated_at", "2021-08-19 23:29:21.156425"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:19:23.053323"], ["updated_at", "2022-02-25 19:19:23.053323"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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.1ms) 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.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - Comment Destroy (0.0ms) 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-19 23:29:21.079132"], ["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-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]] - TRANSACTION (0.1ms) 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 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]] + 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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:19:22.963999"], ["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", "2022-02-25 19:19:23.043351"], ["updated_at", "2022-02-25 19:19:23.043351"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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]] + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.4ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:19:23.069046"], ["updated_at", "2022-02-25 19:19:23.069046"]] + 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", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:19:23.070836"], ["updated_at", "2022-02-25 19:19:23.070836"]] + 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", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.073031"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:19:23.069046000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:19:23.069046000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:19:23.069046000 Z +','2022-02-25 19:19:23.078150',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:19:23.070836000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:19:23.070836000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:19:23.070836000 Z + zone: *1 + time: 2022-02-25 19:19:23.070836000 Z +','2022-02-25 19:19:23.078150','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.5ms) rollback transaction + TRANSACTION (0.1ms) 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.1ms) begin transaction +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:19:23.094599"], ["updated_at", "2022-02-25 19:19:23.094599"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.097768"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.1ms) 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,'ParentWithoutChildren',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:19:23.094599000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:19:23.094599000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:19:23.094599000 Z +','2022-02-25 19:19:23.100095',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:19:23.101221"], ["id", 2]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) 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.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]] + 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" = ? [["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 --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- 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_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.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_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 ------------------------------------------------ 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_create_snapshot! ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.0ms) SAVEPOINT active_record_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-19 23:29:21.176506"]] - TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.5ms) 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", "2022-02-25 19:19:23.125570"]] + TRANSACTION (0.1ms) 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.1ms) 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-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.079132000 Z + time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: *1 - time: 2021-08-19 23:29:21.079132000 Z -','2021-08-19 23:29:21.179444',NULL) + time: 2022-02-25 19:19:22.963999000 Z +','2022-02-25 19:19:23.130331',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) 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-19 23:29:21.182276"]] + 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", "2022-02-25 19:19:23.132665"]] 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]] + 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.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-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.079132000 Z + time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: *1 - time: 2021-08-19 23:29:21.079132000 Z -','2021-08-19 23:29:21.185087',NULL) + time: 2022-02-25 19:19:22.963999000 Z +','2022-02-25 19:19:23.136079',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) SAVEPOINT active_record_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 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-19 23:29:21.186765"]] + ActiveSnapshot::Snapshot Create (0.2ms) 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", "2022-02-25 19:19:23.138146"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - Post Load (0.1ms) 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]] 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-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-19 23:29:21.079132000 Z + time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-19 23:29:21.079132000 Z + utc: 2022-02-25 19:19:22.963999000 Z zone: *1 - time: 2021-08-19 23:29:21.079132000 Z -','2021-08-19 23:29:21.189732',NULL) + time: 2022-02-25 19:19:22.963999000 Z +','2022-02-25 19:19:23.141546',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 + TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) 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_relationships --------------------------------- - TRANSACTION (0.0ms) rollback transaction - TRANSACTION (0.0ms) begin transaction --------------------------------------- -SnapshotTest: test_build_snapshot_item --------------------------------------- +------------------------------------ +SnapshotItemTest: test_restore_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.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_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.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", 1]] - Post Load (0.0ms) 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]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Post Update (0.4ms) 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.5ms) 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 - 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 ------------------------------ -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_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]] @@ -1349,183 +2112,205 @@ 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 ------------------------------------ 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.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'; +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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]] +  (6.6ms) DELETE FROM posts; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (0.8ms) DELETE FROM snapshots; +  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (1.0ms) DELETE FROM snapshot_items; +  (0.8ms) 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 + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:20:35.789310"], ["updated_at", "2022-02-25 19:20:35.789310"]] + 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:45:59.125328"]] - TRANSACTION (0.6ms) commit transaction + ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.803837"]] + TRANSACTION (0.7ms) 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(*) + 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.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 + utc: &1 2022-02-25 19:20:35.789310000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.108921000 Z + time: 2022-02-25 19:20:35.789310000 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) + time: 2022-02-25 19:20:35.789310000 Z +','2022-02-25 19:20:35.822170',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 + 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", "2022-02-25 19:20:35.826497"]] + 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]] 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 + utc: &1 2022-02-25 19:20:35.789310000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.108921000 Z + time: 2022-02-25 19:20:35.789310000 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 + time: 2022-02-25 19:20:35.789310000 Z +','2022-02-25 19:20:35.830224',NULL) + TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) 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"]] + 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", "2022-02-25 19:20:35.871008"]] 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 + utc: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.108921000 Z + time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:45:59.108921000 Z + utc: 2022-02-25 19:20:35.789310000 Z zone: *1 - time: 2021-08-27 20:45:59.108921000 Z -','2021-08-27 20:45:59.203510',NULL) + time: 2022-02-25 19:20:35.789310000 Z +','2022-02-25 19:20:35.874056',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"]] + 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", "2022-02-25 19:20:35.875642"]] 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 + utc: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.108921000 Z + time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:45:59.108921000 Z + utc: 2022-02-25 19:20:35.789310000 Z zone: *1 - time: 2021-08-27 20:45:59.108921000 Z -','2021-08-27 20:45:59.207556',NULL) + time: 2022-02-25 19:20:35.789310000 Z +','2022-02-25 19:20:35.877986',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"]] + 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", "2022-02-25 19:20:35.879416"]] 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]] + 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.0ms) SAVEPOINT active_record_1 + TRANSACTION (0.1ms) 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 + utc: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.108921000 Z + time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:45:59.108921000 Z + utc: 2022-02-25 19:20:35.789310000 Z zone: *1 - time: 2021-08-27 20:45:59.108921000 Z -','2021-08-27 20:45:59.211345',NULL) + time: 2022-02-25 19:20:35.789310000 Z +','2022-02-25 19:20:35.883477',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.0ms) 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_object +----------------------------- + ActiveSnapshot::Snapshot Load (0.2ms) 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_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.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" = ? 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.3ms) 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]] @@ -1534,134 +2319,332 @@ 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 ------------------------------ +--------------------------- +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 +-------------------------------------- +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.1ms) rollback transaction + TRANSACTION (0.1ms) 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 ------------------------------------- -SnapshotItemTest: test_restore_item! ------------------------------------- +------------------------------ +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_relationships +-------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:20:35.931214"], ["updated_at", "2022-02-25 19:20:35.931214"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.934708"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:20:35.931214000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:20:35.931214000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:20:35.931214000 Z +','2022-02-25 19:20:35.936688',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:20:35.937620"], ["id", 2]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) 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]] - ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 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.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.4ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + SubPost Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:20:35.950273"], ["updated_at", "2022-02-25 19:20:35.950273"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:20:35.954355"], ["updated_at", "2022-02-25 19:20:35.954355"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.2ms) rollback transaction + 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", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.956695"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + TRANSACTION (0.1ms) 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:20:35.950273000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:20:35.950273000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:20:35.950273000 Z +','2022-02-25 19:20:35.961347',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:20:35.954355000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:20:35.954355000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:20:35.954355000 Z + zone: *1 + time: 2022-02-25 19:20:35.954355000 Z +','2022-02-25 19:20:35.961347','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) 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"]] + Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:20:35.967145"], ["updated_at", "2022-02-25 19:20:35.967145"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) 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"]] + 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", "2022-02-25 19:20:35.970506"]] 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,'--- + TRANSACTION (0.1ms) 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:45:59.108921000 Z + utc: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.108921000 Z + time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:45:59.108921000 Z + utc: 2022-02-25 19:20:35.789310000 Z zone: *1 - time: 2021-08-27 20:45:59.108921000 Z -','2021-08-27 20:45:59.254446',NULL),(NULL,3,'Comment',1,'--- + time: 2022-02-25 19:20:35.789310000 Z +','2022-02-25 19:20:35.974518',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 + utc: 2022-02-25 19:20:35.967145000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:45:59.248858000 Z + time: 2022-02-25 19:20:35.967145000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:45:59.248858000 Z + utc: 2022-02-25 19:20:35.967145000 Z zone: *1 - time: 2021-08-27 20:45:59.248858000 Z -','2021-08-27 20:45:59.254446','comments') + time: 2022-02-25 19:20:35.967145000 Z +','2022-02-25 19:20:35.974518','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]] + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:20:35.976249"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:20:35.987493"], ["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"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:20:35.989308"], ["updated_at", "2022-02-25 19:20:35.989308"]] 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.1ms) 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", "2022-02-25 19:20:35.990552"], ["updated_at", "2022-02-25 19:20:35.990552"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.0ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) 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]] + 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + 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: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"]] + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:20:35.789310"], ["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", "2022-02-25 19:20:35.967145"], ["updated_at", "2022-02-25 19:20:35.967145"]] 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"]] + ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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 + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.5ms) 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 +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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]] +  (6.6ms) DELETE FROM posts; +  (0.8ms) 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.9ms) DELETE FROM snapshot_items; +  (0.8ms) 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 --------------------------------------- -SnapshotTest: test_build_snapshot_item --------------------------------------- + Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:21:38.597166"], ["updated_at", "2022-02-25 19:21:38.597166"]] + 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", "2022-02-25 19:21:38.612142"]] + 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.1ms) 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 2022-02-25 19:21:38.597166000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.597166000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:21:38.597166000 Z +','2022-02-25 19:21:38.630816',NULL) + TRANSACTION (0.7ms) 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", "2022-02-25 19:21:38.635374"]] + 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]] + 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 2022-02-25 19:21:38.597166000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.597166000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:21:38.597166000 Z +','2022-02-25 19:21:38.639020',NULL) + TRANSACTION (0.6ms) commit transaction + TRANSACTION (0.1ms) begin transaction +----------------------------- +SnapshotItemTest: test_object +----------------------------- + ActiveSnapshot::Snapshot Load (0.2ms) 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.1ms) 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]] - 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]] + 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.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 +---------------------------------- +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 -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- @@ -1672,413 +2655,712 @@ -------------------------- 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.1ms) 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]] - 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 +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:21:38.700920"], ["updated_at", "2022-02-25 19:21:38.700920"]] + 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", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:21:38.704492"], ["updated_at", "2022-02-25 19:21:38.704492"]] + 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", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.706644"]] + TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:21:38.700920000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.700920000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:21:38.700920000 Z +','2022-02-25 19:21:38.712301',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.704492000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.704492000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.704492000 Z + zone: *1 + time: 2022-02-25 19:21:38.704492000 Z +','2022-02-25 19:21:38.712301','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.5ms) 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 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 -  (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 +-------------------------------------- +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.1ms) rollback transaction + TRANSACTION (0.1ms) begin transaction +---------------------------------------------------------- +SnapshotTest: test_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:21:38.727758"], ["updated_at", "2022-02-25 19:21:38.727758"]] + 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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.730675"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.3ms) rollback 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 +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- + 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", "2022-02-25 19:21:38.738636"], ["updated_at", "2022-02-25 19:21:38.738636"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + 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", "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", "2022-02-25 19:21:38.742989"]] + 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.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: 2022-02-25 19:21:38.597166000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.597166000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.597166000 Z + zone: *1 + time: 2022-02-25 19:21:38.597166000 Z +','2022-02-25 19:21:38.746771',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.738636000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.738636000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.738636000 Z + zone: *1 + time: 2022-02-25 19:21:38.738636000 Z +','2022-02-25 19:21:38.746771','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:21:38.748173"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:21:38.748703"], ["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", "2022-02-25 19:21:38.749982"], ["updated_at", "2022-02-25 19:21:38.749982"]] + 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", "2022-02-25 19:21:38.750934"], ["updated_at", "2022-02-25 19:21:38.750934"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:21:38.597166"], ["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", "2022-02-25 19:21:38.738636"], ["updated_at", "2022-02-25 19:21:38.738636"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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]] + Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.5ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +------------------------------------------------ +SnapshotsConcernTest: test_has_snapshot_children +------------------------------------------------ + Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) 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.4ms) 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", "2022-02-25 19:21:38.788191"]] + TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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.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 + 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: 2022-02-25 19:21:38.597166000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.597166000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.597166000 Z + zone: *1 + time: 2022-02-25 19:21:38.597166000 Z +','2022-02-25 19:21:38.792986',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", "2022-02-25 19:21:38.795333"]] + TRANSACTION (0.1ms) 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: 2022-02-25 19:21:38.597166000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.597166000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.597166000 Z + zone: *1 + time: 2022-02-25 19:21:38.597166000 Z +','2022-02-25 19:21:38.798731',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", "2022-02-25 19:21:38.800642"]] + 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: 2022-02-25 19:21:38.597166000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:21:38.597166000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:21:38.597166000 Z + zone: *1 + time: 2022-02-25 19:21:38.597166000 Z +','2022-02-25 19:21:38.803548',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 +  (1.0ms) SELECT sqlite_version(*) + ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::SchemaMigration Pluck (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'; +  (6.5ms) DELETE FROM posts; +  (0.8ms) 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'; +  (0.9ms) 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 + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:22:05.476133"], ["updated_at", "2022-02-25 19:22:05.476133"]] + 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: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"]] + 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", "2022-02-25 19:22:05.490924"]] 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,'--- + 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:46:45.337718000 Z + utc: &1 2022-02-25 19:22:05.476133000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.337718000 Z + time: 2022-02-25 19:22:05.476133000 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]] + time: 2022-02-25 19:22:05.476133000 Z +','2022-02-25 19:22:05.509251',NULL) + TRANSACTION (0.7ms) 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.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 + 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", "2022-02-25 19:22:05.513970"]] + TRANSACTION (0.6ms) 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]] + 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.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- + 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:46:45.337718000 Z + utc: &1 2022-02-25 19:22:05.476133000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.337718000 Z + time: 2022-02-25 19:22:05.476133000 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 + time: 2022-02-25 19:22:05.476133000 Z +','2022-02-25 19:22:05.517708',NULL) + TRANSACTION (0.6ms) commit transaction + TRANSACTION (0.1ms) begin transaction +--------------------------- +SnapshotTest: test_metadata +--------------------------- + ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ +-------------------------------------- +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_relationships -------------------------------- 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_single_model_snapshots_without_children +---------------------------------------------------------- + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:22:05.566200"], ["updated_at", "2022-02-25 19:22:05.566200"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.569864"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:22:05.566200000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:22:05.566200000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:22:05.566200000 Z +','2022-02-25 19:22:05.572027',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:22:05.572967"], ["id", 2]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.4ms) 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]] + 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.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["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.2ms) rollback transaction + TRANSACTION (0.3ms) 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]] + Post Load (0.3ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.2ms) 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 +----------------------------------------------------- +SnapshotTest: test_fetch_reified_items_with_sti_class +----------------------------------------------------- + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + SubPost Create (0.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:22:05.589975"], ["updated_at", "2022-02-25 19:22:05.589975"]] + TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:22:05.594950"], ["updated_at", "2022-02-25 19:22:05.594950"]] + 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", "v1"], ["item_id", 2], ["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", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.597775"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] + TRANSACTION (0.1ms) 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,'SubPost',2,'--- +id: 2 +a: 1 +b: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2022-02-25 19:22:05.589975000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:22:05.589975000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2022-02-25 19:22:05.589975000 Z +','2022-02-25 19:22:05.602664',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: Example comment +post_id: 2 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:22:05.594950000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2022-02-25 19:22:05.594950000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2022-02-25 19:22:05.594950000 Z + zone: *1 + time: 2022-02-25 19:22:05.594950000 Z +','2022-02-25 19:22:05.602664','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + TRANSACTION (0.5ms) 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.1ms) 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", "2022-02-25 19:22:05.609561"], ["updated_at", "2022-02-25 19:22:05.609561"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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"]] + ActiveSnapshot::Snapshot Create (0.3ms) 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", "2022-02-25 19:22:05.612792"]] 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,'--- + TRANSACTION (0.1ms) 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 + utc: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.337718000 Z + time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:46:45.337718000 Z + utc: 2022-02-25 19:22:05.476133000 Z zone: *1 - time: 2021-08-27 20:46:45.337718000 Z -','2021-08-27 20:46:45.433489',NULL),(NULL,3,'Comment',1,'--- + time: 2022-02-25 19:22:05.476133000 Z +','2022-02-25 19:22:05.616971',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 + utc: 2022-02-25 19:22:05.609561000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.427588000 Z + time: 2022-02-25 19:22:05.609561000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:46:45.427588000 Z + utc: 2022-02-25 19:22:05.609561000 Z zone: *1 - time: 2021-08-27 20:46:45.427588000 Z -','2021-08-27 20:46:45.433489','comments') + time: 2022-02-25 19:22:05.609561000 Z +','2022-02-25 19:22:05.616971','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 + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:22:05.618983"], ["id", 1]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:22:05.620010"], ["id", 1]] + TRANSACTION (0.1ms) 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"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:22:05.621430"], ["updated_at", "2022-02-25 19:22:05.621430"]] 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"]] + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:22:05.622705"], ["updated_at", "2022-02-25 19:22:05.622705"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::SnapshotItem Count (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]] + 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]] 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"]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:22:05.476133"], ["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", "2022-02-25 19:22:05.609561"], ["updated_at", "2022-02-25 19:22:05.609561"]] 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"]] + ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Count (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 Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 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.3ms) rollback transaction + TRANSACTION (0.4ms) 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 ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------- -SnapshotItemTest: test_restore_item! ------------------------------------- +----------------------------- +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]] - 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 + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.1ms) 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.2ms) 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 ------------------------------ +------------------------------------ +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]] - TRANSACTION (0.0ms) rollback transaction + 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.2ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.5ms) 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.1ms) 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]] + Post Load (0.2ms) 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]] + ActiveSnapshot::Snapshot Create (0.4ms) 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", "2022-02-25 19:22:05.657495"]] + TRANSACTION (0.1ms) 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.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 + utc: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.337718000 Z + time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:46:45.337718000 Z + utc: 2022-02-25 19:22:05.476133000 Z zone: *1 - time: 2021-08-27 20:46:45.337718000 Z -','2021-08-27 20:46:45.475771',NULL) + time: 2022-02-25 19:22:05.476133000 Z +','2022-02-25 19:22:05.661726',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"]] + 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", "2022-02-25 19:22:05.663723"]] 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 + TRANSACTION (0.1ms) 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 + utc: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.337718000 Z + time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:46:45.337718000 Z + utc: 2022-02-25 19:22:05.476133000 Z zone: *1 - time: 2021-08-27 20:46:45.337718000 Z -','2021-08-27 20:46:45.480667',NULL) + time: 2022-02-25 19:22:05.476133000 Z +','2022-02-25 19:22:05.666294',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"]] + 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", "2022-02-25 19:22:05.679118"]] 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 + utc: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-08-27 20:46:45.337718000 Z + time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-08-27 20:46:45.337718000 Z + utc: 2022-02-25 19:22:05.476133000 Z zone: *1 - time: 2021-08-27 20:46:45.337718000 Z -','2021-08-27 20:46:45.485020',NULL) + time: 2022-02-25 19:22:05.476133000 Z +','2022-02-25 19:22:05.682462',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 + TRANSACTION (0.0ms) begin transaction +------------------------------------------------ +SnapshotsConcernTest: test_has_snapshot_children +------------------------------------------------ + Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- + TRANSACTION (0.1ms) rollback transaction