(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) 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.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.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] TRANSACTION (0.8ms) commit transaction Migrating to CreateSnapshotsTables (20210306100122) 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(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.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.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  (1.0ms) DELETE FROM posts;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.8ms) DELETE FROM snapshots;  (0.1ms) 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.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 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", "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 2022-02-25 19:13:03.860645000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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", "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 2022-02-25 19:13:03.860645000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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.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.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 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: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.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.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:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:13:03.860645000 Z zone: *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: 2022-02-25 19:13:03.964212000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.964212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:13:03.964212000 Z zone: *1 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 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", "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", "2022-02-25 19:13:03.975912"], ["updated_at", "2022-02-25 19:13:03.975912"]] 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.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", "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 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.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.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.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.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_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 ------------------------------------------------ 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 ---------------------------------------- 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", "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: 2022-02-25 19:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:13:03.860645000 Z zone: *1 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.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", "2022-02-25 19:13:04.057459"]] 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,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:13:03.860645000 Z zone: *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", "2022-02-25 19:13:04.063001"]] 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:13:03.860645000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:13:03.860645000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:13:03.860645000 Z zone: *1 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.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]]  (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", "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", "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.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:15:25.078053000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:15:25.078053000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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", "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.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 2022-02-25 19:15:25.078053000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:15:25.078053000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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 ---------------------------------------- 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.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 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: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.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: 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.258085',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:15:25.250285000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:15:25.250285000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:15:25.250285000 Z zone: *1 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 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.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: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", "2022-02-25 19:15:25.273014"], ["updated_at", "2022-02-25 19:15:25.273014"]] 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: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 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]] 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 (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_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_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_restore -------------------------- 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.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_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 ------------------------------------------------ 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", "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.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: 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.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", "2022-02-25 19:17:11.244057"]] 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: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.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", "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: 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.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.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.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 ----------------------------------------------- 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_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]]  (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.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", "2022-02-25 19:18:38.895863"], ["updated_at", "2022-02-25 19:18:38.895863"]] TRANSACTION (0.6ms) 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", "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.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:18:38.895863000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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.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.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:18:38.895863000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:18:38.895863000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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_restore -------------------------- 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.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.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.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_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 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 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: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: &1 2022-02-25 19:18:39.254042000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:18:39.254042000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone 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: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:18:39.258961000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:18:39.258961000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:18:39.258961000 Z zone: *1 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 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 ------------------------------------------- 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: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.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: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.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", "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: 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.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", "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: 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.285362',NULL) 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", "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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: 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.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]]  (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", "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", "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.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:19:22.963999000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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.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.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 2022-02-25 19:19:22.963999000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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.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 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.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: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:19:22.963999000 Z zone: *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: 2022-02-25 19:19:23.043351000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:23.043351000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:19:23.043351000 Z zone: *1 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 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.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: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.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 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.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]] 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 -------------------------------- 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 ------------------------------------------------ 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.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.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: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:19:22.963999000 Z zone: *1 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.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: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.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: 2022-02-25 19:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:19:22.963999000 Z zone: *1 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.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.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.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:19:22.963999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:19:22.963999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:19:22.963999000 Z zone: *1 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.4ms) 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.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.5ms) 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_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- 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.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.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.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:20:35.789310000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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", "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 2022-02-25 19:20:35.789310000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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 (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: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:20:35.789310000 Z zone: *1 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", "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: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:20:35.789310000 Z zone: *1 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", "2022-02-25 19:20:35.879416"]] 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.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.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: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:20:35.789310000 Z zone: *1 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.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 ------------------------------------------------ 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]] 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_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 ------------------------------ 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]] 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 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.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 ------------------------------------------- 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:20:35.967145"], ["updated_at", "2022-02-25 19:20:35.967145"]] 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 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: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.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: 2022-02-25 19:20:35.789310000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.789310000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:20:35.789310000 Z zone: *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: 2022-02-25 19:20:35.967145000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:20:35.967145000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:20:35.967145000 Z zone: *1 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 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", "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.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 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.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: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 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.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 -------------------------------------------- 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 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]] 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 -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.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]] 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.1ms) 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: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.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.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 -------------------------------- 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.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]]  (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.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.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", "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.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:22:05.476133000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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.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.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:22:05.476133000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 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 -------------------------------------- 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.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_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."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_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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) 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:22:05.609561"], ["updated_at", "2022-02-25 19:22:05.609561"]] 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.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.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: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:22:05.476133000 Z zone: *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: 2022-02-25 19:22:05.609561000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.609561000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:22:05.609561000 Z zone: *1 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 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", "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", "2022-02-25 19:22:05.622705"], ["updated_at", "2022-02-25 19:22:05.622705"]] 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.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", "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 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]] 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 -------------------------------------------- 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_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_validations ---------------------------------- 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_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.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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.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: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: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:22:05.476133000 Z zone: *1 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", "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.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: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:22:05.476133000 Z zone: *1 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", "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: 2022-02-25 19:22:05.476133000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-02-25 19:22:05.476133000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-02-25 19:22:05.476133000 Z zone: *1 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  (1.3ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.6ms) 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.9ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]  (136.8ms) DELETE FROM posts;  (4.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (1.8ms) DELETE FROM snapshots;  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (1.8ms) DELETE FROM snapshot_items;  (1.3ms) 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-09-17 05:08:20.001176"], ["updated_at", "2022-09-17 05:08:20.001176"]] TRANSACTION (0.7ms) commit transaction  (1.2ms) 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.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.8ms) DELETE FROM snapshots;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (0.8ms) DELETE FROM snapshot_items;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:08:57.039504"], ["updated_at", "2022-09-17 05:08:57.039504"]] TRANSACTION (0.6ms) 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", "2022-09-17 05:08:57.058179"]] TRANSACTION (127.1ms) 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-09-17 05:08:57.039504000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.209819',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", "2022-09-17 05:08:57.214087"]] 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.4ms) 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-09-17 05:08:57.039504000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.218524',NULL) TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- SnapshotsConcernTest: test_create_snapshot! ------------------------------------------- Post Load (0.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 (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-09-17 05:08:57.296676"]] 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-09-17 05:08:57.039504000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.039504000 Z zone: *1 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.299957',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-09-17 05:08:57.301850"]] 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.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: 2022-09-17 05:08:57.039504000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.039504000 Z zone: *1 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.304983',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-09-17 05:08:57.307320"]] 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-09-17 05:08:57.039504000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.039504000 Z zone: *1 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.309967',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.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.2ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:08:57.336647"], ["updated_at", "2022-09-17 05:08:57.336647"]] 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-09-17 05:08:57.340450"], ["updated_at", "2022-09-17 05:08:57.340450"]] 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-09-17 05:08:57.342492"]] 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-09-17 05:08:57.336647000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.336647000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:08:57.336647000 Z ','2022-09-17 05:08:57.345905',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.340450000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.340450000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.340450000 Z zone: *1 time: 2022-09-17 05:08:57.340450000 Z ','2022-09-17 05:08:57.345905','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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.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.2ms) 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.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-09-17 05:08:57.368024"], ["updated_at", "2022-09-17 05:08:57.368024"]] 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-09-17 05:08:57.370995"]] 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-09-17 05:08:57.368024000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.368024000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:08:57.368024000 Z ','2022-09-17 05:08:57.372355',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-09-17 05:08:57.373109"], ["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.3ms) 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 ------------------------------------ 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.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.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.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.2ms) 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.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ 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.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-09-17 05:08:57.394402"], ["updated_at", "2022-09-17 05:08:57.394402"]] 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-09-17 05:08:57.397923"]] 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-09-17 05:08:57.039504000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.039504000 Z zone: *1 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.401262',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.394402000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.394402000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.394402000 Z zone: *1 time: 2022-09-17 05:08:57.394402000 Z ','2022-09-17 05:08:57.401262','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-09-18 05:08:57.402353"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:08:57.402796"], ["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-09-17 05:08:57.404032"], ["updated_at", "2022-09-17 05:08:57.404032"]] 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-09-17 05:08:57.404806"], ["updated_at", "2022-09-17 05:08:57.404806"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] Post Load (0.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-09-17 05:08:57.039504"], ["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-09-17 05:08:57.394402"], ["updated_at", "2022-09-17 05:08:57.394402"]] 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" 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.4ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_argument --------------------------------------------------- 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-09-17 05:08:57.423804"], ["updated_at", "2022-09-17 05:08:57.423804"]] 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-09-17 05:08:57.427092"]] 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.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) 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-09-17 05:08:57.039504000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.039504000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.039504000 Z zone: *1 time: 2022-09-17 05:08:57.039504000 Z ','2022-09-17 05:08:57.431013',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.423804000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:08:57.423804000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:08:57.423804000 Z zone: *1 time: 2022-09-17 05:08:57.423804000 Z ','2022-09-17 05:08:57.431013','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" TRANSACTION (0.5ms) 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.7ms) 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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:09:36.392383"], ["updated_at", "2022-09-17 05:09:36.392383"]] 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-09-17 05:09:36.407049"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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-09-17 05:09:36.392383000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.428442',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", "2022-09-17 05:09:36.432969"]] 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-09-17 05:09:36.392383000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.436865',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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.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-09-17 05:09:36.485692"], ["updated_at", "2022-09-17 05:09:36.485692"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:09:36.488886"]] 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-09-17 05:09:36.392383000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.392383000 Z zone: *1 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.492213',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.485692000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.485692000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.485692000 Z zone: *1 time: 2022-09-17 05:09:36.485692000 Z ','2022-09-17 05:09:36.492213','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-09-18 05:09:36.493321"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:09:36.493838"], ["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.3ms) 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-09-17 05:09:36.494887"], ["updated_at", "2022-09-17 05:09:36.494887"]] 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-09-17 05:09:36.496046"], ["updated_at", "2022-09-17 05:09:36.496046"]] 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.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", "2022-09-17 05:09:36.392383"], ["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-09-17 05:09:36.485692"], ["updated_at", "2022-09-17 05:09:36.485692"]] 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" 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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_argument --------------------------------------------------- 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-09-17 05:09:36.510588"], ["updated_at", "2022-09-17 05:09:36.510588"]] 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-09-17 05:09:36.513262"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.392383000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.392383000 Z zone: *1 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.517752',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.510588000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.510588000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.510588000 Z zone: *1 time: 2022-09-17 05:09:36.510588000 Z ','2022-09-17 05:09:36.517752','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" 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 --------------------------- 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_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_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 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.3ms) 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 -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-17 05:09:36.544725"], ["updated_at", "2022-09-17 05:09:36.544725"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-17 05:09:36.546444"], ["updated_at", "2022-09-17 05:09:36.546444"]] 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", "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-09-17 05:09:36.549494"]] 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-09-17 05:09:36.544725000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.544725000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:09:36.544725000 Z ','2022-09-17 05:09:36.553570',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.546444000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.546444000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.546444000 Z zone: *1 time: 2022-09-17 05:09:36.546444000 Z ','2022-09-17 05:09:36.553570','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_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-09-17 05:09:36.561014"], ["updated_at", "2022-09-17 05:09:36.561014"]] 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-09-17 05:09:36.564116"]] 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-09-17 05:09:36.561014000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.561014000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:09:36.561014000 Z ','2022-09-17 05:09:36.566481',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-09-17 05:09:36.567727"], ["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_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 ------------------------------------------------ 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 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-09-17 05:09:36.580993"]] 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-09-17 05:09:36.392383000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.392383000 Z zone: *1 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.584439',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-09-17 05:09:36.586188"]] 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-09-17 05:09:36.392383000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.392383000 Z zone: *1 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.588704',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-09-17 05:09:36.590531"]] 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-09-17 05:09:36.392383000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:09:36.392383000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:09:36.392383000 Z zone: *1 time: 2022-09-17 05:09:36.392383000 Z ','2022-09-17 05:09:36.593817',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]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.4ms) 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 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.3ms) 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_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  (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.7ms) 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.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", "2022-09-17 05:23:10.462325"], ["updated_at", "2022-09-17 05:23:10.462325"]] 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-09-17 05:23:10.477645"]] TRANSACTION (0.9ms) commit transaction Post Load (0.2ms) 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-09-17 05:23:10.462325000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.462325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:10.462325000 Z ','2022-09-17 05:23:10.510411',NULL) TRANSACTION (0.6ms) 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.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-09-17 05:23:10.514788"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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-09-17 05:23:10.462325000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.462325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:10.462325000 Z ','2022-09-17 05:23:10.519882',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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.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-09-17 05:23:10.558317"], ["updated_at", "2022-09-17 05:23:10.558317"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:23:10.561439"]] 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.3ms) 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-09-17 05:23:10.462325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.462325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.462325000 Z zone: *1 time: 2022-09-17 05:23:10.462325000 Z ','2022-09-17 05:23:10.564842',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.558317000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.558317000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.558317000 Z zone: *1 time: 2022-09-17 05:23:10.558317000 Z ','2022-09-17 05:23:10.564842','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-09-18 05:23:10.565936"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:23:10.566385"], ["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-09-17 05:23:10.567632"], ["updated_at", "2022-09-17 05:23:10.567632"]] 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-09-17 05:23:10.568486"], ["updated_at", "2022-09-17 05:23:10.568486"]] TRANSACTION (0.1ms) 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.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.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-09-17 05:23:10.462325"], ["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-09-17 05:23:10.558317"], ["updated_at", "2022-09-17 05:23:10.558317"]] 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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_argument --------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------------ 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.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 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-09-17 05:23:10.620662"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:10.462325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.462325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.462325000 Z zone: *1 time: 2022-09-17 05:23:10.462325000 Z ','2022-09-17 05:23:10.623697',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:10.625405"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:10.462325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.462325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.462325000 Z zone: *1 time: 2022-09-17 05:23:10.462325000 Z ','2022-09-17 05:23:10.627844',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:10.629284"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) SAVEPOINT active_record_2 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-09-17 05:23:10.462325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.462325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.462325000 Z zone: *1 time: 2022-09-17 05:23:10.462325000 Z ','2022-09-17 05:23:10.639456',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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_2 TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------ 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_2 Post Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------- 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------- 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------------------------- SnapshotTest: test_single_model_snapshots_without_children ---------------------------------------------------------- TRANSACTION (0.1ms) SAVEPOINT active_record_2 ParentWithoutChildren Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:23:10.677659"], ["updated_at", "2022-09-17 05:23:10.677659"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:10.680565"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:10.677659000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.677659000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:10.677659000 Z ','2022-09-17 05:23:10.682043',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-17 05:23:10.682777"], ["id", 2]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_with_sti_class ----------------------------------------------------- TRANSACTION (0.0ms) SAVEPOINT active_record_2 SubPost Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:23:10.690477"], ["updated_at", "2022-09-17 05:23:10.690477"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-09-17 05:23:10.691886"], ["updated_at", "2022-09-17 05:23:10.691886"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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.7ms) 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-09-17 05:23:10.693761"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:10.690477000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.690477000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:10.690477000 Z ','2022-09-17 05:23:10.697514',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.691886000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:10.691886000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:10.691886000 Z zone: *1 time: 2022-09-17 05:23:10.691886000 Z ','2022-09-17 05:23:10.697514','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_2 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.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------ SnapshotTest: test_validations ------------------------------ 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::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 TO SAVEPOINT active_record_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.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.8ms) 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.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:23:47.097699"], ["updated_at", "2022-09-17 05:23:47.097699"]] 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-09-17 05:23:47.113252"]] TRANSACTION (0.7ms) commit transaction Post Load (0.5ms) 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-09-17 05:23:47.097699000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.097699000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:47.097699000 Z ','2022-09-17 05:23:47.145291',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-09-17 05:23:47.149734"]] TRANSACTION (0.6ms) commit transaction Post Load (0.2ms) 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.4ms) 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-09-17 05:23:47.097699000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.097699000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:47.097699000 Z ','2022-09-17 05:23:47.154998',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.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.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.2ms) 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_argument --------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:23:47.241601"], ["updated_at", "2022-09-17 05:23:47.241601"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:47.244815"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:47.097699000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.097699000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.097699000 Z zone: *1 time: 2022-09-17 05:23:47.097699000 Z ','2022-09-17 05:23:47.248111',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.241601000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.241601000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.241601000 Z zone: *1 time: 2022-09-17 05:23:47.241601000 Z ','2022-09-17 05:23:47.248111','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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-09-18 05:23:47.249254"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:23:47.249719"], ["id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:23:47.250760"], ["updated_at", "2022-09-17 05:23:47.250760"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-09-17 05:23:47.251553"], ["updated_at", "2022-09-17 05:23:47.251553"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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.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-09-17 05:23:47.097699"], ["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-09-17 05:23:47.241601"], ["updated_at", "2022-09-17 05:23:47.241601"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------------ 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.3ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 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.1ms) 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-09-17 05:23:47.286944"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:47.097699000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.097699000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.097699000 Z zone: *1 time: 2022-09-17 05:23:47.097699000 Z ','2022-09-17 05:23:47.290395',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:47.292096"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:47.097699000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.097699000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.097699000 Z zone: *1 time: 2022-09-17 05:23:47.097699000 Z ','2022-09-17 05:23:47.294641',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:47.296098"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) SAVEPOINT active_record_2 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-09-17 05:23:47.097699000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.097699000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.097699000 Z zone: *1 time: 2022-09-17 05:23:47.097699000 Z ','2022-09-17 05:23:47.298592',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.1ms) SAVEPOINT active_record_2 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_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_2 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]] 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.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------ SnapshotTest: test_validations ------------------------------ 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::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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_with_sti_class ----------------------------------------------------- TRANSACTION (0.0ms) SAVEPOINT active_record_2 SubPost Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:23:47.322082"], ["updated_at", "2022-09-17 05:23:47.322082"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-09-17 05:23:47.323416"], ["updated_at", "2022-09-17 05:23:47.323416"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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.4ms) 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-09-17 05:23:47.325265"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:23:47.322082000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.322082000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:47.322082000 Z ','2022-09-17 05:23:47.328992',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.323416000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.323416000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:23:47.323416000 Z zone: *1 time: 2022-09-17 05:23:47.323416000 Z ','2022-09-17 05:23:47.328992','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------- SnapshotTest: test_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ---------------------------------------------------------- SnapshotTest: test_single_model_snapshots_without_children ---------------------------------------------------------- TRANSACTION (0.1ms) SAVEPOINT active_record_2 ParentWithoutChildren Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:23:47.340339"], ["updated_at", "2022-09-17 05:23:47.340339"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:47.343135"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:23:47.340339000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:23:47.340339000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:23:47.340339000 Z ','2022-09-17 05:23:47.344629',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-17 05:23:47.345396"], ["id", 2]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) ROLLBACK TO SAVEPOINT active_record_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.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';  (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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:24:59.612484"], ["updated_at", "2022-09-17 05:24:59.612484"]] 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-09-17 05:24:59.627619"]] TRANSACTION (0.7ms) commit transaction Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.2ms) 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-09-17 05:24:59.612484000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.612484000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:24:59.612484000 Z ','2022-09-17 05:24:59.660125',NULL) TRANSACTION (0.8ms) 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-09-17 05:24:59.664761"]] 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-09-17 05:24:59.612484000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.612484000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:24:59.612484000 Z ','2022-09-17 05:24:59.668529',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_argument --------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:24:59.737549"], ["updated_at", "2022-09-17 05:24:59.737549"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:24:59.740392"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:24:59.612484000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.612484000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.612484000 Z zone: *1 time: 2022-09-17 05:24:59.612484000 Z ','2022-09-17 05:24:59.743789',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.737549000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.737549000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.737549000 Z zone: *1 time: 2022-09-17 05:24:59.737549000 Z ','2022-09-17 05:24:59.743789','comments') TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_2 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-09-18 05:24:59.745400"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:24:59.745917"], ["id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:24:59.746986"], ["updated_at", "2022-09-17 05:24:59.746986"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-09-17 05:24:59.747763"], ["updated_at", "2022-09-17 05:24:59.747763"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" TRANSACTION (0.1ms) SAVEPOINT active_record_2 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.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-09-17 05:24:59.612484"], ["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-09-17 05:24:59.737549"], ["updated_at", "2022-09-17 05:24:59.737549"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------- 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------- 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.0ms) 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.0ms) SAVEPOINT active_record_2 Post Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------- SnapshotTest: test_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------ 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_2 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.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_with_sti_class ----------------------------------------------------- TRANSACTION (0.1ms) SAVEPOINT active_record_2 SubPost Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:24:59.811744"], ["updated_at", "2022-09-17 05:24:59.811744"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.1ms) SAVEPOINT active_record_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-09-17 05:24:59.813640"], ["updated_at", "2022-09-17 05:24:59.813640"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:24:59.816563"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 ActiveSnapshot::SnapshotItem Create Many (0.4ms) 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-09-17 05:24:59.811744000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.811744000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:24:59.811744000 Z ','2022-09-17 05:24:59.819973',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.813640000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.813640000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.813640000 Z zone: *1 time: 2022-09-17 05:24:59.813640000 Z ','2022-09-17 05:24:59.819973','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------------------------- SnapshotTest: test_single_model_snapshots_without_children ---------------------------------------------------------- TRANSACTION (0.1ms) SAVEPOINT active_record_2 ParentWithoutChildren Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:24:59.828379"], ["updated_at", "2022-09-17 05:24:59.828379"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.1ms) SAVEPOINT active_record_2 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-09-17 05:24:59.832112"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:24:59.828379000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.828379000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:24:59.828379000 Z ','2022-09-17 05:24:59.834827',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-17 05:24:59.835884"], ["id", 2]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 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.1ms) 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-09-17 05:24:59.841039"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:24:59.612484000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.612484000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.612484000 Z zone: *1 time: 2022-09-17 05:24:59.612484000 Z ','2022-09-17 05:24:59.843730',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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.2ms) 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-09-17 05:24:59.845990"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:24:59.612484000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.612484000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.612484000 Z zone: *1 time: 2022-09-17 05:24:59.612484000 Z ','2022-09-17 05:24:59.848840',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:24:59.850585"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:24:59.612484000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:24:59.612484000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:24:59.612484000 Z zone: *1 time: 2022-09-17 05:24:59.612484000 Z ','2022-09-17 05:24:59.853089',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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_2 TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------------ 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.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_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.6ms) DELETE FROM posts;  (0.9ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:28:29.092371"], ["updated_at", "2022-09-17 05:28:29.092371"]] 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-09-17 05:28:29.107628"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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-09-17 05:28:29.092371000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.139626',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", "2022-09-17 05:28:29.144149"]] TRANSACTION (0.6ms) commit transaction Post Load (0.2ms) 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-09-17 05:28:29.092371000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.149310',NULL) TRANSACTION (0.8ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- 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.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-09-17 05:28:29.188601"], ["updated_at", "2022-09-17 05:28:29.188601"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "2022-09-17 05:28:29.191619"]] 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.3ms) 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-09-17 05:28:29.092371000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.092371000 Z zone: *1 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.194876',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.188601000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.188601000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.188601000 Z zone: *1 time: 2022-09-17 05:28:29.188601000 Z ','2022-09-17 05:28:29.194876','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-18 05:28:29.196053"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:28:29.196549"], ["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-09-17 05:28:29.197949"], ["updated_at", "2022-09-17 05:28:29.197949"]] 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-09-17 05:28:29.199307"], ["updated_at", "2022-09-17 05:28:29.199307"]] 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.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.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-09-17 05:28:29.092371"], ["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-09-17 05:28:29.188601"], ["updated_at", "2022-09-17 05:28:29.188601"]] 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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_identifier_argument -------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:28:29.225547"]] 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-09-17 05:28:29.092371000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.092371000 Z zone: *1 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.229056',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" 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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) 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.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_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-09-17 05:28:29.252672"], ["updated_at", "2022-09-17 05:28:29.252672"]] 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-09-17 05:28:29.254186"], ["updated_at", "2022-09-17 05:28:29.254186"]] 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-09-17 05:28:29.256316"]] 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-09-17 05:28:29.252672000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.252672000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:29.252672000 Z ','2022-09-17 05:28:29.259739',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.254186000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.254186000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.254186000 Z zone: *1 time: 2022-09-17 05:28:29.254186000 Z ','2022-09-17 05:28:29.259739','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.3ms) 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.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]] ActiveSnapshot::SnapshotItem Load (0.1ms) 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 ------------------------------ 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.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 05:28:29.288655"], ["updated_at", "2022-09-17 05:28:29.288655"]] 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-09-17 05:28:29.291587"]] 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-09-17 05:28:29.288655000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.288655000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:29.288655000 Z ','2022-09-17 05:28:29.293054',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ParentWithoutChildren Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-17 05:28:29.294080"], ["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_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_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", "2022-09-17 05:28:29.302489"]] 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-09-17 05:28:29.092371000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.092371000 Z zone: *1 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.305623',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-09-17 05:28:29.307254"]] 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-09-17 05:28:29.092371000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.092371000 Z zone: *1 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.310276',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-09-17 05:28:29.311980"]] 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-09-17 05:28:29.092371000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:29.092371000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:29.092371000 Z zone: *1 time: 2022-09-17 05:28:29.092371000 Z ','2022-09-17 05:28:29.314593',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.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 ------------------------------------ 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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 ----------------------------- 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  (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]]  (6.7ms) 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", "2022-09-17 05:28:54.872646"], ["updated_at", "2022-09-17 05:28:54.872646"]] 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-09-17 05:28:54.887794"]] TRANSACTION (0.6ms) commit transaction Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.2ms) 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.4ms) 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-09-17 05:28:54.872646000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:54.919223',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", "2022-09-17 05:28:54.923786"]] 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.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 2022-09-17 05:28:54.872646000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:54.927659',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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- SnapshotsConcernTest: test_create_snapshot! ------------------------------------------- Post Load (0.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 (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-09-17 05:28:54.980522"]] 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-09-17 05:28:54.872646000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:54.872646000 Z zone: *1 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:54.983733',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-09-17 05:28:54.985402"]] 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.3ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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: 2022-09-17 05:28:54.872646000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:54.872646000 Z zone: *1 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:54.988956',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-09-17 05:28:54.991571"]] 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-09-17 05:28:54.872646000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:54.872646000 Z zone: *1 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:54.995028',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 ------------------------------ 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 -------------------------------------- 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 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-09-17 05:28:55.016141"], ["updated_at", "2022-09-17 05:28:55.016141"]] 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-09-17 05:28:55.019697"], ["updated_at", "2022-09-17 05:28:55.019697"]] 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-09-17 05:28:55.022068"]] 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.4ms) 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-09-17 05:28:55.016141000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:55.016141000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:55.016141000 Z ','2022-09-17 05:28:55.026885',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:55.019697000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:55.019697000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:55.019697000 Z zone: *1 time: 2022-09-17 05:28:55.019697000 Z ','2022-09-17 05:28:55.026885','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.4ms) 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-09-17 05:28:55.034579"], ["updated_at", "2022-09-17 05:28:55.034579"]] 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-09-17 05:28:55.037562"]] 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-09-17 05:28:55.034579000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:55.034579000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:28:55.034579000 Z ','2022-09-17 05:28:55.038933',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-09-17 05:28:55.039699"], ["id", 2]] TRANSACTION (0.2ms) 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.3ms) 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.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------- ActiveSnapshotTest: test_legacy_positional_identifier_argument -------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.3ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:28:55.068814"]] 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-09-17 05:28:54.872646000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:54.872646000 Z zone: *1 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:55.072017',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_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-09-17 05:28:55.075234"], ["updated_at", "2022-09-17 05:28:55.075234"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:28:55.077583"]] 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-09-17 05:28:54.872646000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:54.872646000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:54.872646000 Z zone: *1 time: 2022-09-17 05:28:54.872646000 Z ','2022-09-17 05:28:55.080916',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:55.075234000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:28:55.075234000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:28:55.075234000 Z zone: *1 time: 2022-09-17 05:28:55.075234000 Z ','2022-09-17 05:28:55.080916','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-09-18 05:28:55.082198"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:28:55.082757"], ["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-09-17 05:28:55.084093"], ["updated_at", "2022-09-17 05:28:55.084093"]] 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-09-17 05:28:55.084882"], ["updated_at", "2022-09-17 05:28:55.084882"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:28:54.872646"], ["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-09-17 05:28:55.075234"], ["updated_at", "2022-09-17 05:28:55.075234"]] 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]] 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- 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.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.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.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  (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.8ms) DELETE FROM snapshot_items;  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:30:46.420988"], ["updated_at", "2022-09-17 05:30:46.420988"]] 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-09-17 05:30:46.436096"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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.4ms) 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-09-17 05:30:46.420988000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.468090',NULL) TRANSACTION (0.6ms) 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.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-09-17 05:30:46.472867"]] 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-09-17 05:30:46.420988000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.477347',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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.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.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", "Foobar"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.2ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ 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.4ms) 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-09-17 05:30:46.536876"], ["updated_at", "2022-09-17 05:30:46.536876"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "2022-09-17 05:30:46.539727"]] 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.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: 2022-09-17 05:30:46.420988000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.420988000 Z zone: *1 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.543158',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.536876000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.536876000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.536876000 Z zone: *1 time: 2022-09-17 05:30:46.536876000 Z ','2022-09-17 05:30:46.543158','comments') 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" Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:30:46.544842"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:30:46.545550"], ["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.1ms) 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-09-17 05:30:46.547125"], ["updated_at", "2022-09-17 05:30:46.547125"]] 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-09-17 05:30:46.548334"], ["updated_at", "2022-09-17 05:30:46.548334"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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", "2022-09-17 05:30:46.420988"], ["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-09-17 05:30:46.536876"], ["updated_at", "2022-09-17 05:30:46.536876"]] 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" 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.3ms) 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.4ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:30:46.571946"]] 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-09-17 05:30:46.420988000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.420988000 Z zone: *1 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.575061',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) 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", "2022-09-17 05:30:46.583533"]] 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-09-17 05:30:46.420988000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.420988000 Z zone: *1 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.587101',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-09-17 05:30:46.588708"]] 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-09-17 05:30:46.420988000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.420988000 Z zone: *1 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.591124',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-09-17 05:30:46.592480"]] 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.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: 2022-09-17 05:30:46.420988000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.420988000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.420988000 Z zone: *1 time: 2022-09-17 05:30:46.420988000 Z ','2022-09-17 05:30:46.594709',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 ------------------------------------------------ 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 -------------------------------- SnapshotTest: test_relationships -------------------------------- 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------- SnapshotTest: test_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_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_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.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 ---------------------------------------------------------- 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-09-17 05:30:46.631195"], ["updated_at", "2022-09-17 05:30:46.631195"]] 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-09-17 05:30:46.634286"]] 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-09-17 05:30:46.631195000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.631195000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:30:46.631195000 Z ','2022-09-17 05:30:46.635787',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-09-17 05:30:46.636798"], ["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.3ms) 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-09-17 05:30:46.643859"], ["updated_at", "2022-09-17 05:30:46.643859"]] 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-09-17 05:30:46.646460"], ["updated_at", "2022-09-17 05:30:46.646460"]] 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-09-17 05:30:46.649551"]] 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-09-17 05:30:46.643859000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.643859000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:30:46.643859000 Z ','2022-09-17 05:30:46.653736',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.646460000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:30:46.646460000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:30:46.646460000 Z zone: *1 time: 2022-09-17 05:30:46.646460000 Z ','2022-09-17 05:30:46.653736','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 ----------------------------------------------- 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.7ms) DELETE FROM posts;  (0.9ms) 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.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", "2022-09-17 05:32:21.990929"], ["updated_at", "2022-09-17 05:32:21.990929"]] 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-09-17 05:32:22.006721"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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-09-17 05:32:21.990929000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.036450',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.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-09-17 05:32:22.041095"]] 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.1ms) begin transaction ActiveSnapshot::SnapshotItem Create Many (0.5ms) 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-09-17 05:32:21.990929000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.044775',NULL) TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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_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_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.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_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_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.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_single_model_snapshots_without_children ---------------------------------------------------------- TRANSACTION (9.9ms) 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-09-17 05:32:22.141435"], ["updated_at", "2022-09-17 05:32:22.141435"]] 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-09-17 05:32:22.171423"]] 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-09-17 05:32:22.141435000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:22.141435000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:32:22.141435000 Z ','2022-09-17 05:32:22.173512',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-09-17 05:32:22.174404"], ["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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] 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_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_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-09-17 05:32:22.189337"], ["updated_at", "2022-09-17 05:32:22.189337"]] 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-09-17 05:32:22.193487"], ["updated_at", "2022-09-17 05:32:22.193487"]] 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-09-17 05:32:22.195838"]] 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-09-17 05:32:22.189337000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:22.189337000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:32:22.189337000 Z ','2022-09-17 05:32:22.201099',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:22.193487000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:22.193487000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:22.193487000 Z zone: *1 time: 2022-09-17 05:32:22.193487000 Z ','2022-09-17 05:32:22.201099','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 ---------------------------------------- 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 ------------------------------------------- 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-09-17 05:32:22.207949"], ["updated_at", "2022-09-17 05:32:22.207949"]] 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.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", "2022-09-17 05:32:22.210663"]] 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-09-17 05:32:21.990929000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:21.990929000 Z zone: *1 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.213934',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:22.207949000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:22.207949000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:22.207949000 Z zone: *1 time: 2022-09-17 05:32:22.207949000 Z ','2022-09-17 05:32:22.213934','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-09-18 05:32:22.215046"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:32:22.215523"], ["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-09-17 05:32:22.217066"], ["updated_at", "2022-09-17 05:32:22.217066"]] 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-09-17 05:32:22.217855"], ["updated_at", "2022-09-17 05:32:22.217855"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) 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.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.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", "2022-09-17 05:32:21.990929"], ["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-09-17 05:32:22.207949"], ["updated_at", "2022-09-17 05:32:22.207949"]] TRANSACTION (0.1ms) 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.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.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.4ms) 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", "2022-09-17 05:32:22.231684"]] 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-09-17 05:32:21.990929000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:21.990929000 Z zone: *1 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.234463',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-09-17 05:32:22.235913"]] 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-09-17 05:32:21.990929000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:21.990929000 Z zone: *1 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.238248',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.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-09-17 05:32:22.240172"]] 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: 2022-09-17 05:32:21.990929000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:21.990929000 Z zone: *1 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.243782',NULL) 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", "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_relationships ---------------------------------------- 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:32:22.265609"]] 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-09-17 05:32:21.990929000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:32:21.990929000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:32:21.990929000 Z zone: *1 time: 2022-09-17 05:32:21.990929000 Z ','2022-09-17 05:32:22.268707',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]]  (6.5ms) 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.8ms) DELETE FROM snapshot_items;  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:33:27.499623"], ["updated_at", "2022-09-17 05:33:27.499623"]] 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.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-09-17 05:33:27.516688"]] 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-09-17 05:33:27.499623000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.545352',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-09-17 05:33:27.549945"]] 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-09-17 05:33:27.499623000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.553574',NULL) TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-17 05:33:27.591268"], ["updated_at", "2022-09-17 05:33:27.591268"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:33:27.594114"]] 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-09-17 05:33:27.499623000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.499623000 Z zone: *1 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.597361',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.591268000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.591268000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.591268000 Z zone: *1 time: 2022-09-17 05:33:27.591268000 Z ','2022-09-17 05:33:27.597361','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-09-18 05:33:27.598480"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:33:27.599185"], ["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", "2022-09-17 05:33:27.600221"], ["updated_at", "2022-09-17 05:33:27.600221"]] 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-09-17 05:33:27.600994"], ["updated_at", "2022-09-17 05:33:27.600994"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) 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-09-17 05:33:27.499623"], ["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-09-17 05:33:27.591268"], ["updated_at", "2022-09-17 05:33:27.591268"]] 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" 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.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.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 ---------------------------------------------------------- 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-09-17 05:33:27.656632"], ["updated_at", "2022-09-17 05:33:27.656632"]] 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", "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-09-17 05:33:27.675660"]] 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-09-17 05:33:27.656632000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.656632000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:33:27.656632000 Z ','2022-09-17 05:33:27.677217',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-09-17 05:33:27.678010"], ["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_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-09-17 05:33:27.684038"], ["updated_at", "2022-09-17 05:33:27.684038"]] 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-09-17 05:33:27.685618"], ["updated_at", "2022-09-17 05:33:27.685618"]] 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", "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-09-17 05:33:27.688043"]] 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.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-09-17 05:33:27.684038000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.684038000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:33:27.684038000 Z ','2022-09-17 05:33:27.692842',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.685618000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.685618000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.685618000 Z zone: *1 time: 2022-09-17 05:33:27.685618000 Z ','2022-09-17 05:33:27.692842','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_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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 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.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.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_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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]] 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", "2022-09-17 05:33:27.727855"]] 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,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.499623000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.499623000 Z zone: *1 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.731406',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-09-17 05:33:27.733226"]] 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-09-17 05:33:27.499623000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.499623000 Z zone: *1 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.735687',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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", "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-09-17 05:33:27.737728"]] 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: 2022-09-17 05:33:27.499623000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.499623000 Z zone: *1 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.741852',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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.3ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:33:27.759999"]] 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: 2022-09-17 05:33:27.499623000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:33:27.499623000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:33:27.499623000 Z zone: *1 time: 2022-09-17 05:33:27.499623000 Z ','2022-09-17 05:33:27.763157',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Update (0.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  (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.8ms) DELETE FROM posts;  (0.9ms) 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.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.1ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:36:19.977212"], ["updated_at", "2022-09-17 05:36:19.977212"]] 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-09-17 05:36:19.992714"]] 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-09-17 05:36:19.977212000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:19.977212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:19.977212000 Z ','2022-09-17 05:36:20.020305',NULL) TRANSACTION (0.6ms) commit transaction Post Update (0.7ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] TRANSACTION (0.4ms) 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-09-17 05:36:20.024750"]] 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.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: &1 2022-09-17 05:36:19.977212000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:19.977212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:19.977212000 Z ','2022-09-17 05:36:20.028199',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- 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-09-17 05:36:20.068793"], ["updated_at", "2022-09-17 05:36:20.068793"]] 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.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-09-17 05:36:20.071533"]] 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-09-17 05:36:20.068793000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:20.068793000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:20.068793000 Z ','2022-09-17 05:36:20.072849',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-09-17 05:36:20.073624"], ["id", 2]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Load (0.3ms) 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.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_with_sti_class ----------------------------------------------------- TRANSACTION (0.2ms) 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-09-17 05:36:20.079980"], ["updated_at", "2022-09-17 05:36:20.079980"]] 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-09-17 05:36:20.085014"], ["updated_at", "2022-09-17 05:36:20.085014"]] 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-09-17 05:36:20.087344"]] 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: &1 2022-09-17 05:36:20.079980000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:20.079980000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:20.079980000 Z ','2022-09-17 05:36:20.090948',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:20.085014000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:20.085014000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:20.085014000 Z zone: *1 time: 2022-09-17 05:36:20.085014000 Z ','2022-09-17 05:36:20.090948','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.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_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.1ms) RELEASE SAVEPOINT active_record_1 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]] 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:36:20.181232"]] 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-09-17 05:36:19.977212000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:19.977212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:19.977212000 Z zone: *1 time: 2022-09-17 05:36:19.977212000 Z ','2022-09-17 05:36:20.185138',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 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.1ms) 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-09-17 05:36:20.188445"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:36:19.977212000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:19.977212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:19.977212000 Z zone: *1 time: 2022-09-17 05:36:19.977212000 Z ','2022-09-17 05:36:20.190868',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:36:20.193088"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_2 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_2 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-09-17 05:36:19.977212000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:19.977212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:19.977212000 Z zone: *1 time: 2022-09-17 05:36:19.977212000 Z ','2022-09-17 05:36:20.195932',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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-09-17 05:36:20.197375"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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,6,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:19.977212000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:19.977212000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:19.977212000 Z zone: *1 time: 2022-09-17 05:36:19.977212000 Z ','2022-09-17 05:36:20.199653',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) SAVEPOINT active_record_2 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_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------------ 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.0ms) 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.0ms) 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_2 Post Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------- 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 TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ------------------------------------------- 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_2 Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:36:20.228257"], ["updated_at", "2022-09-17 05:36:20.228257"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_2 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_2 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]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_2 ActiveSnapshotTest - test_snapshot_lifecycle: ActiveRecord::RecordInvalid raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. ActiveSnapshotTest - test_snapshot_lifecycle: ActiveRecord::RecordInvalid raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (1.1ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.2ms) 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.3ms) 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.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", "2022-09-17 05:36:33.566222"], ["updated_at", "2022-09-17 05:36:33.566222"]] TRANSACTION (0.9ms) 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", "2022-09-17 05:36:33.583053"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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-09-17 05:36:33.566222000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.612234',NULL) TRANSACTION (0.6ms) 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.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-09-17 05:36:33.617143"]] 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.4ms) 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-09-17 05:36:33.566222000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.621074',NULL) TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:36:33.672777"]] 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.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,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.566222000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.566222000 Z zone: *1 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.677277',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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-09-17 05:36:33.684546"]] 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-09-17 05:36:33.566222000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.566222000 Z zone: *1 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.688831',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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-09-17 05:36:33.691054"]] 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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: 2022-09-17 05:36:33.566222000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.566222000 Z zone: *1 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.721519',NULL) 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", "foobar 3"], ["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", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:36:33.743467"]] 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.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) 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-09-17 05:36:33.566222000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.566222000 Z zone: *1 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.754369',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) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.3ms) 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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.2ms) 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.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_relationships -------------------------------- TRANSACTION (0.0ms) 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_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-09-17 05:36:33.788087"], ["updated_at", "2022-09-17 05:36:33.788087"]] TRANSACTION (0.0ms) 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-09-17 05:36:33.793047"], ["updated_at", "2022-09-17 05:36:33.793047"]] 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-09-17 05:36:33.796014"]] 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: &1 2022-09-17 05:36:33.788087000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.788087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:33.788087000 Z ','2022-09-17 05:36:33.800357',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.793047000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.793047000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.793047000 Z zone: *1 time: 2022-09-17 05:36:33.793047000 Z ','2022-09-17 05:36:33.800357','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.4ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------- 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-09-17 05:36:33.809424"], ["updated_at", "2022-09-17 05:36:33.809424"]] 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-09-17 05:36:33.812894"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- id: 2 a: 1 b: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: &1 2022-09-17 05:36:33.809424000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.809424000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:36:33.809424000 Z ','2022-09-17 05:36:33.814634',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-09-17 05:36:33.815941"], ["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.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_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.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-09-17 05:36:33.830922"], ["updated_at", "2022-09-17 05:36:33.830922"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::SnapshotItem Count (0.2ms) 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-09-17 05:36:33.835675"]] 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.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: 2022-09-17 05:36:33.566222000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.566222000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.566222000 Z zone: *1 time: 2022-09-17 05:36:33.566222000 Z ','2022-09-17 05:36:33.839735',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.830922000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:36:33.830922000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:36:33.830922000 Z zone: *1 time: 2022-09-17 05:36:33.830922000 Z ','2022-09-17 05:36:33.839735','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:36:33.841598"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:36:33.842581"], ["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-09-17 05:36:33.844151"], ["updated_at", "2022-09-17 05:36:33.844151"]] 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", "2022-09-17 05:36:33.845484"], ["updated_at", "2022-09-17 05:36:33.845484"]] 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-09-17 05:36:33.566222"], ["id", 1]] Comment Create (0.2ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:36:33.830922"], ["updated_at", "2022-09-17 05:36:33.830922"]] 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.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.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.4ms) 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.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.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.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.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", "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.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.7ms) DELETE FROM posts;  (0.9ms) 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.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.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:38:05.037400"], ["updated_at", "2022-09-17 05:38:05.037400"]] TRANSACTION (0.7ms) commit transaction TRANSACTION (0.3ms) 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-09-17 05:38:05.052911"]] 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-09-17 05:38:05.037400000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.079514',NULL) TRANSACTION (0.6ms) 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.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-09-17 05:38:05.083880"]] 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.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 2022-09-17 05:38:05.037400000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.087699',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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:38:05.138691"]] 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,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: *1 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.142990',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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.3ms) rollback transaction TRANSACTION (0.1ms) 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", "2022-09-17 05:38:05.151596"]] 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.1ms) 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: 2022-09-17 05:38:05.037400000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: *1 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.162453',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 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-09-17 05:38:05.184040"]] 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.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) 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-09-17 05:38:05.037400000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: *1 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.213504',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-09-17 05:38:05.215243"]] 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-09-17 05:38:05.037400000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: *1 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.217815',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.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) 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_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-09-17 05:38:05.234389"], ["updated_at", "2022-09-17 05:38:05.234389"]] 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-09-17 05:38:05.237093"]] 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-09-17 05:38:05.234389000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.234389000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:05.234389000 Z ','2022-09-17 05:38:05.238738',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-09-17 05:38:05.239796"], ["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_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-09-17 05:38:05.246197"], ["updated_at", "2022-09-17 05:38:05.246197"]] 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-09-17 05:38:05.250004"], ["updated_at", "2022-09-17 05:38:05.250004"]] 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-09-17 05:38:05.252122"]] 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-09-17 05:38:05.246197000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.246197000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:05.246197000 Z ','2022-09-17 05:38:05.255607',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.250004000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.250004000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.250004000 Z zone: *1 time: 2022-09-17 05:38:05.250004000 Z ','2022-09-17 05:38:05.255607','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_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.2ms) 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.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.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.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.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_validations ---------------------------------- 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_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.3ms) 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-09-17 05:38:05.290794"], ["updated_at", "2022-09-17 05:38:05.290794"]] 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-09-17 05:38:05.293390"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.037400000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.037400000 Z zone: *1 time: 2022-09-17 05:38:05.037400000 Z ','2022-09-17 05:38:05.297688',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.290794000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:05.290794000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:05.290794000 Z zone: *1 time: 2022-09-17 05:38:05.290794000 Z ','2022-09-17 05:38:05.297688','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-09-18 05:38:05.299008"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:38:05.299662"], ["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-09-17 05:38:05.301102"], ["updated_at", "2022-09-17 05:38:05.301102"]] 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-09-17 05:38:05.302023"], ["updated_at", "2022-09-17 05:38:05.302023"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:38:05.037400"], ["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-09-17 05:38:05.290794"], ["updated_at", "2022-09-17 05:38:05.290794"]] 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" 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.4ms) 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  (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]]  (6.7ms) 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.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", "2022-09-17 05:38:11.062087"], ["updated_at", "2022-09-17 05:38:11.062087"]] 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-09-17 05:38:11.077276"]] 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-09-17 05:38:11.062087000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.104190',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-09-17 05:38:11.108785"]] 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-09-17 05:38:11.062087000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.112336',NULL) TRANSACTION (0.6ms) commit 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.0ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.1ms) 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.0ms) 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-09-17 05:38:11.168573"], ["updated_at", "2022-09-17 05:38:11.168573"]] 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-09-17 05:38:11.171915"]] 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.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: 2022-09-17 05:38:11.062087000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.062087000 Z zone: *1 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.181984',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.168573000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.168573000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.168573000 Z zone: *1 time: 2022-09-17 05:38:11.168573000 Z ','2022-09-17 05:38:11.181984','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:38:11.191108"], ["id", 1]] Post Update (8.9ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:38:11.191691"], ["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.1ms) 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-09-17 05:38:11.202082"], ["updated_at", "2022-09-17 05:38:11.202082"]] 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-09-17 05:38:11.211466"], ["updated_at", "2022-09-17 05:38:11.211466"]] TRANSACTION (0.1ms) 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.1ms) 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.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", "2022-09-17 05:38:11.062087"], ["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-09-17 05:38:11.168573"], ["updated_at", "2022-09-17 05:38:11.168573"]] 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" 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.2ms) 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 TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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]] 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", "2022-09-17 05:38:11.250657"]] 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-09-17 05:38:11.062087000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.062087000 Z zone: *1 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.253938',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-09-17 05:38:11.255646"]] 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-09-17 05:38:11.062087000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.062087000 Z zone: *1 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.258399',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-09-17 05:38:11.259856"]] 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.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: 2022-09-17 05:38:11.062087000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.062087000 Z zone: *1 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.262856',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 ------------------------------------------------ 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:38:11.284489"]] 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-09-17 05:38:11.062087000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.062087000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.062087000 Z zone: *1 time: 2022-09-17 05:38:11.062087000 Z ','2022-09-17 05:38:11.287701',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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_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_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-09-17 05:38:11.298574"], ["updated_at", "2022-09-17 05:38:11.298574"]] 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-09-17 05:38:11.300823"], ["updated_at", "2022-09-17 05:38:11.300823"]] 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-09-17 05:38:11.302942"]] 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-09-17 05:38:11.298574000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.298574000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:11.298574000 Z ','2022-09-17 05:38:11.306524',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.300823000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.300823000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:11.300823000 Z zone: *1 time: 2022-09-17 05:38:11.300823000 Z ','2022-09-17 05:38:11.306524','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_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- SnapshotTest: test_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-09-17 05:38:11.316794"], ["updated_at", "2022-09-17 05:38:11.316794"]] 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-09-17 05:38:11.319345"]] 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-09-17 05:38:11.316794000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:11.316794000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:11.316794000 Z ','2022-09-17 05:38:11.320739',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-09-17 05:38:11.321526"], ["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.3ms) 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_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.1ms) 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.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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  (1.4ms) 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.7ms) 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.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.1ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 05:38:17.547262"], ["updated_at", "2022-09-17 05:38:17.547262"]] 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-09-17 05:38:17.563467"]] 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-09-17 05:38:17.547262000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.583115',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", "2022-09-17 05:38:17.587487"]] 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-09-17 05:38:17.547262000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.591006',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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.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_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.1ms) rollback transaction TRANSACTION (0.0ms) 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.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-09-17 05:38:17.651604"]] 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,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: *1 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.654936',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-09-17 05:38:17.656860"]] 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,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: *1 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.660217',NULL) 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", "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-09-17 05:38:17.662506"]] 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-09-17 05:38:17.547262000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: *1 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.664961',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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:38:17.692559"]] 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.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: 2022-09-17 05:38:17.547262000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: *1 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.696878',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.1ms) 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.1ms) 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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-17 05:38:17.709862"], ["updated_at", "2022-09-17 05:38:17.709862"]] 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-09-17 05:38:17.713481"]] 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-09-17 05:38:17.547262000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.547262000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.547262000 Z zone: *1 time: 2022-09-17 05:38:17.547262000 Z ','2022-09-17 05:38:17.717167',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.709862000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.709862000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.709862000 Z zone: *1 time: 2022-09-17 05:38:17.709862000 Z ','2022-09-17 05:38:17.717167','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-09-18 05:38:17.718377"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:38:17.718864"], ["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-09-17 05:38:17.720264"], ["updated_at", "2022-09-17 05:38:17.720264"]] 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-09-17 05:38:17.721089"], ["updated_at", "2022-09-17 05:38:17.721089"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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-09-17 05:38:17.547262"], ["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-09-17 05:38:17.709862"], ["updated_at", "2022-09-17 05:38:17.709862"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::Snapshot Count (0.3ms) 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.4ms) 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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.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]] 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.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-17 05:38:17.750668"], ["updated_at", "2022-09-17 05:38:17.750668"]] 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-09-17 05:38:17.752210"], ["updated_at", "2022-09-17 05:38:17.752210"]] 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-09-17 05:38:17.753981"]] 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.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-09-17 05:38:17.750668000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.750668000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:17.750668000 Z ','2022-09-17 05:38:17.758649',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.752210000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.752210000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:17.752210000 Z zone: *1 time: 2022-09-17 05:38:17.752210000 Z ','2022-09-17 05:38:17.758649','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_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-09-17 05:38:17.765895"], ["updated_at", "2022-09-17 05:38:17.765895"]] 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.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-09-17 05:38:17.769025"]] TRANSACTION (0.1ms) 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-09-17 05:38:17.765895000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:17.765895000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:17.765895000 Z ','2022-09-17 05:38:17.782090',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-09-17 05:38:17.783463"], ["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.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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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]]  (6.6ms) DELETE FROM posts;  (0.9ms) 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.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", "2022-09-17 05:38:28.927860"], ["updated_at", "2022-09-17 05:38:28.927860"]] 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-09-17 05:38:28.942867"]] 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-09-17 05:38:28.927860000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:28.970173',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.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-09-17 05:38:28.974799"]] 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-09-17 05:38:28.927860000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:28.978336',NULL) TRANSACTION (1.0ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.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-09-17 05:38:29.024902"], ["updated_at", "2022-09-17 05:38:29.024902"]] 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.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-09-17 05:38:29.027385"]] 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-09-17 05:38:29.024902000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:29.024902000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:29.024902000 Z ','2022-09-17 05:38:29.029279',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-09-17 05:38:29.030781"], ["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_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-09-17 05:38:29.037525"], ["updated_at", "2022-09-17 05:38:29.037525"]] TRANSACTION (0.0ms) 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-09-17 05:38:29.041457"], ["updated_at", "2022-09-17 05:38:29.041457"]] 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", "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-09-17 05:38:29.061662"]] 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.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-09-17 05:38:29.037525000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:29.037525000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:29.037525000 Z ','2022-09-17 05:38:29.101430',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:29.041457000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:29.041457000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:29.041457000 Z zone: *1 time: 2022-09-17 05:38:29.041457000 Z ','2022-09-17 05:38:29.101430','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_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_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 ------------------------------ 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) 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.1ms) 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.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 -------------------------------------------- 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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 05:38:29.141286"], ["updated_at", "2022-09-17 05:38:29.141286"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) 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", "2022-09-17 05:38:29.144737"]] 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.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.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-09-17 05:38:28.927860000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: *1 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:29.149262',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:29.141286000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:29.141286000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:29.141286000 Z zone: *1 time: 2022-09-17 05:38:29.141286000 Z ','2022-09-17 05:38:29.149262','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-09-18 05:38:29.150630"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:38:29.151119"], ["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-09-17 05:38:29.152513"], ["updated_at", "2022-09-17 05:38:29.152513"]] 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-09-17 05:38:29.153457"], ["updated_at", "2022-09-17 05:38:29.153457"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.0ms) 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-09-17 05:38:28.927860"], ["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-09-17 05:38:29.141286"], ["updated_at", "2022-09-17 05:38:29.141286"]] 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" 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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- 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_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 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-09-17 05:38:29.173356"]] 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.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,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: *1 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:29.176452',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-09-17 05:38:29.178096"]] 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,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: *1 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:29.181522',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-09-17 05:38:29.183261"]] 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-09-17 05:38:28.927860000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: *1 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:29.185813',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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:38:29.201304"]] 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-09-17 05:38:28.927860000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:28.927860000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:28.927860000 Z zone: *1 time: 2022-09-17 05:38:28.927860000 Z ','2022-09-17 05:38:29.204585',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" 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]]  (6.7ms) DELETE FROM posts;  (1.2ms) 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';  (1.0ms) 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", "2022-09-17 05:38:51.694325"], ["updated_at", "2022-09-17 05:38:51.694325"]] 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-09-17 05:38:51.709322"]] 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]]  (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-09-17 05:38:51.694325000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.736074',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-09-17 05:38:51.740639"]] 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.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 2022-09-17 05:38:51.694325000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.744133',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.2ms) 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_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-09-17 05:38:51.790467"], ["updated_at", "2022-09-17 05:38:51.790467"]] 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-09-17 05:38:51.793970"], ["updated_at", "2022-09-17 05:38:51.793970"]] 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", "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-09-17 05:38:51.796929"]] 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-09-17 05:38:51.790467000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.790467000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:51.790467000 Z ','2022-09-17 05:38:51.801143',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.793970000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.793970000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.793970000 Z zone: *1 time: 2022-09-17 05:38:51.793970000 Z ','2022-09-17 05:38:51.801143','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.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.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.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.1ms) rollback transaction TRANSACTION (0.0ms) 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-09-17 05:38:51.867993"], ["updated_at", "2022-09-17 05:38:51.867993"]] 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-09-17 05:38:51.871148"]] 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-09-17 05:38:51.867993000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.867993000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 05:38:51.867993000 Z ','2022-09-17 05:38:51.872721',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-09-17 05:38:51.873505"], ["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_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 ------------------------------------ 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.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_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 ------------------------------------------- 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-09-17 05:38:51.901119"], ["updated_at", "2022-09-17 05:38:51.901119"]] 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.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", "2022-09-17 05:38:51.904002"]] 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-09-17 05:38:51.694325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.694325000 Z zone: *1 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.907268',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.901119000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.901119000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.901119000 Z zone: *1 time: 2022-09-17 05:38:51.901119000 Z ','2022-09-17 05:38:51.907268','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-09-18 05:38:51.908372"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 05:38:51.908884"], ["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-09-17 05:38:51.910232"], ["updated_at", "2022-09-17 05:38:51.910232"]] 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-09-17 05:38:51.911353"], ["updated_at", "2022-09-17 05:38:51.911353"]] 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-09-17 05:38:51.694325"], ["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-09-17 05:38:51.901119"], ["updated_at", "2022-09-17 05:38:51.901119"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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.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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]] 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", "2022-09-17 05:38:51.934652"]] 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-09-17 05:38:51.694325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.694325000 Z zone: *1 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.937886',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-09-17 05:38:51.939667"]] 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-09-17 05:38:51.694325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.694325000 Z zone: *1 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.941982',NULL) 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", "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-09-17 05:38:51.943955"]] 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.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,5,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.694325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.694325000 Z zone: *1 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.947556',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 ------------------------------------------------ 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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 05:38:51.967434"]] 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-09-17 05:38:51.694325000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 05:38:51.694325000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 05:38:51.694325000 Z zone: *1 time: 2022-09-17 05:38:51.694325000 Z ','2022-09-17 05:38:51.970703',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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.9ms) 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.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", "2022-09-17 06:03:41.040226"], ["updated_at", "2022-09-17 06:03:41.040226"]] TRANSACTION (0.7ms) commit 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.7ms) DELETE FROM posts;  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.8ms) DELETE FROM snapshots;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (0.8ms) DELETE FROM snapshot_items;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 06:07:35.367536"], ["updated_at", "2022-09-17 06:07:35.367536"]] 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.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-09-17 06:07:35.383314"]] 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]]  (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-09-17 06:07:35.367536000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.367536000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:35.367536000 Z ','2022-09-17 06:07:35.403354',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-09-17 06:07:35.407704"]] 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.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 2022-09-17 06:07:35.367536000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.367536000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:35.367536000 Z ','2022-09-17 06:07:35.411454',NULL) TRANSACTION (0.8ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:07:35.457283"]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 SnapshotsConcernTest - test_optional_identifier: ActiveRecord::NotNullViolation raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. 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", "2022-09-17 06:07:35.460516"]] 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-09-17 06:07:35.367536000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.367536000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.367536000 Z zone: *1 time: 2022-09-17 06:07:35.367536000 Z ','2022-09-17 06:07:35.463503',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-09-17 06:07:35.464993"]] 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-09-17 06:07:35.367536000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.367536000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.367536000 Z zone: *1 time: 2022-09-17 06:07:35.367536000 Z ','2022-09-17 06:07:35.467304',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-09-17 06:07:35.468614"]] 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-09-17 06:07:35.367536000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.367536000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.367536000 Z zone: *1 time: 2022-09-17 06:07:35.367536000 Z ','2022-09-17 06:07:35.470979',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_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 ---------------------------------------- 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.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-09-17 06:07:35.490448"], ["updated_at", "2022-09-17 06:07:35.490448"]] 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-09-17 06:07:35.494633"]] 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-09-17 06:07:35.367536000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.367536000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.367536000 Z zone: *1 time: 2022-09-17 06:07:35.367536000 Z ','2022-09-17 06:07:35.498098',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.490448000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.490448000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.490448000 Z zone: *1 time: 2022-09-17 06:07:35.490448000 Z ','2022-09-17 06:07:35.498098','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-09-18 06:07:35.499522"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:07:35.499998"], ["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-09-17 06:07:35.501118"], ["updated_at", "2022-09-17 06:07:35.501118"]] 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-09-17 06:07:35.502099"], ["updated_at", "2022-09-17 06:07:35.502099"]] 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.1ms) 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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] Comment Destroy (0.0ms) 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-09-17 06:07:35.367536"], ["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-09-17 06:07:35.490448"], ["updated_at", "2022-09-17 06:07:35.490448"]] 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.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 Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.1ms) 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 ---------------------------------- 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 ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Update (0.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_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-09-17 06:07:35.584901"], ["updated_at", "2022-09-17 06:07:35.584901"]] 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-09-17 06:07:35.588181"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- id: 2 a: 1 b: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: &1 2022-09-17 06:07:35.584901000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.584901000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:35.584901000 Z ','2022-09-17 06:07:35.590250',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-09-17 06:07:35.591671"], ["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_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]] 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.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-09-17 06:07:35.601056"], ["updated_at", "2022-09-17 06:07:35.601056"]] 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-09-17 06:07:35.602887"], ["updated_at", "2022-09-17 06:07:35.602887"]] 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-09-17 06:07:35.605100"]] 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-09-17 06:07:35.601056000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.601056000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:35.601056000 Z ','2022-09-17 06:07:35.609787',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.602887000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:35.602887000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:35.602887000 Z zone: *1 time: 2022-09-17 06:07:35.602887000 Z ','2022-09-17 06:07:35.609787','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_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.2ms) 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.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_relationships -------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction  (1.1ms) SELECT sqlite_version(*)  (6.8ms) 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) ActiveRecord::SchemaMigration Pluck (0.1ms) 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.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.8ms) commit transaction Migrating to CreateSnapshotsTables (20210306100122) 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(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.8ms) 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.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", "2022-09-17 06:07:54.759750"], ["updated_at", "2022-09-17 06:07:54.759750"]] TRANSACTION (0.6ms) commit transaction  (0.9ms) DELETE FROM posts;  (0.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.9ms) DELETE FROM snapshots;  (0.1ms) 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-09-17 06:07:54.772505"], ["updated_at", "2022-09-17 06:07:54.772505"]] 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", "2022-09-17 06:07:54.787752"]] 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-09-17 06:07:54.772505000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.772505000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:54.772505000 Z ','2022-09-17 06:07:54.807805',NULL) TRANSACTION (0.6ms) 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.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-09-17 06:07:54.811931"]] 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-09-17 06:07:54.772505000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.772505000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:54.772505000 Z ','2022-09-17 06:07:54.823101',NULL) TRANSACTION (0.9ms) commit transaction TRANSACTION (0.1ms) 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-09-17 06:07:54.859029"], ["updated_at", "2022-09-17 06:07:54.859029"]] 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-09-17 06:07:54.862631"], ["updated_at", "2022-09-17 06:07:54.862631"]] 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", "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-09-17 06:07:54.865654"]] 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-09-17 06:07:54.859029000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.859029000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:54.859029000 Z ','2022-09-17 06:07:54.870444',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.862631000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.862631000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.862631000 Z zone: *1 time: 2022-09-17 06:07:54.862631000 Z ','2022-09-17 06:07:54.870444','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 -------------------------------------- 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_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-09-17 06:07:54.881977"], ["updated_at", "2022-09-17 06:07:54.881977"]] 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-09-17 06:07:54.885735"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- id: 2 a: 1 b: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: &1 2022-09-17 06:07:54.881977000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.881977000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:07:54.881977000 Z ','2022-09-17 06:07:54.887310',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-09-17 06:07:54.888454"], ["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.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]] 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.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.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_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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (8.6ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:07:54.971801"]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 SnapshotsConcernTest - test_optional_identifier: ActiveRecord::NotNullViolation raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. 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 (1.1ms) 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-09-17 06:07:54.974919"]] 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,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.772505000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.772505000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.772505000 Z zone: *1 time: 2022-09-17 06:07:54.772505000 Z ','2022-09-17 06:07:54.979124',NULL) 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", "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-09-17 06:07:54.981698"]] 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,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.772505000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.772505000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.772505000 Z zone: *1 time: 2022-09-17 06:07:54.772505000 Z ','2022-09-17 06:07:54.985480',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-09-17 06:07:54.987721"]] 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-09-17 06:07:54.772505000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.772505000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.772505000 Z zone: *1 time: 2022-09-17 06:07:54.772505000 Z ','2022-09-17 06:07:54.990085',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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" 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.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_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 ------------------------------------ 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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-17 06:07:55.014379"], ["updated_at", "2022-09-17 06:07:55.014379"]] 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-09-17 06:07:55.017842"]] 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.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: 2022-09-17 06:07:54.772505000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:54.772505000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:54.772505000 Z zone: *1 time: 2022-09-17 06:07:54.772505000 Z ','2022-09-17 06:07:55.021384',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:55.014379000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:07:55.014379000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:07:55.014379000 Z zone: *1 time: 2022-09-17 06:07:55.014379000 Z ','2022-09-17 06:07:55.021384','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-09-18 06:07:55.023065"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:07:55.023548"], ["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-09-17 06:07:55.024672"], ["updated_at", "2022-09-17 06:07:55.024672"]] 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-09-17 06:07:55.025470"], ["updated_at", "2022-09-17 06:07:55.025470"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.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", "2022-09-17 06:07:54.772505"], ["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-09-17 06:07:55.014379"], ["updated_at", "2022-09-17 06:07:55.014379"]] 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" 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.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  (1.2ms) SELECT sqlite_version(*)  (6.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)  (0.9ms) 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) ActiveRecord::SchemaMigration Pluck (0.1ms) 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.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.8ms) commit transaction Migrating to CreateSnapshotsTables (20210306100122) 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, "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.3ms) 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(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.8ms) 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.0ms) begin transaction ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2022-09-17 06:08:27.662036"], ["updated_at", "2022-09-17 06:08:27.662036"]] TRANSACTION (0.6ms) commit transaction  (1.0ms) DELETE FROM posts;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.8ms) DELETE FROM snapshots;  (0.4ms) 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-09-17 06:08:27.674491"], ["updated_at", "2022-09-17 06:08:27.674491"]] 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-09-17 06:08:27.689993"]] 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-09-17 06:08:27.674491000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.709617',NULL) TRANSACTION (0.8ms) commit transaction Post Update (0.9ms) 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", "2022-09-17 06:08:27.714174"]] 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-09-17 06:08:27.674491000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.725578',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-17 06:08:27.763862"], ["updated_at", "2022-09-17 06:08:27.763862"]] 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.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-09-17 06:08:27.767671"]] 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: 2022-09-17 06:08:27.674491000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: *1 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.771823',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.763862000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.763862000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.763862000 Z zone: *1 time: 2022-09-17 06:08:27.763862000 Z ','2022-09-17 06:08:27.771823','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-09-18 06:08:27.773101"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:08:27.773585"], ["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-09-17 06:08:27.774702"], ["updated_at", "2022-09-17 06:08:27.774702"]] 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-09-17 06:08:27.775771"], ["updated_at", "2022-09-17 06:08:27.775771"]] 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.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.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-09-17 06:08:27.674491"], ["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-09-17 06:08:27.763862"], ["updated_at", "2022-09-17 06:08:27.763862"]] 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" 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 ------------------------------ 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]] TRANSACTION (0.0ms) 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-09-17 06:08:27.795224"], ["updated_at", "2022-09-17 06:08:27.795224"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-17 06:08:27.796867"], ["updated_at", "2022-09-17 06:08:27.796867"]] 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", "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-09-17 06:08:27.799990"]] 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: &1 2022-09-17 06:08:27.795224000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.795224000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:27.795224000 Z ','2022-09-17 06:08:27.803875',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.796867000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.796867000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.796867000 Z zone: *1 time: 2022-09-17 06:08:27.796867000 Z ','2022-09-17 06:08:27.803875','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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) rollback 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-17 06:08:27.868774"], ["updated_at", "2022-09-17 06:08:27.868774"]] 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-09-17 06:08:27.872065"]] 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-09-17 06:08:27.868774000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.868774000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:27.868774000 Z ','2022-09-17 06:08:27.873493',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-09-17 06:08:27.874279"], ["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_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_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.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.1ms) 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 -------------------------------------- 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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:08:27.897197"]] 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.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-09-17 06:08:27.674491000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: *1 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.901587',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:08:27.902807"]] 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-09-17 06:08:27.674491000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: *1 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.905382',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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.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-09-17 06:08:27.908611"]] 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,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: *1 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.912193',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-09-17 06:08:27.914211"]] 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.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: 2022-09-17 06:08:27.674491000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: *1 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.917833',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-09-17 06:08:27.919716"]] 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-09-17 06:08:27.674491000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:27.674491000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:27.674491000 Z zone: *1 time: 2022-09-17 06:08:27.674491000 Z ','2022-09-17 06:08:27.922448',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.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) 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.1ms) 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.2ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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.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  (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.2ms) 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]]  (9.1ms) DELETE FROM posts;  (0.8ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 06:08:59.530206"], ["updated_at", "2022-09-17 06:08:59.530206"]] 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-09-17 06:08:59.545098"]] 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-09-17 06:08:59.530206000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.564338',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-09-17 06:08:59.568563"]] 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-09-17 06:08:59.530206000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.572272',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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 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-09-17 06:08:59.619996"]] 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-09-17 06:08:59.530206000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.530206000 Z zone: *1 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.623120',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-09-17 06:08:59.624631"]] 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-09-17 06:08:59.530206000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.530206000 Z zone: *1 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.626985',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-09-17 06:08:59.628347"]] 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-09-17 06:08:59.530206000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.530206000 Z zone: *1 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.631067',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:08:59.640340"]] 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-09-17 06:08:59.530206000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.530206000 Z zone: *1 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.643386',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:08:59.644373"]] 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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: 2022-09-17 06:08:59.530206000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.530206000 Z zone: *1 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.647380',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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.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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.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_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.2ms) 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.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_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-09-17 06:08:59.701906"], ["updated_at", "2022-09-17 06:08:59.701906"]] 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-09-17 06:08:59.726308"]] 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-09-17 06:08:59.701906000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.701906000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:59.701906000 Z ','2022-09-17 06:08:59.728106',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-09-17 06:08:59.728908"], ["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.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" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-17 06:08:59.737855"], ["updated_at", "2022-09-17 06:08:59.737855"]] 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-09-17 06:08:59.741627"], ["updated_at", "2022-09-17 06:08:59.741627"]] 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-09-17 06:08:59.743745"]] 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.1ms) 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-09-17 06:08:59.737855000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.737855000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:08:59.737855000 Z ','2022-09-17 06:08:59.748204',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.741627000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.741627000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.741627000 Z zone: *1 time: 2022-09-17 06:08:59.741627000 Z ','2022-09-17 06:08:59.748204','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 ------------------------------------ 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.2ms) 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.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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) 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-09-17 06:08:59.767722"], ["updated_at", "2022-09-17 06:08:59.767722"]] 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-09-17 06:08:59.771119"]] 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-09-17 06:08:59.530206000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.530206000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.530206000 Z zone: *1 time: 2022-09-17 06:08:59.530206000 Z ','2022-09-17 06:08:59.774528',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.767722000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:08:59.767722000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:08:59.767722000 Z zone: *1 time: 2022-09-17 06:08:59.767722000 Z ','2022-09-17 06:08:59.774528','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-09-18 06:08:59.775677"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:08:59.776124"], ["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-09-17 06:08:59.777203"], ["updated_at", "2022-09-17 06:08:59.777203"]] 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-09-17 06:08:59.778001"], ["updated_at", "2022-09-17 06:08:59.778001"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) 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.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.3ms) 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-09-17 06:08:59.530206"], ["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-09-17 06:08:59.767722"], ["updated_at", "2022-09-17 06:08:59.767722"]] 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" 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.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.2ms) begin transaction ----------------------------------------------- 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.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.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", "2022-09-17 06:09:51.766670"], ["updated_at", "2022-09-17 06:09:51.766670"]] 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-09-17 06:09:51.781954"]] 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 2022-09-17 06:09:51.766670000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.801438',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.4ms) 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-09-17 06:09:51.805914"]] 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.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 2022-09-17 06:09:51.766670000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.809586',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_relationships ---------------------------------------- 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_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:09:51.865117"]] 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.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.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: 2022-09-17 06:09:51.766670000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: *1 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.869169',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:09:51.870908"]] 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-09-17 06:09:51.766670000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: *1 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.873581',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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", "2022-09-17 06:09:51.877842"]] 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.1ms) 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-09-17 06:09:51.766670000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: *1 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.881254',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-09-17 06:09:51.882822"]] 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,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: *1 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.886272',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-09-17 06:09:51.888079"]] 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-09-17 06:09:51.766670000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: *1 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:51.891621',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ 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.2ms) 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.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.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_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-09-17 06:09:51.953842"], ["updated_at", "2022-09-17 06:09:51.953842"]] 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-09-17 06:09:51.970463"], ["updated_at", "2022-09-17 06:09:51.970463"]] 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", "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-09-17 06:09:51.972785"]] 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-09-17 06:09:51.953842000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.953842000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:09:51.953842000 Z ','2022-09-17 06:09:51.976389',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.970463000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.970463000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.970463000 Z zone: *1 time: 2022-09-17 06:09:51.970463000 Z ','2022-09-17 06:09:51.976389','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.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_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-09-17 06:09:51.989642"], ["updated_at", "2022-09-17 06:09:51.989642"]] 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", "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-09-17 06:09:51.993123"]] 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-09-17 06:09:51.989642000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.989642000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:09:51.989642000 Z ','2022-09-17 06:09:51.994658',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ParentWithoutChildren Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-17 06:09:51.995467"], ["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.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 ------------------------------------ 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.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_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_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 -------------------------------------------- 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.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-09-17 06:09:52.016159"], ["updated_at", "2022-09-17 06:09:52.016159"]] TRANSACTION (0.1ms) 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-09-17 06:09:52.019792"]] 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-09-17 06:09:51.766670000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:51.766670000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:51.766670000 Z zone: *1 time: 2022-09-17 06:09:51.766670000 Z ','2022-09-17 06:09:52.023296',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:52.016159000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:09:52.016159000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:09:52.016159000 Z zone: *1 time: 2022-09-17 06:09:52.016159000 Z ','2022-09-17 06:09:52.023296','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-09-18 06:09:52.024456"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:09:52.024999"], ["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-09-17 06:09:52.026598"], ["updated_at", "2022-09-17 06:09:52.026598"]] 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-09-17 06:09:52.027439"], ["updated_at", "2022-09-17 06:09:52.027439"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.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", "2022-09-17 06:09:51.766670"], ["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-09-17 06:09:52.016159"], ["updated_at", "2022-09-17 06:09:52.016159"]] 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" 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.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]]  (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.8ms) DELETE FROM 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", "2022-09-17 06:14:46.724123"], ["updated_at", "2022-09-17 06:14:46.724123"]] 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-09-17 06:14:46.739381"]] TRANSACTION (0.9ms) 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-09-17 06:14:46.724123000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.767092',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", "2022-09-17 06:14:46.771589"]] 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-09-17 06:14:46.724123000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.775170',NULL) TRANSACTION (0.8ms) 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.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.3ms) 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 ------------------------------------------------ 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.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:14:46.885457"]] 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.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,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.724123000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.724123000 Z zone: *1 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.902848',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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.2ms) 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-09-17 06:14:46.909728"]] 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.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: 2022-09-17 06:14:46.724123000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.724123000 Z zone: *1 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.913382',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-09-17 06:14:46.915705"]] 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-09-17 06:14:46.724123000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.724123000 Z zone: *1 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.918135',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-09-17 06:14:46.919817"]] 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-09-17 06:14:46.724123000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.724123000 Z zone: *1 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.922558',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 -------------------------------------------- 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.1ms) SAVEPOINT active_record_1 Comment Create (0.5ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 06:14:46.931718"], ["updated_at", "2022-09-17 06:14:46.931718"]] 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-09-17 06:14:46.934981"]] 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.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: 2022-09-17 06:14:46.724123000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.724123000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.724123000 Z zone: *1 time: 2022-09-17 06:14:46.724123000 Z ','2022-09-17 06:14:46.938879',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.931718000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.931718000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.931718000 Z zone: *1 time: 2022-09-17 06:14:46.931718000 Z ','2022-09-17 06:14:46.938879','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:14:46.940369"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:14:46.941063"], ["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-09-17 06:14:46.942233"], ["updated_at", "2022-09-17 06:14:46.942233"]] 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-09-17 06:14:46.943086"], ["updated_at", "2022-09-17 06:14:46.943086"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.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", "2022-09-17 06:14:46.724123"], ["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-09-17 06:14:46.931718"], ["updated_at", "2022-09-17 06:14:46.931718"]] 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" 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.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_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-09-17 06:14:46.957869"], ["updated_at", "2022-09-17 06:14:46.957869"]] 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-09-17 06:14:46.959368"], ["updated_at", "2022-09-17 06:14:46.959368"]] 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-09-17 06:14:46.961396"]] 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-09-17 06:14:46.957869000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.957869000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:14:46.957869000 Z ','2022-09-17 06:14:46.964949',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.959368000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.959368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:14:46.959368000 Z zone: *1 time: 2022-09-17 06:14:46.959368000 Z ','2022-09-17 06:14:46.964949','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_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.1ms) 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.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-09-17 06:14:46.977837"], ["updated_at", "2022-09-17 06:14:46.977837"]] 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-09-17 06:14:46.981095"]] 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-09-17 06:14:46.977837000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:14:46.977837000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:14:46.977837000 Z ','2022-09-17 06:14:46.982571',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-09-17 06:14:46.983378"], ["id", 2]] TRANSACTION (0.1ms) 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.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.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 ------------------------------ 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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.8ms) 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.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", "2022-09-17 06:41:18.619758"], ["updated_at", "2022-09-17 06:41:18.619758"]] 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-09-17 06:41:18.635377"]] 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-09-17 06:41:18.619758000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.663057',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-09-17 06:41:18.667636"]] 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-09-17 06:41:18.619758000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.671177',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-17 06:41:18.712345"], ["updated_at", "2022-09-17 06:41:18.712345"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "2022-09-17 06:41:18.715129"]] 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-09-17 06:41:18.619758000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.619758000 Z zone: *1 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.718316',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.712345000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.712345000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.712345000 Z zone: *1 time: 2022-09-17 06:41:18.712345000 Z ','2022-09-17 06:41:18.718316','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-09-18 06:41:18.719621"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:41:18.720073"], ["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", "2022-09-17 06:41:18.721100"], ["updated_at", "2022-09-17 06:41:18.721100"]] 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-09-17 06:41:18.721868"], ["updated_at", "2022-09-17 06:41:18.721868"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" TRANSACTION (0.2ms) 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.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-09-17 06:41:18.619758"], ["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-09-17 06:41:18.712345"], ["updated_at", "2022-09-17 06:41:18.712345"]] 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]] 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 -------------------------------------------- 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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_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_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.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::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 ------------------------------------------- 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", "2022-09-17 06:41:18.817864"]] 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-09-17 06:41:18.619758000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.619758000 Z zone: *1 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.821129',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-09-17 06:41:18.822692"]] 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.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: 2022-09-17 06:41:18.619758000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.619758000 Z zone: *1 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.825254',NULL) 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", "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-09-17 06:41:18.827645"]] 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-09-17 06:41:18.619758000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.619758000 Z zone: *1 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.831121',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) 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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:41:18.851113"]] 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-09-17 06:41:18.619758000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.619758000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.619758000 Z zone: *1 time: 2022-09-17 06:41:18.619758000 Z ','2022-09-17 06:41:18.854311',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: 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-09-17 06:41:18.862964"], ["updated_at", "2022-09-17 06:41:18.862964"]] 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-09-17 06:41:18.866690"]] 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-09-17 06:41:18.862964000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.862964000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:18.862964000 Z ','2022-09-17 06:41:18.868369',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-09-17 06:41:18.869213"], ["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.3ms) 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-09-17 06:41:18.874921"], ["updated_at", "2022-09-17 06:41:18.874921"]] 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-09-17 06:41:18.876674"], ["updated_at", "2022-09-17 06:41:18.876674"]] 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-09-17 06:41:18.878664"]] 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.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-09-17 06:41:18.874921000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.874921000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:18.874921000 Z ','2022-09-17 06:41:18.882646',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.876674000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:18.876674000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:18.876674000 Z zone: *1 time: 2022-09-17 06:41:18.876674000 Z ','2022-09-17 06:41:18.882646','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 -------------------------------- 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_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.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_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_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.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  (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.2ms) 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';  (0.9ms) DELETE FROM snapshot_items;  (1.2ms) 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.1ms) begin transaction Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 06:41:33.991451"], ["updated_at", "2022-09-17 06:41:33.991451"]] TRANSACTION (0.9ms) commit transaction 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", "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-09-17 06:41:34.007859"]] 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-09-17 06:41:33.991451000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.034887',NULL) TRANSACTION (0.7ms) commit transaction Post Update (0.9ms) 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-09-17 06:41:34.039569"]] 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.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 2022-09-17 06:41:33.991451000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.043226',NULL) TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-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", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:41:34.087461"]] 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-09-17 06:41:33.991451000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:33.991451000 Z zone: *1 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.090550',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.6ms) rollback transaction TRANSACTION (0.1ms) 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-09-17 06:41:34.095213"]] 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: 2022-09-17 06:41:33.991451000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:33.991451000 Z zone: *1 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.098963',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-09-17 06:41:34.100900"]] 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-09-17 06:41:33.991451000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:33.991451000 Z zone: *1 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.103421',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-09-17 06:41:34.104783"]] 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-09-17 06:41:33.991451000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:33.991451000 Z zone: *1 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.107170',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_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 TRANSACTION (0.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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.4ms) 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.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_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 -------------------------------------- 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.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.2ms) 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.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-09-17 06:41:34.203308"], ["updated_at", "2022-09-17 06:41:34.203308"]] 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.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-09-17 06:41:34.206071"]] 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-09-17 06:41:34.203308000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:34.203308000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:34.203308000 Z ','2022-09-17 06:41:34.207898',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-09-17 06:41:34.209027"], ["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.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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-17 06:41:34.219391"], ["updated_at", "2022-09-17 06:41:34.219391"]] 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-09-17 06:41:34.222985"], ["updated_at", "2022-09-17 06:41:34.222985"]] 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-09-17 06:41:34.225438"]] 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: &1 2022-09-17 06:41:34.219391000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:34.219391000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:41:34.219391000 Z ','2022-09-17 06:41:34.229282',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:34.222985000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:34.222985000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:34.222985000 Z zone: *1 time: 2022-09-17 06:41:34.222985000 Z ','2022-09-17 06:41:34.229282','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 ------------------------------------ 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.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 ------------------------------------ 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.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-17 06:41:34.248999"], ["updated_at", "2022-09-17 06:41:34.248999"]] 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 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-09-17 06:41:34.251946"]] 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-09-17 06:41:33.991451000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:33.991451000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:33.991451000 Z zone: *1 time: 2022-09-17 06:41:33.991451000 Z ','2022-09-17 06:41:34.255110',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:34.248999000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:41:34.248999000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:41:34.248999000 Z zone: *1 time: 2022-09-17 06:41:34.248999000 Z ','2022-09-17 06:41:34.255110','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-09-18 06:41:34.256235"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:41:34.256707"], ["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-09-17 06:41:34.258303"], ["updated_at", "2022-09-17 06:41:34.258303"]] 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-09-17 06:41:34.259387"], ["updated_at", "2022-09-17 06:41:34.259387"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-17 06:41:33.991451"], ["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-09-17 06:41:34.248999"], ["updated_at", "2022-09-17 06:41:34.248999"]] 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" 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.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  (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.7ms) 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.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 06:43:29.040404"], ["updated_at", "2022-09-17 06:43:29.040404"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.055364"]] 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-09-17 06:43:29.040404000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.082044',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.086654"]] 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-09-17 06:43:29.040404000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.090459',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.137185"]] 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-09-17 06:43:29.040404000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: *1 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.140444',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-09-17 06:43:29.145468"]] 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.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,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: *1 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.149367',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.151150"]] 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,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: *1 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.153882',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.155266"]] 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.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: 2022-09-17 06:43:29.040404000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: *1 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.172308',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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 ------------------------------------ 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.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.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.1ms) 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.3ms) 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]] CACHE 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_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-09-17 06:43:29.247331"], ["updated_at", "2022-09-17 06:43:29.247331"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.250555"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'--- id: 2 a: 1 b: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: &1 2022-09-17 06:43:29.247331000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.247331000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:29.247331000 Z ','2022-09-17 06:43:29.252031',NULL) TRANSACTION (0.1ms) 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-09-17 06:43:29.253301"], ["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_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-17 06:43:29.264804"], ["updated_at", "2022-09-17 06:43:29.264804"]] TRANSACTION (0.0ms) 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-09-17 06:43:29.268840"], ["updated_at", "2022-09-17 06:43:29.268840"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.272095"]] 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-09-17 06:43:29.264804000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.264804000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:29.264804000 Z ','2022-09-17 06:43:29.275969',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.268840000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.268840000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.268840000 Z zone: *1 time: 2022-09-17 06:43:29.268840000 Z ','2022-09-17 06:43:29.275969','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.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.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.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.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.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 ------------------------------------------- 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-09-17 06:43:29.293512"], ["updated_at", "2022-09-17 06:43:29.293512"]] 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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:29.296198"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.040404000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.040404000 Z zone: *1 time: 2022-09-17 06:43:29.040404000 Z ','2022-09-17 06:43:29.299890',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.293512000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:29.293512000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:29.293512000 Z zone: *1 time: 2022-09-17 06:43:29.293512000 Z ','2022-09-17 06:43:29.299890','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.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:43:29.301182"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:43:29.301974"], ["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-09-17 06:43:29.303903"], ["updated_at", "2022-09-17 06:43:29.303903"]] 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-09-17 06:43:29.304882"], ["updated_at", "2022-09-17 06:43:29.304882"]] 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-09-17 06:43:29.040404"], ["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-09-17 06:43:29.293512"], ["updated_at", "2022-09-17 06:43:29.293512"]] 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" 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]] CACHE 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.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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ----------------------------------------------- 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.7ms) 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.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", "2022-09-17 06:43:46.698368"], ["updated_at", "2022-09-17 06:43:46.698368"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.716836"]] 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-09-17 06:43:46.698368000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.745063',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.749822"]] 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-09-17 06:43:46.698368000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.753792',NULL) TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) 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-09-17 06:43:46.793595"], ["updated_at", "2022-09-17 06:43:46.793595"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.796679"]] 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-09-17 06:43:46.698368000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.698368000 Z zone: *1 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.799995',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.793595000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.793595000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.793595000 Z zone: *1 time: 2022-09-17 06:43:46.793595000 Z ','2022-09-17 06:43:46.799995','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-09-18 06:43:46.801115"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:43:46.801796"], ["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-09-17 06:43:46.802943"], ["updated_at", "2022-09-17 06:43:46.802943"]] 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-09-17 06:43:46.804128"], ["updated_at", "2022-09-17 06:43:46.804128"]] 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.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.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-09-17 06:43:46.698368"], ["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-09-17 06:43:46.793595"], ["updated_at", "2022-09-17 06:43:46.793595"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback 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]] 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.2ms) 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.1ms) 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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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.1ms) 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", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-09-17 06:43:46.905047"]] 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-09-17 06:43:46.698368000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.698368000 Z zone: *1 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.908678',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.910358"]] 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.1ms) 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-09-17 06:43:46.698368000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.698368000 Z zone: *1 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.913412',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.915022"]] 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: 2022-09-17 06:43:46.698368000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.698368000 Z zone: *1 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.917855',NULL) 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", "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) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.933908"]] 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-09-17 06:43:46.698368000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.698368000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.698368000 Z zone: *1 time: 2022-09-17 06:43:46.698368000 Z ','2022-09-17 06:43:46.937091',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) 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.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-09-17 06:43:46.950785"], ["updated_at", "2022-09-17 06:43:46.950785"]] 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-09-17 06:43:46.952564"], ["updated_at", "2022-09-17 06:43:46.952564"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.954481"]] 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.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-09-17 06:43:46.950785000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.950785000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:46.950785000 Z ','2022-09-17 06:43:46.958263',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.952564000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.952564000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:43:46.952564000 Z zone: *1 time: 2022-09-17 06:43:46.952564000 Z ','2022-09-17 06:43:46.958263','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.4ms) 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-09-17 06:43:46.966672"], ["updated_at", "2022-09-17 06:43:46.966672"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:43:46.969535"]] 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-09-17 06:43:46.966672000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:43:46.966672000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:43:46.966672000 Z ','2022-09-17 06:43:46.971201',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-09-17 06:43:46.972048"], ["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_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]] CACHE 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_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_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]] CACHE 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.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_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction  (1.1ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.2ms) 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.1ms) DELETE FROM posts;  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.9ms) DELETE FROM snapshots;  (1.0ms) 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'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.1ms) begin transaction Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 06:45:05.965593"], ["updated_at", "2022-09-17 06:45:05.965593"]] TRANSACTION (0.6ms) 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:05.983804"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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-09-17 06:45:05.965593000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.014486',NULL) TRANSACTION (0.6ms) commit transaction Post Update (0.9ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] 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", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.019862"]] 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-09-17 06:45:05.965593000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.024351',NULL) TRANSACTION (0.8ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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.3ms) 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.077205"]] 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.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: 2022-09-17 06:45:05.965593000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:05.965593000 Z zone: *1 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.081752',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.3ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-09-17 06:45:06.086742"]] 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.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: 2022-09-17 06:45:05.965593000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:05.965593000 Z zone: *1 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.090252',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.092535"]] 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-09-17 06:45:05.965593000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:05.965593000 Z zone: *1 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.095468',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.096985"]] 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.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.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: 2022-09-17 06:45:05.965593000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:05.965593000 Z zone: *1 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.117913',NULL) 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", "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) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" 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.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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 (1.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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.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::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.3ms) 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.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", "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 -------------------------------------------- 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.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-09-17 06:45:06.209073"], ["updated_at", "2022-09-17 06:45:06.209073"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.212555"]] 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.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.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: 2022-09-17 06:45:05.965593000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:05.965593000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:05.965593000 Z zone: *1 time: 2022-09-17 06:45:05.965593000 Z ','2022-09-17 06:45:06.217562',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:06.209073000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:06.209073000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:06.209073000 Z zone: *1 time: 2022-09-17 06:45:06.209073000 Z ','2022-09-17 06:45:06.217562','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:45:06.219138"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:45:06.219691"], ["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-09-17 06:45:06.220936"], ["updated_at", "2022-09-17 06:45:06.220936"]] 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-09-17 06:45:06.221855"], ["updated_at", "2022-09-17 06:45:06.221855"]] 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.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.2ms) 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-09-17 06:45:05.965593"], ["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-09-17 06:45:06.209073"], ["updated_at", "2022-09-17 06:45:06.209073"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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_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]] CACHE 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_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_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 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) 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-09-17 06:45:06.252817"], ["updated_at", "2022-09-17 06:45:06.252817"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.255861"]] 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-09-17 06:45:06.252817000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:06.252817000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:45:06.252817000 Z ','2022-09-17 06:45:06.257718',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-09-17 06:45:06.258782"], ["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_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-09-17 06:45:06.265462"], ["updated_at", "2022-09-17 06:45:06.265462"]] 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-09-17 06:45:06.267910"], ["updated_at", "2022-09-17 06:45:06.267910"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:45:06.270174"]] 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.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-09-17 06:45:06.265462000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:06.265462000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:45:06.265462000 Z ','2022-09-17 06:45:06.274301',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:06.267910000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:45:06.267910000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:45:06.267910000 Z zone: *1 time: 2022-09-17 06:45:06.267910000 Z ','2022-09-17 06:45:06.274301','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.4ms) 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  (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]]  (6.7ms) 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.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-17 06:46:03.835958"], ["updated_at", "2022-09-17 06:46:03.835958"]] 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.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-09-17 06:46:03.850888"]] 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-09-17 06:46:03.835958000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:03.870507',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.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-09-17 06:46:03.874713"]] 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.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 2022-09-17 06:46:03.835958000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:03.878515',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.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.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.3ms) rollback transaction TRANSACTION (0.1ms) 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" = ? 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.1ms) 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 -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.2ms) 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_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-09-17 06:46:03.950667"], ["updated_at", "2022-09-17 06:46:03.950667"]] TRANSACTION (0.0ms) 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-09-17 06:46:03.956078"], ["updated_at", "2022-09-17 06:46:03.956078"]] 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-09-17 06:46:03.958984"]] 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-09-17 06:46:03.950667000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.950667000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:46:03.950667000 Z ','2022-09-17 06:46:03.962549',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.956078000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.956078000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.956078000 Z zone: *1 time: 2022-09-17 06:46:03.956078000 Z ','2022-09-17 06:46:03.962549','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_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.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.5ms) 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_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_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-09-17 06:46:03.979148"], ["updated_at", "2022-09-17 06:46:03.979148"]] TRANSACTION (6.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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) 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-09-17 06:46:03.996933"]] 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-09-17 06:46:03.979148000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.979148000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-17 06:46:03.979148000 Z ','2022-09-17 06:46:04.015403',NULL) TRANSACTION (8.6ms) 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-09-17 06:46:04.025214"], ["id", 2]] TRANSACTION (0.1ms) 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_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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]] 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-09-17 06:46:04.052792"]] 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-09-17 06:46:03.835958000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.835958000 Z zone: *1 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:04.057010',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-09-17 06:46:04.058837"]] 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-09-17 06:46:03.835958000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.835958000 Z zone: *1 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:04.061360',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-09-17 06:46:04.062780"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.2ms) 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 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-09-17 06:46:03.835958000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.835958000 Z zone: *1 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:04.065207',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 ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:46:04.070448"]] 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-09-17 06:46:03.835958000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.835958000 Z zone: *1 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:04.073669',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "metadata", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["metadata", "--- {}\n"], ["created_at", "2022-09-17 06:46:04.074693"]] 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-09-17 06:46:03.835958000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.835958000 Z zone: *1 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:04.077098',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" 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 -------------------------------------------- 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.5ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-17 06:46:04.087996"], ["updated_at", "2022-09-17 06:46:04.087996"]] 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-09-17 06:46:04.091583"]] 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-09-17 06:46:03.835958000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:03.835958000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:03.835958000 Z zone: *1 time: 2022-09-17 06:46:03.835958000 Z ','2022-09-17 06:46:04.095147',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:04.087996000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-17 06:46:04.087996000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-17 06:46:04.087996000 Z zone: *1 time: 2022-09-17 06:46:04.087996000 Z ','2022-09-17 06:46:04.095147','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-09-18 06:46:04.096325"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-18 06:46:04.096802"], ["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-09-17 06:46:04.097898"], ["updated_at", "2022-09-17 06:46:04.097898"]] 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-09-17 06:46:04.098846"], ["updated_at", "2022-09-17 06:46:04.098846"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) 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]] 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", "2022-09-17 06:46:03.835958"], ["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-09-17 06:46:04.087996"], ["updated_at", "2022-09-17 06:46:04.087996"]] 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" 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.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.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.8ms) 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.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", "2022-09-23 07:44:06.481642"], ["updated_at", "2022-09-23 07:44:06.481642"]] 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", "{}"], ["created_at", "2022-09-23 07:44:06.497023"]] 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":"2022-09-23T07:44:06.481Z","updated_at":"2022-09-23T07:44:06.481Z"}','2022-09-23 07:44:06.516523',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", "{}"], ["created_at", "2022-09-23 07:44:06.520834"]] 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.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":"2022-09-23T07:44:06.481Z","updated_at":"2022-09-23T07:44:06.481Z"}','2022-09-23 07:44:06.532021',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 -------------------------------------------- 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.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.2ms) 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-09-23 07:44:06.578935"], ["updated_at", "2022-09-23 07:44:06.578935"]] 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", "{}"], ["created_at", "2022-09-23 07:44:06.582319"]] 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.1ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.4ms) 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":"2022-09-23T07:44:06.481Z","updated_at":"2022-09-23T07:44:06.481Z"}','2022-09-23 07:44:06.585490',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:44:06.578Z","updated_at":"2022-09-23T07:44:06.578Z"}','2022-09-23 07:44:06.585490','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:44:06.587404"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:44:06.588076"], ["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-09-23 07:44:06.589731"], ["updated_at", "2022-09-23 07:44:06.589731"]] 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-09-23 07:44:06.590632"], ["updated_at", "2022-09-23 07:44:06.590632"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 ActiveSnapshotTest - test_snapshot_lifecycle: ArgumentError raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. ActiveSnapshotTest - test_snapshot_lifecycle: ArgumentError raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. 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.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]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_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_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-09-23 07:44:06.605837"], ["updated_at", "2022-09-23 07:44:06.605837"]] 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-09-23 07:44:06.608169"], ["updated_at", "2022-09-23 07:44:06.608169"]] 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", "{}"], ["created_at", "2022-09-23 07:44:06.610144"]] 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":"2022-09-23T07:44:06.605Z","updated_at":"2022-09-23T07:44:06.605Z"}','2022-09-23 07:44:06.613308',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:44:06.608Z","updated_at":"2022-09-23T07:44:06.608Z"}','2022-09-23 07:44:06.613308','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.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.2ms) 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-09-23 07:44:06.684563"], ["updated_at", "2022-09-23 07:44:06.684563"]] 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", "{}"], ["created_at", "2022-09-23 07:44:06.687862"]] 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":"2022-09-23T07:44:06.684Z","updated_at":"2022-09-23T07:44:06.684Z"}','2022-09-23 07:44:06.689728',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-09-23 07:44:06.690664"], ["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.3ms) 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 ---------------------------------------- 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.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:44:06.701092"]] 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.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":"2022-09-23T07:44:06.481Z","updated_at":"2022-09-23T07:44:06.481Z"}','2022-09-23 07:44:06.705540',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", "{}"], ["created_at", "2022-09-23 07:44:06.707663"]] 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":"2022-09-23T07:44:06.481Z","updated_at":"2022-09-23T07:44:06.481Z"}','2022-09-23 07:44:06.710138',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", "{}"], ["created_at", "2022-09-23 07:44:06.711518"]] 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":"2022-09-23T07:44:06.481Z","updated_at":"2022-09-23T07:44:06.481Z"}','2022-09-23 07:44:06.713961',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 ------------------------------------------------ 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 ----------------------------- 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_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_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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------- ConfigTest: test_defaults_to_yaml --------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- ConfigTest: test_accepts_json_config_via_string ----------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- ConfigTest: test_accepts_json_config_via_symbol ----------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- ConfigTest: test_accepts_yaml_config_via_symbol ----------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------- ConfigTest: test_config_doesnt_accept_not_specified_storage_methods ------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- ConfigTest: test_accepts_yaml_config_via_string ----------------------------------------------- TRANSACTION (0.0ms) 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.8ms) DELETE FROM posts;  (0.9ms) 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.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.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:53:39.964456"], ["updated_at", "2022-09-23 07:53:39.964456"]] 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", "{}"], ["created_at", "2022-09-23 07:53:39.980355"]] 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]]  (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":"2022-09-23T07:53:39.964Z","updated_at":"2022-09-23T07:53:39.964Z"}','2022-09-23 07:53:39.999987',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", "{}"], ["created_at", "2022-09-23 07:53:40.004464"]] 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":"2022-09-23T07:53:39.964Z","updated_at":"2022-09-23T07:53:39.964Z"}','2022-09-23 07:53:40.008144',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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_relationships -------------------------------- 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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- SnapshotTest: test_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-09-23 07:53:40.067234"], ["updated_at", "2022-09-23 07:53:40.067234"]] 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", "{}"], ["created_at", "2022-09-23 07:53:40.070684"]] 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":"2022-09-23T07:53:40.067Z","updated_at":"2022-09-23T07:53:40.067Z"}','2022-09-23 07:53:40.072397',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-09-23 07:53:40.073560"], ["id", 2]] TRANSACTION (0.2ms) 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_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.1ms) begin 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-09-23 07:53:40.082207"], ["updated_at", "2022-09-23 07:53:40.082207"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-23 07:53:40.087137"], ["updated_at", "2022-09-23 07:53:40.087137"]] 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", "{}"], ["created_at", "2022-09-23 07:53:40.089765"]] 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":"2022-09-23T07:53:40.082Z","updated_at":"2022-09-23T07:53:40.082Z"}','2022-09-23 07:53:40.092732',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:53:40.087Z","updated_at":"2022-09-23T07:53:40.087Z"}','2022-09-23 07:53:40.092732','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_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]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_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 -------------------------------------------------------- ConfigTest::storage_method: test_accepts_serialized_yaml -------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------------------------------- ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods ----------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------- ConfigTest::storage_method: test_accepts_native_json ---------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------ ConfigTest::storage_method: test_defaults_to_serialized_json ------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------- ConfigTest::storage_method: test_accepts_to_serialized_json ----------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- ConfigTest::storage_method: test_converts_symbol_to_string ---------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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_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.1ms) rollback transaction TRANSACTION (6.8ms) 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.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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 ------------------------------------------- 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:53:40.179894"]] 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":"2022-09-23T07:53:39.964Z","updated_at":"2022-09-23T07:53:39.964Z"}','2022-09-23 07:53:40.182644',NULL) 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", "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", "{}"], ["created_at", "2022-09-23 07:53:40.184661"]] 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":"2022-09-23T07:53:39.964Z","updated_at":"2022-09-23T07:53:39.964Z"}','2022-09-23 07:53:40.188022',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", "{}"], ["created_at", "2022-09-23 07:53:40.189600"]] 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":"2022-09-23T07:53:39.964Z","updated_at":"2022-09-23T07:53:39.964Z"}','2022-09-23 07:53:40.192087',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.7ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) 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 -------------------------------------------- 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-09-23 07:53:40.206111"], ["updated_at", "2022-09-23 07:53:40.206111"]] 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2022-09-23 07:53:40.208740"]] 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":"2022-09-23T07:53:39.964Z","updated_at":"2022-09-23T07:53:39.964Z"}','2022-09-23 07:53:40.211777',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:53:40.206Z","updated_at":"2022-09-23T07:53:40.206Z"}','2022-09-23 07:53:40.211777','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-09-24 07:53:40.212931"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:53:40.213503"], ["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-09-23 07:53:40.215017"], ["updated_at", "2022-09-23 07:53:40.215017"]] 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-09-23 07:53:40.215826"], ["updated_at", "2022-09-23 07:53:40.215826"]] 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 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]] 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]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 ActiveSnapshotTest - test_snapshot_lifecycle: ArgumentError raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. ActiveSnapshotTest - test_snapshot_lifecycle: ArgumentError raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. Other block based assertions (e.g. `assert_difference`) can be used, as long as `assert_raises` is inside their block. TRANSACTION (0.4ms) 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]]  (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.8ms) DELETE FROM snapshot_items;  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:55:25.271304"], ["updated_at", "2022-09-23 07:55:25.271304"]] 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", "{}"], ["created_at", "2022-09-23 07:55:25.286371"]] TRANSACTION (1.1ms) 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.4ms) 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":"2022-09-23T07:55:25.271Z","updated_at":"2022-09-23T07:55:25.271Z"}','2022-09-23 07:55:25.306036',NULL) TRANSACTION (0.6ms) commit transaction Post Update (1.2ms) 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", "{}"], ["created_at", "2022-09-23 07:55:25.311310"]] 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":"2022-09-23T07:55:25.271Z","updated_at":"2022-09-23T07:55:25.271Z"}','2022-09-23 07:55:25.314757',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.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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:55:25.359982"]] 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":"2022-09-23T07:55:25.271Z","updated_at":"2022-09-23T07:55:25.271Z"}','2022-09-23 07:55:25.362660',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", "{}"], ["created_at", "2022-09-23 07:55:25.364471"]] 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":"2022-09-23T07:55:25.271Z","updated_at":"2022-09-23T07:55:25.271Z"}','2022-09-23 07:55:25.366546',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", "{}"], ["created_at", "2022-09-23 07:55:25.368260"]] 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":"2022-09-23T07:55:25.271Z","updated_at":"2022-09-23T07:55:25.271Z"}','2022-09-23 07:55:25.370599',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) 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.0ms) rollback 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.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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:55:25.271000"], ["updated_at", "2022-09-23 07:55:25.271000"], ["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.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::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.1ms) begin transaction ---------------------------------------------------- ConfigTest::storage_method: test_accepts_native_json ---------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------ ConfigTest::storage_method: test_defaults_to_serialized_json ------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------- ConfigTest::storage_method: test_accepts_serialized_yaml -------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------- ConfigTest::storage_method: test_accepts_to_serialized_json ----------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------------------------------- ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods ----------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- ConfigTest::storage_method: test_converts_symbol_to_string ---------------------------------------------------------- TRANSACTION (0.0ms) 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.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_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-09-23 07:55:25.421109"], ["updated_at", "2022-09-23 07:55:25.421109"]] 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", "{}"], ["created_at", "2022-09-23 07:55:25.424473"]] 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":"2022-09-23T07:55:25.421Z","updated_at":"2022-09-23T07:55:25.421Z"}','2022-09-23 07:55:25.426519',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-23 07:55:25.435734"], ["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.1ms) 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_relationships -------------------------------- TRANSACTION (0.1ms) 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_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-09-23 07:55:25.515960"], ["updated_at", "2022-09-23 07:55:25.515960"]] TRANSACTION (0.0ms) 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-09-23 07:55:25.521336"], ["updated_at", "2022-09-23 07:55:25.521336"]] 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", "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", "{}"], ["created_at", "2022-09-23 07:55:25.524475"]] 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]] TRANSACTION (0.0ms) SAVEPOINT active_record_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,'SubPost',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-23T07:55:25.515Z","updated_at":"2022-09-23T07:55:25.515Z"}','2022-09-23 07:55:25.529767',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:55:25.521Z","updated_at":"2022-09-23T07:55:25.521Z"}','2022-09-23 07:55:25.529767','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.3ms) 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.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:55:25.271000"], ["updated_at", "2022-09-23 07:55:25.271000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.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.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 -------------------------------------------- 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-09-23 07:55:25.550548"], ["updated_at", "2022-09-23 07:55:25.550548"]] 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", "{}"], ["created_at", "2022-09-23 07:55:25.553321"]] 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":"2022-09-23T07:55:25.271Z","updated_at":"2022-09-23T07:55:25.271Z"}','2022-09-23 07:55:25.556558',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:55:25.550Z","updated_at":"2022-09-23T07:55:25.550Z"}','2022-09-23 07:55:25.556558','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-09-24 07:55:25.558552"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:55:25.559332"], ["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-09-23 07:55:25.560857"], ["updated_at", "2022-09-23 07:55:25.560857"]] 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-09-23 07:55:25.561805"], ["updated_at", "2022-09-23 07:55:25.561805"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 07:55:25.271000"], ["updated_at", "2022-09-23 07:55:25.271000"], ["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-09-23 07:55:25.550000"], ["updated_at", "2022-09-23 07:55:25.550000"]] 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" 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.4ms) 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]]  (6.7ms) DELETE FROM posts;  (0.9ms) 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 Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:55:40.959134"], ["updated_at", "2022-09-23 07:55:40.959134"]] 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", "{}"], ["created_at", "2022-09-23 07:55:40.974577"]] 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":"2022-09-23T07:55:40.959Z","updated_at":"2022-09-23T07:55:40.959Z"}','2022-09-23 07:55:40.994181',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", "{}"], ["created_at", "2022-09-23 07:55:40.998745"]] 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":"2022-09-23T07:55:40.959Z","updated_at":"2022-09-23T07:55:40.959Z"}','2022-09-23 07:55:41.002015',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_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 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.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:55:41.059023"]] 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.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":"2022-09-23T07:55:40.959Z","updated_at":"2022-09-23T07:55:40.959Z"}','2022-09-23 07:55:41.062037',NULL) 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", "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", "{}"], ["created_at", "2022-09-23 07:55:41.064972"]] 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":"2022-09-23T07:55:40.959Z","updated_at":"2022-09-23T07:55:40.959Z"}','2022-09-23 07:55:41.067600',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", "{}"], ["created_at", "2022-09-23 07:55:41.069309"]] 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":"2022-09-23T07:55:40.959Z","updated_at":"2022-09-23T07:55:40.959Z"}','2022-09-23 07:55:41.071512',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------- 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_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 ------------------------------------ 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:55:40.959000"], ["updated_at", "2022-09-23 07:55:40.959000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-23 07:55:41.099155"], ["updated_at", "2022-09-23 07:55:41.099155"]] 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2022-09-23 07:55:41.102488"]] 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.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":"2022-09-23T07:55:40.959Z","updated_at":"2022-09-23T07:55:40.959Z"}','2022-09-23 07:55:41.106623',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:55:41.099Z","updated_at":"2022-09-23T07:55:41.099Z"}','2022-09-23 07:55:41.106623','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-09-24 07:55:41.108119"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:55:41.108905"], ["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-09-23 07:55:41.110130"], ["updated_at", "2022-09-23 07:55:41.110130"]] 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-09-23 07:55:41.111176"], ["updated_at", "2022-09-23 07:55:41.111176"]] 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 (9.2ms) 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]] 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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 07:55:40.959000"], ["updated_at", "2022-09-23 07:55:40.959000"], ["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-09-23 07:55:41.099000"], ["updated_at", "2022-09-23 07:55:41.099000"]] 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]] 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:55:40.959000"], ["updated_at", "2022-09-23 07:55:40.959000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- SnapshotTest: test_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-09-23 07:55:41.191518"], ["updated_at", "2022-09-23 07:55:41.191518"]] 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", "{}"], ["created_at", "2022-09-23 07:55:41.194735"]] TRANSACTION (0.1ms) 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":"2022-09-23T07:55:41.191Z","updated_at":"2022-09-23T07:55:41.191Z"}','2022-09-23 07:55:41.196722',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-09-23 07:55:41.198029"], ["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_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 ----------------------------------------------------- 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-09-23 07:55:41.222562"], ["updated_at", "2022-09-23 07:55:41.222562"]] 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-09-23 07:55:41.225325"], ["updated_at", "2022-09-23 07:55:41.225325"]] 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", "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", "{}"], ["created_at", "2022-09-23 07:55:41.227679"]] 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.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":"2022-09-23T07:55:41.222Z","updated_at":"2022-09-23T07:55:41.222Z"}','2022-09-23 07:55:41.232910',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:55:41.225Z","updated_at":"2022-09-23T07:55:41.225Z"}','2022-09-23 07:55:41.232910','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_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 ------------------------------------------------------------ ConfigTest::storage_method: test_defaults_to_serialized_json ------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------- ConfigTest::storage_method: test_accepts_native_json ---------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------- ConfigTest::storage_method: test_accepts_to_serialized_json ----------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- ConfigTest::storage_method: test_converts_symbol_to_string ---------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------- ConfigTest::storage_method: test_accepts_serialized_yaml -------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------------------------------- ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods ----------------------------------------------------------------------------------- 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]]  (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';  (1.0ms) DELETE FROM snapshot_items;  (1.0ms) 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-09-23 07:56:27.202723"], ["updated_at", "2022-09-23 07:56:27.202723"]] 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", "{}"], ["created_at", "2022-09-23 07:56:27.217938"]] 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":"2022-09-23T07:56:27.202Z","updated_at":"2022-09-23T07:56:27.202Z"}','2022-09-23 07:56:27.237662',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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2022-09-23 07:56:27.242065"]] 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.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":"2022-09-23T07:56:27.202Z","updated_at":"2022-09-23T07:56:27.202Z"}','2022-09-23 07:56:27.245530',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 ---------------------------------------- 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.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-09-23 07:56:27.299216"], ["updated_at", "2022-09-23 07:56:27.299216"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2022-09-23 07:56:27.302255"]] 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.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":"2022-09-23T07:56:27.202Z","updated_at":"2022-09-23T07:56:27.202Z"}','2022-09-23 07:56:27.305765',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:56:27.299Z","updated_at":"2022-09-23T07:56:27.299Z"}','2022-09-23 07:56:27.305765','comments') 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" Post Update (0.6ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:56:27.307641"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:56:27.308760"], ["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-09-23 07:56:27.310143"], ["updated_at", "2022-09-23 07:56:27.310143"]] 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-09-23 07:56:27.311410"], ["updated_at", "2022-09-23 07:56:27.311410"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] Comment Destroy (0.0ms) 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 07:56:27.202000"], ["updated_at", "2022-09-23 07:56:27.202000"], ["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-09-23 07:56:27.299000"], ["updated_at", "2022-09-23 07:56:27.299000"]] 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" 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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:56:27.325897"]] 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":"2022-09-23T07:56:27.202Z","updated_at":"2022-09-23T07:56:27.202Z"}','2022-09-23 07:56:27.328790',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", "{}"], ["created_at", "2022-09-23 07:56:27.330402"]] 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":"2022-09-23T07:56:27.202Z","updated_at":"2022-09-23T07:56:27.202Z"}','2022-09-23 07:56:27.332819',NULL) 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", "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", "{}"], ["created_at", "2022-09-23 07:56:27.334442"]] 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":"2022-09-23T07:56:27.202Z","updated_at":"2022-09-23T07:56:27.202Z"}','2022-09-23 07:56:27.336706',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.1ms) 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 ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:56:27.202000"], ["updated_at", "2022-09-23 07:56:27.202000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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.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::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_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------- ConfigTest::storage_method: test_accepts_serialized_yaml -------------------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------- ConfigTest::storage_method: test_accepts_to_serialized_json ----------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------ ConfigTest::storage_method: test_defaults_to_serialized_json ------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------- ConfigTest::storage_method: test_accepts_native_json ---------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------------------------------- ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods ----------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- ConfigTest::storage_method: test_converts_symbol_to_string ---------------------------------------------------------- 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-09-23 07:56:27.427375"], ["updated_at", "2022-09-23 07:56:27.427375"]] 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-09-23 07:56:27.429432"], ["updated_at", "2022-09-23 07:56:27.429432"]] 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", "{}"], ["created_at", "2022-09-23 07:56:27.431498"]] 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":"2022-09-23T07:56:27.427Z","updated_at":"2022-09-23T07:56:27.427Z"}','2022-09-23 07:56:27.434841',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:56:27.429Z","updated_at":"2022-09-23T07:56:27.429Z"}','2022-09-23 07:56:27.434841','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_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:56:27.202000"], ["updated_at", "2022-09-23 07:56:27.202000"], ["id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) 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-09-23 07:56:27.448542"], ["updated_at", "2022-09-23 07:56:27.448542"]] 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", "{}"], ["created_at", "2022-09-23 07:56:27.451532"]] 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":"2022-09-23T07:56:27.448Z","updated_at":"2022-09-23T07:56:27.448Z"}','2022-09-23 07:56:27.452820',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-23 07:56:27.453625"], ["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.5ms) 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.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 ------------------------------ 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_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  (1.2ms) 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.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 Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:58:02.709528"], ["updated_at", "2022-09-23 07:58:02.709528"]] 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", "{}"], ["created_at", "2022-09-23 07:58:02.725198"]] 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":"2022-09-23T07:58:02.709Z","updated_at":"2022-09-23T07:58:02.709Z"}','2022-09-23 07:58:02.744395',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", "{}"], ["created_at", "2022-09-23 07:58:02.748984"]] 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":"2022-09-23T07:58:02.709Z","updated_at":"2022-09-23T07:58:02.709Z"}','2022-09-23 07:58:02.752638',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 (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:58:02.803635"]] 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":"2022-09-23T07:58:02.709Z","updated_at":"2022-09-23T07:58:02.709Z"}','2022-09-23 07:58:02.807247',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", "{}"], ["created_at", "2022-09-23 07:58:02.808914"]] 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":"2022-09-23T07:58:02.709Z","updated_at":"2022-09-23T07:58:02.709Z"}','2022-09-23 07:58:02.811291',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.4ms) 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", "{}"], ["created_at", "2022-09-23 07:58:02.813918"]] 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":"2022-09-23T07:58:02.709Z","updated_at":"2022-09-23T07:58:02.709Z"}','2022-09-23 07:58:02.816998',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.2ms) 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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------- ConfigTest::storage_method: test_accepts_serialized_yaml -------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- ConfigTest::storage_method: test_converts_symbol_to_string ---------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------- ConfigTest::storage_method: test_accepts_to_serialized_json ----------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------- ConfigTest::storage_method: test_accepts_native_json ---------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------------------------------- ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods ----------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------ ConfigTest::storage_method: test_defaults_to_serialized_json ------------------------------------------------------------ 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_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------- SnapshotItemTest: test_object ----------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:58:02.709000"], ["updated_at", "2022-09-23 07:58:02.709000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:58:02.709000"], ["updated_at", "2022-09-23 07:58:02.709000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-23 07:58:02.859100"], ["updated_at", "2022-09-23 07:58:02.859100"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Comment Create (7.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-09-23 07:58:02.902497"], ["updated_at", "2022-09-23 07:58:02.902497"]] 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", "{}"], ["created_at", "2022-09-23 07:58:02.917725"]] 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":"2022-09-23T07:58:02.859Z","updated_at":"2022-09-23T07:58:02.859Z"}','2022-09-23 07:58:02.921345',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:58:02.902Z","updated_at":"2022-09-23T07:58:02.902Z"}','2022-09-23 07:58:02.921345','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_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_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_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.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-09-23 07:58:02.937622"], ["updated_at", "2022-09-23 07:58:02.937622"]] 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2022-09-23 07:58:02.940333"]] 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":"2022-09-23T07:58:02.937Z","updated_at":"2022-09-23T07:58:02.937Z"}','2022-09-23 07:58:02.941652',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-09-23 07:58:02.942412"], ["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.1ms) begin transaction -------------------------------- SnapshotTest: 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_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-09-23 07:58:02.965574"], ["updated_at", "2022-09-23 07:58:02.965574"]] 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 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", "{}"], ["created_at", "2022-09-23 07:58:02.969651"]] 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":"2022-09-23T07:58:02.709Z","updated_at":"2022-09-23T07:58:02.709Z"}','2022-09-23 07:58:02.972683',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:58:02.965Z","updated_at":"2022-09-23T07:58:02.965Z"}','2022-09-23 07:58:02.972683','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-09-24 07:58:02.974506"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:58:02.975145"], ["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-09-23 07:58:02.976467"], ["updated_at", "2022-09-23 07:58:02.976467"]] 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-09-23 07:58:02.977387"], ["updated_at", "2022-09-23 07:58:02.977387"]] TRANSACTION (0.1ms) 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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 07:58:02.709000"], ["updated_at", "2022-09-23 07:58:02.709000"], ["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-09-23 07:58:02.965000"], ["updated_at", "2022-09-23 07:58:02.965000"]] 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]] 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) 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]]  (6.5ms) 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", "2022-09-23 07:59:25.558201"], ["updated_at", "2022-09-23 07:59:25.558201"]] 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", "{}"], ["created_at", "2022-09-23 07:59:25.573248"]] 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":"2022-09-23T07:59:25.558Z","updated_at":"2022-09-23T07:59:25.558Z"}','2022-09-23 07:59:25.593356',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", "{}"], ["created_at", "2022-09-23 07:59:25.597793"]] 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":"2022-09-23T07:59:25.558Z","updated_at":"2022-09-23T07:59:25.558Z"}','2022-09-23 07:59:25.601144',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:59:25.558000"], ["updated_at", "2022-09-23 07:59:25.558000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_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.1ms) 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.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.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.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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 07:59:25.680384"]] 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":"2022-09-23T07:59:25.558Z","updated_at":"2022-09-23T07:59:25.558Z"}','2022-09-23 07:59:25.684007',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", "{}"], ["created_at", "2022-09-23 07:59:25.685922"]] 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":"2022-09-23T07:59:25.558Z","updated_at":"2022-09-23T07:59:25.558Z"}','2022-09-23 07:59:25.688529',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", "{}"], ["created_at", "2022-09-23 07:59:25.689862"]] 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":"2022-09-23T07:59:25.558Z","updated_at":"2022-09-23T07:59:25.558Z"}','2022-09-23 07:59:25.692134',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) 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.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-09-23 07:59:25.701106"], ["updated_at", "2022-09-23 07:59:25.701106"]] 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", "{}"], ["created_at", "2022-09-23 07:59:25.704427"]] 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":"2022-09-23T07:59:25.558Z","updated_at":"2022-09-23T07:59:25.558Z"}','2022-09-23 07:59:25.707554',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T07:59:25.701Z","updated_at":"2022-09-23T07:59:25.701Z"}','2022-09-23 07:59:25.707554','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-09-24 07:59:25.709062"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 07:59:25.709560"], ["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.1ms) 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-09-23 07:59:25.717773"], ["updated_at", "2022-09-23 07:59:25.717773"]] TRANSACTION (0.1ms) 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-09-23 07:59:25.726697"], ["updated_at", "2022-09-23 07:59:25.726697"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (7.8ms) 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.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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] Post Load (6.9ms) 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 07:59:25.558000"], ["updated_at", "2022-09-23 07:59:25.558000"], ["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-09-23 07:59:25.701000"], ["updated_at", "2022-09-23 07:59:25.701000"]] 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]] 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 ---------------------------------------------------- ConfigTest::storage_method: test_accepts_native_json ---------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------- ConfigTest::storage_method: test_accepts_serialized_yaml -------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------------------------------- ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods ----------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- ConfigTest::storage_method: test_converts_symbol_to_string ---------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------ ConfigTest::storage_method: test_defaults_to_serialized_json ------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------------- ConfigTest::storage_method: test_accepts_to_serialized_json ----------------------------------------------------------- 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_relationships -------------------------------- 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.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-23 07:59:25.787254"], ["updated_at", "2022-09-23 07:59:25.787254"]] 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", "{}"], ["created_at", "2022-09-23 07:59:25.790445"]] 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":"2022-09-23T07:59:25.787Z","updated_at":"2022-09-23T07:59:25.787Z"}','2022-09-23 07:59:25.791686',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-09-23 07:59:25.792446"], ["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.1ms) 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_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_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.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 07:59:25.558000"], ["updated_at", "2022-09-23 07:59:25.558000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-23 07:59:25.829591"], ["updated_at", "2022-09-23 07:59:25.829591"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-23 07:59:25.832357"], ["updated_at", "2022-09-23 07:59:25.832357"]] 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", "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", "{}"], ["created_at", "2022-09-23 07:59:25.835183"]] 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":"2022-09-23T07:59:25.829Z","updated_at":"2022-09-23T07:59:25.829Z"}','2022-09-23 07:59:25.839270',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T07:59:25.832Z","updated_at":"2022-09-23T07:59:25.832Z"}','2022-09-23 07:59:25.839270','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.5ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction  (1.0ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.4ms) 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.7ms) DELETE FROM posts;  (0.9ms) 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 Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:01:47.939351"], ["updated_at", "2022-09-23 08:01:47.939351"]] 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", "{}"], ["created_at", "2022-09-23 08:01:47.954384"]] TRANSACTION (0.9ms) 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":"2022-09-23T08:01:47.939Z","updated_at":"2022-09-23T08:01:47.939Z"}','2022-09-23 08:01:47.974100',NULL) TRANSACTION (0.8ms) 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", "{}"], ["created_at", "2022-09-23 08:01:47.978665"]] 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":"2022-09-23T08:01:47.939Z","updated_at":"2022-09-23T08:01:47.939Z"}','2022-09-23 08:01:47.982132',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:01:47.939000"], ["updated_at", "2022-09-23 08:01:47.939000"], ["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_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.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: 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 ---------------------------------------- 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:01:48.056099"]] 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.4ms) 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":"2022-09-23T08:01:47.939Z","updated_at":"2022-09-23T08:01:47.939Z"}','2022-09-23 08:01:48.059601',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", "{}"], ["created_at", "2022-09-23 08:01:48.062360"]] 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":"2022-09-23T08:01:47.939Z","updated_at":"2022-09-23T08:01:47.939Z"}','2022-09-23 08:01:48.065149',NULL) 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", "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", "{}"], ["created_at", "2022-09-23 08:01:48.067124"]] 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":"2022-09-23T08:01:47.939Z","updated_at":"2022-09-23T08:01:47.939Z"}','2022-09-23 08:01:48.069246',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_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 --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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_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 -------------------------- 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:01:47.939000"], ["updated_at", "2022-09-23 08:01:47.939000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-23 08:01:48.133931"], ["updated_at", "2022-09-23 08:01:48.133931"]] TRANSACTION (0.1ms) 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", "Example comment"], ["post_id", 2], ["created_at", "2022-09-23 08:01:48.153772"], ["updated_at", "2022-09-23 08:01:48.153772"]] 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", "{}"], ["created_at", "2022-09-23 08:01:48.156598"]] 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":"2022-09-23T08:01:48.133Z","updated_at":"2022-09-23T08:01:48.133Z"}','2022-09-23 08:01:48.160055',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:01:48.153Z","updated_at":"2022-09-23T08:01:48.153Z"}','2022-09-23 08:01:48.160055','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_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-09-23 08:01:48.170230"], ["updated_at", "2022-09-23 08:01:48.170230"]] 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2022-09-23 08:01:48.172644"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-23T08:01:48.170Z","updated_at":"2022-09-23T08:01:48.170Z"}','2022-09-23 08:01:48.174071',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-23 08:01:48.175131"], ["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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (1.2ms) 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-09-23 08:01:48.196085"], ["updated_at", "2022-09-23 08:01:48.196085"]] TRANSACTION (0.1ms) 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 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", "{}"], ["created_at", "2022-09-23 08:01:48.199785"]] 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":"2022-09-23T08:01:47.939Z","updated_at":"2022-09-23T08:01:47.939Z"}','2022-09-23 08:01:48.203782',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:01:48.196Z","updated_at":"2022-09-23T08:01:48.196Z"}','2022-09-23 08:01:48.203782','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-09-24 08:01:48.205076"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:01:48.205730"], ["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-09-23 08:01:48.207562"], ["updated_at", "2022-09-23 08:01:48.207562"]] 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-09-23 08:01:48.208470"], ["updated_at", "2022-09-23 08:01:48.208470"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:01:47.939000"], ["updated_at", "2022-09-23 08:01:47.939000"], ["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-09-23 08:01:48.196000"], ["updated_at", "2022-09-23 08:01:48.196000"]] 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" 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.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  (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.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (1.0ms) 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", "2022-09-23 08:02:53.627506"], ["updated_at", "2022-09-23 08:02:53.627506"]] 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", "{}"], ["created_at", "2022-09-23 08:02:53.642624"]] 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":"2022-09-23T08:02:53.627Z","updated_at":"2022-09-23T08:02:53.627Z"}','2022-09-23 08:02:53.662390',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", "{}"], ["created_at", "2022-09-23 08:02:53.666726"]] 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.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":"2022-09-23T08:02:53.627Z","updated_at":"2022-09-23T08:02:53.627Z"}','2022-09-23 08:02:53.670533',NULL) TRANSACTION (0.6ms) commit 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.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.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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:02:53.627000"], ["updated_at", "2022-09-23 08:02:53.627000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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-09-23 08:02:53.724530"], ["updated_at", "2022-09-23 08:02:53.724530"]] 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", "Example comment"], ["post_id", 2], ["created_at", "2022-09-23 08:02:53.728242"], ["updated_at", "2022-09-23 08:02:53.728242"]] 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", "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", "{}"], ["created_at", "2022-09-23 08:02:53.731326"]] 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":"2022-09-23T08:02:53.724Z","updated_at":"2022-09-23T08:02:53.724Z"}','2022-09-23 08:02:53.735739',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:02:53.728Z","updated_at":"2022-09-23T08:02:53.728Z"}','2022-09-23 08:02:53.735739','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.4ms) 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.3ms) 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_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-09-23 08:02:53.754936"], ["updated_at", "2022-09-23 08:02:53.754936"]] 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", "{}"], ["created_at", "2022-09-23 08:02:53.757815"]] 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":"2022-09-23T08:02:53.754Z","updated_at":"2022-09-23T08:02:53.754Z"}','2022-09-23 08:02:53.759059',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ParentWithoutChildren Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-23 08:02:53.759823"], ["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.1ms) 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.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.8ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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.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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:02:53.789628"]] 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":"2022-09-23T08:02:53.627Z","updated_at":"2022-09-23T08:02:53.627Z"}','2022-09-23 08:02:53.792580',NULL) 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", "foobar 2"], ["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", "foobar 2"], ["metadata", "{}"], ["created_at", "2022-09-23 08:02:53.794573"]] 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 (9.3ms) 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.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":"2022-09-23T08:02:53.627Z","updated_at":"2022-09-23T08:02:53.627Z"}','2022-09-23 08:02:53.824440',NULL) 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", "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", "{}"], ["created_at", "2022-09-23 08:02:53.836630"]] 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.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.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":"2022-09-23T08:02:53.627Z","updated_at":"2022-09-23T08:02:53.627Z"}','2022-09-23 08:02:53.864217',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 ------------------------------------------------ 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 ----------------------------------------------- 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", "2022-09-23 08:02:53.883176"], ["updated_at", "2022-09-23 08:02:53.883176"]] 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", "{}"], ["created_at", "2022-09-23 08:02:53.886446"]] 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.1ms) 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":"2022-09-23T08:02:53.627Z","updated_at":"2022-09-23T08:02:53.627Z"}','2022-09-23 08:02:53.890219',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:02:53.883Z","updated_at":"2022-09-23T08:02:53.883Z"}','2022-09-23 08:02:53.890219','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-09-24 08:02:53.891502"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:02:53.892036"], ["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-09-23 08:02:53.893446"], ["updated_at", "2022-09-23 08:02:53.893446"]] 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-09-23 08:02:53.894233"], ["updated_at", "2022-09-23 08:02:53.894233"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.2ms) 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.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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:02:53.627000"], ["updated_at", "2022-09-23 08:02:53.627000"], ["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-09-23 08:02:53.883000"], ["updated_at", "2022-09-23 08:02:53.883000"]] 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" 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.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_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.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.0ms) SAVEPOINT active_record_1 Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:02:53.627000"], ["updated_at", "2022-09-23 08:02:53.627000"], ["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  (1.0ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.4ms) 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.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", "2022-09-23 08:05:24.583791"], ["updated_at", "2022-09-23 08:05:24.583791"]] TRANSACTION (0.7ms) commit 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]]  (0.9ms) DELETE FROM posts;  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.8ms) DELETE FROM snapshots;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (1.0ms) 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-09-23 08:07:09.428366"], ["updated_at", "2022-09-23 08:07:09.428366"]] 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", "created_at") VALUES (?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["created_at", "2022-09-23 08:07:09.443439"]] 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,NULL,'2022-09-23 08:07:09.463101',NULL) TRANSACTION (0.0ms) rollback transaction  (1.0ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.4ms) 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.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-09-23 08:07:44.365402"], ["updated_at", "2022-09-23 08:07:44.365402"]] TRANSACTION (0.7ms) commit transaction 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", "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", "{}"], ["created_at", "2022-09-23 08:07:44.380807"]] 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":"2022-09-23T08:07:44.365Z","updated_at":"2022-09-23T08:07:44.365Z"}','2022-09-23 08:07:44.400662',NULL) TRANSACTION (0.6ms) 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2022-09-23 08:07:44.405034"]] 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.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":"2022-09-23T08:07:44.365Z","updated_at":"2022-09-23T08:07:44.365Z"}','2022-09-23 08:07:44.408512',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.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_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_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-09-23 08:07:44.469646"], ["updated_at", "2022-09-23 08:07:44.469646"]] TRANSACTION (0.0ms) 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-09-23 08:07:44.474581"], ["updated_at", "2022-09-23 08:07:44.474581"]] TRANSACTION (0.2ms) 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", "{}"], ["created_at", "2022-09-23 08:07:44.477234"]] 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":"2022-09-23T08:07:44.469Z","updated_at":"2022-09-23T08:07:44.469Z"}','2022-09-23 08:07:44.480491',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:07:44.474Z","updated_at":"2022-09-23T08:07:44.474Z"}','2022-09-23 08:07:44.480491','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_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-09-23 08:07:44.487529"], ["updated_at", "2022-09-23 08:07:44.487529"]] 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", "{}"], ["created_at", "2022-09-23 08:07:44.491259"]] 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":"2022-09-23T08:07:44.487Z","updated_at":"2022-09-23T08:07:44.487Z"}','2022-09-23 08:07:44.492615',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-09-23 08:07:44.493409"], ["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.5ms) rollback transaction TRANSACTION (0.1ms) 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.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]] 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:07:44.365000"], ["updated_at", "2022-09-23 08:07:44.365000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- 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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-23 08:07:44.527492"], ["updated_at", "2022-09-23 08:07:44.527492"]] 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", "{}"], ["created_at", "2022-09-23 08:07:44.531286"]] 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.1ms) 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":"2022-09-23T08:07:44.365Z","updated_at":"2022-09-23T08:07:44.365Z"}','2022-09-23 08:07:44.536034',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:07:44.527Z","updated_at":"2022-09-23T08:07:44.527Z"}','2022-09-23 08:07:44.536034','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-09-24 08:07:44.537611"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:07:44.547557"], ["id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] 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", "foo"], ["post_id", 1], ["created_at", "2022-09-23 08:07:44.559992"], ["updated_at", "2022-09-23 08:07:44.559992"]] 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", "2022-09-23 08:07:44.572352"], ["updated_at", "2022-09-23 08:07:44.572352"]] 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.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]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:07:44.365000"], ["updated_at", "2022-09-23 08:07:44.365000"], ["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-09-23 08:07:44.527000"], ["updated_at", "2022-09-23 08:07:44.527000"]] 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]] 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.8ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- 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.1ms) 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:07:44.624980"]] 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":"2022-09-23T08:07:44.365Z","updated_at":"2022-09-23T08:07:44.365Z"}','2022-09-23 08:07:44.628538',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", "{}"], ["created_at", "2022-09-23 08:07:44.630150"]] 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":"2022-09-23T08:07:44.365Z","updated_at":"2022-09-23T08:07:44.365Z"}','2022-09-23 08:07:44.632613',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", "{}"], ["created_at", "2022-09-23 08:07:44.634306"]] 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":"2022-09-23T08:07:44.365Z","updated_at":"2022-09-23T08:07:44.365Z"}','2022-09-23 08:07:44.637958',NULL) 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", "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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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_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.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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:07:44.365000"], ["updated_at", "2022-09-23 08:07:44.365000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- 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.9ms) DELETE FROM snapshots;  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (1.0ms) DELETE FROM 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:08:13.146736"], ["updated_at", "2022-09-23 08:08:13.146736"]] 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", "{}"], ["created_at", "2022-09-23 08:08:13.162386"]] TRANSACTION (1.0ms) 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":"2022-09-23T08:08:13.146Z","updated_at":"2022-09-23T08:08:13.146Z"}','2022-09-23 08:08:13.182063',NULL) TRANSACTION (0.6ms) commit transaction Post Update (0.9ms) 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", "{}"], ["created_at", "2022-09-23 08:08:13.186612"]] 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.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":"2022-09-23T08:08:13.146Z","updated_at":"2022-09-23T08:08:13.146Z"}','2022-09-23 08:08:13.189853',NULL) TRANSACTION (0.6ms) 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.2ms) 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-09-23 08:08:13.237750"], ["updated_at", "2022-09-23 08:08:13.237750"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "{}"], ["created_at", "2022-09-23 08:08:13.240458"]] 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":"2022-09-23T08:08:13.146Z","updated_at":"2022-09-23T08:08:13.146Z"}','2022-09-23 08:08:13.243818',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:08:13.237Z","updated_at":"2022-09-23T08:08:13.237Z"}','2022-09-23 08:08:13.243818','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-09-24 08:08:13.244996"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:08:13.245690"], ["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", "2022-09-23 08:08:13.246849"], ["updated_at", "2022-09-23 08:08:13.246849"]] 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-09-23 08:08:13.247645"], ["updated_at", "2022-09-23 08:08:13.247645"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:08:13.146000"], ["updated_at", "2022-09-23 08:08:13.146000"], ["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-09-23 08:08:13.237000"], ["updated_at", "2022-09-23 08:08:13.237000"]] 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]] 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 ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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.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::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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:08:13.146000"], ["updated_at", "2022-09-23 08:08:13.146000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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 ------------------------------------------------ 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.1ms) 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:08:13.307750"]] 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.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.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":"2022-09-23T08:08:13.146Z","updated_at":"2022-09-23T08:08:13.146Z"}','2022-09-23 08:08:13.340133',NULL) 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", "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", "{}"], ["created_at", "2022-09-23 08:08:13.357864"]] 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":"2022-09-23T08:08:13.146Z","updated_at":"2022-09-23T08:08:13.146Z"}','2022-09-23 08:08:13.360707',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", "{}"], ["created_at", "2022-09-23 08:08:13.362473"]] 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":"2022-09-23T08:08:13.146Z","updated_at":"2022-09-23T08:08:13.146Z"}','2022-09-23 08:08:13.364466',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 ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-23 08:08:13.374571"], ["updated_at", "2022-09-23 08:08:13.374571"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-23 08:08:13.376167"], ["updated_at", "2022-09-23 08:08:13.376167"]] 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", "{}"], ["created_at", "2022-09-23 08:08:13.378434"]] 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":"2022-09-23T08:08:13.374Z","updated_at":"2022-09-23T08:08:13.374Z"}','2022-09-23 08:08:13.381517',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:08:13.376Z","updated_at":"2022-09-23T08:08:13.376Z"}','2022-09-23 08:08:13.381517','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.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_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-09-23 08:08:13.391636"], ["updated_at", "2022-09-23 08:08:13.391636"]] 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", "{}"], ["created_at", "2022-09-23 08:08:13.394552"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-23T08:08:13.391Z","updated_at":"2022-09-23T08:08:13.391Z"}','2022-09-23 08:08:13.396073',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-09-23 08:08:13.397057"], ["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_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]] 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", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:08:13.146000"], ["updated_at", "2022-09-23 08:08:13.146000"], ["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.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  (1.0ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.4ms) 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;  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (1.0ms) DELETE FROM snapshots;  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (0.8ms) DELETE FROM snapshot_items;  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:08:40.912396"], ["updated_at", "2022-09-23 08:08:40.912396"]] TRANSACTION (0.8ms) 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", "{}"], ["created_at", "2022-09-23 08:08:40.928363"]] 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":"2022-09-23T08:08:40.912Z","updated_at":"2022-09-23T08:08:40.912Z"}','2022-09-23 08:08:40.948514',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", "{}"], ["created_at", "2022-09-23 08:08:40.952819"]] 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":"2022-09-23T08:08:40.912Z","updated_at":"2022-09-23T08:08:40.912Z"}','2022-09-23 08:08:40.956626',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) 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 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:08:41.009562"]] 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":"2022-09-23T08:08:40.912Z","updated_at":"2022-09-23T08:08:40.912Z"}','2022-09-23 08:08:41.012592',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", "{}"], ["created_at", "2022-09-23 08:08:41.014312"]] 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.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":"2022-09-23T08:08:40.912Z","updated_at":"2022-09-23T08:08:40.912Z"}','2022-09-23 08:08:41.017176',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", "{}"], ["created_at", "2022-09-23 08:08:41.019479"]] 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":"2022-09-23T08:08:40.912Z","updated_at":"2022-09-23T08:08:40.912Z"}','2022-09-23 08:08:41.022306',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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.3ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-23 08:08:41.032616"], ["updated_at", "2022-09-23 08:08:41.032616"]] TRANSACTION (0.1ms) 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 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", "{}"], ["created_at", "2022-09-23 08:08:41.036905"]] 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.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.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":"2022-09-23T08:08:40.912Z","updated_at":"2022-09-23T08:08:40.912Z"}','2022-09-23 08:08:41.040469',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:08:41.032Z","updated_at":"2022-09-23T08:08:41.032Z"}','2022-09-23 08:08:41.040469','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-24 08:08:41.041869"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:08:41.042378"], ["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-09-23 08:08:41.043774"], ["updated_at", "2022-09-23 08:08:41.043774"]] 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-09-23 08:08:41.044724"], ["updated_at", "2022-09-23 08:08:41.044724"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:08:40.912000"], ["updated_at", "2022-09-23 08:08:40.912000"], ["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-09-23 08:08:41.032000"], ["updated_at", "2022-09-23 08:08:41.032000"]] 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]] 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 -------------------------------------------- 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.2ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:08:40.912000"], ["updated_at", "2022-09-23 08:08:40.912000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_validations ---------------------------------- 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.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::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 --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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_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_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.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:08:40.912000"], ["updated_at", "2022-09-23 08:08:40.912000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.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-09-23 08:08:41.146742"], ["updated_at", "2022-09-23 08:08:41.146742"]] 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-09-23 08:08:41.148312"], ["updated_at", "2022-09-23 08:08:41.148312"]] 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", "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", "{}"], ["created_at", "2022-09-23 08:08:41.151207"]] 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":"2022-09-23T08:08:41.146Z","updated_at":"2022-09-23T08:08:41.146Z"}','2022-09-23 08:08:41.155239',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:08:41.148Z","updated_at":"2022-09-23T08:08:41.148Z"}','2022-09-23 08:08:41.155239','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_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.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-09-23 08:08:41.162681"], ["updated_at", "2022-09-23 08:08:41.162681"]] 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", "{}"], ["created_at", "2022-09-23 08:08:41.165683"]] TRANSACTION (0.1ms) 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":"2022-09-23T08:08:41.162Z","updated_at":"2022-09-23T08:08:41.162Z"}','2022-09-23 08:08:41.167791',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-09-23 08:08:41.169121"], ["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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction  (1.5ms) 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]]  (1.0ms) DELETE FROM posts;  (1.0ms) 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.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", "2022-09-23 08:10:47.495132"], ["updated_at", "2022-09-23 08:10:47.495132"]] 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", "{}"], ["created_at", "2022-09-23 08:10:47.511006"]] 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.2ms) 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":"2022-09-23T08:10:47.495Z","updated_at":"2022-09-23T08:10:47.495Z"}','2022-09-23 08:10:47.538665',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", "{}"], ["created_at", "2022-09-23 08:10:47.542946"]] 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]] 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":"2022-09-23T08:10:47.495Z","updated_at":"2022-09-23T08:10:47.495Z"}','2022-09-23 08:10:47.546934',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.4ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_build_snapshot_item -------------------------------------- ActiveSnapshot::Snapshot Load (0.3ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_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.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_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-09-23 08:10:47.607756"], ["updated_at", "2022-09-23 08:10:47.607756"]] 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-09-23 08:10:47.611510"], ["updated_at", "2022-09-23 08:10:47.611510"]] 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", "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", "{}"], ["created_at", "2022-09-23 08:10:47.613710"]] 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":"2022-09-23T08:10:47.607Z","updated_at":"2022-09-23T08:10:47.607Z"}','2022-09-23 08:10:47.617642',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:10:47.611Z","updated_at":"2022-09-23T08:10:47.611Z"}','2022-09-23 08:10:47.617642','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_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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:10:47.495000"], ["updated_at", "2022-09-23 08:10:47.495000"], ["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.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-09-23 08:10:47.681595"], ["updated_at", "2022-09-23 08:10:47.681595"]] 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", "{}"], ["created_at", "2022-09-23 08:10:47.691513"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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":"2022-09-23T08:10:47.681Z","updated_at":"2022-09-23T08:10:47.681Z"}','2022-09-23 08:10:47.692743',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-09-23 08:10:47.693768"], ["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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-23 08:10:47.715759"], ["updated_at", "2022-09-23 08:10:47.715759"]] 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 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", "{}"], ["created_at", "2022-09-23 08:10:47.720495"]] 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":"2022-09-23T08:10:47.495Z","updated_at":"2022-09-23T08:10:47.495Z"}','2022-09-23 08:10:47.724639',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:10:47.715Z","updated_at":"2022-09-23T08:10:47.715Z"}','2022-09-23 08:10:47.724639','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-09-24 08:10:47.726029"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:10:47.726660"], ["id", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] TRANSACTION (0.9ms) 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-09-23 08:10:47.729029"], ["updated_at", "2022-09-23 08:10:47.729029"]] 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-09-23 08:10:47.730092"], ["updated_at", "2022-09-23 08:10:47.730092"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] Post Load (0.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:10:47.495000"], ["updated_at", "2022-09-23 08:10:47.495000"], ["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-09-23 08:10:47.715000"], ["updated_at", "2022-09-23 08:10:47.715000"]] 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" 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.2ms) 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 ---------------------------------------- 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 ------------------------------------------- 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", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:10:47.746699"]] 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.1ms) 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":"2022-09-23T08:10:47.495Z","updated_at":"2022-09-23T08:10:47.495Z"}','2022-09-23 08:10:47.750514',NULL) TRANSACTION (0.1ms) 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", "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", "{}"], ["created_at", "2022-09-23 08:10:47.752923"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.4ms) 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":"2022-09-23T08:10:47.495Z","updated_at":"2022-09-23T08:10:47.495Z"}','2022-09-23 08:10:47.756139',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", "{}"], ["created_at", "2022-09-23 08:10:47.757677"]] 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.1ms) 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":"2022-09-23T08:10:47.495Z","updated_at":"2022-09-23T08:10:47.495Z"}','2022-09-23 08:10:47.760214',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.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 --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:10:47.495000"], ["updated_at", "2022-09-23 08:10:47.495000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.1ms) 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.2ms) 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.4ms) 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.4ms) DELETE FROM posts;  (0.8ms) 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.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.1ms) begin transaction Post Create (0.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:25:26.308867"], ["updated_at", "2022-09-23 08:25:26.308867"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.333628"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.354077',NULL) TRANSACTION (0.7ms) commit transaction Post Update (0.9ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.358830"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.362720',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.0ms) rollback transaction TRANSACTION (0.3ms) 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.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::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.1ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:25:26.308000"], ["updated_at", "2022-09-23 08:25:26.308000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.7ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- 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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.2ms) 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_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-23 08:25:26.308000"], ["updated_at", "2022-09-23 08:25:26.308000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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-09-23 08:25:26.503774"], ["updated_at", "2022-09-23 08:25:26.503774"]] TRANSACTION (0.0ms) 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-09-23 08:25:26.508075"], ["updated_at", "2022-09-23 08:25:26.508075"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.511057"]] 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":"2022-09-23T08:25:26.503Z","updated_at":"2022-09-23T08:25:26.503Z"}','2022-09-23 08:25:26.514463',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-23T08:25:26.508Z","updated_at":"2022-09-23T08:25:26.508Z"}','2022-09-23 08:25:26.514463','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.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) 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.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-09-23 08:25:26.526126"], ["updated_at", "2022-09-23 08:25:26.526126"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.529389"]] TRANSACTION (0.0ms) RELEASE 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,3,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-23T08:25:26.526Z","updated_at":"2022-09-23T08:25:26.526Z"}','2022-09-23 08:25:26.530642',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-09-23 08:25:26.531526"], ["id", 2]] TRANSACTION (0.1ms) 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_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.2ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-23 08:25:26.564558"]] 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.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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.568419',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 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.571495"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.574146',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.575979"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.578730',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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.595703"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.598783',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.603508"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.607302',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.608824"]] 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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.611882',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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 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-09-23 08:25:26.626096"], ["updated_at", "2022-09-23 08:25:26.626096"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-23 08:25:26.629491"]] 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.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.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":"2022-09-23T08:25:26.308Z","updated_at":"2022-09-23T08:25:26.308Z"}','2022-09-23 08:25:26.633725',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-23T08:25:26.626Z","updated_at":"2022-09-23T08:25:26.626Z"}','2022-09-23 08:25:26.633725','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-09-24 08:25:26.635453"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-24 08:25:26.636264"], ["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-09-23 08:25:26.637967"], ["updated_at", "2022-09-23 08:25:26.637967"]] 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-09-23 08:25:26.638919"], ["updated_at", "2022-09-23 08:25:26.638919"]] 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.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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-23 08:25:26.308000"], ["updated_at", "2022-09-23 08:25:26.308000"], ["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-09-23 08:25:26.626000"], ["updated_at", "2022-09-23 08:25:26.626000"]] 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]] CACHE 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.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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) rollback transaction  (1.7ms) 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.8ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]  (2.5ms) DELETE FROM posts;  (1.6ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (2.9ms) DELETE FROM snapshots;  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (2.9ms) DELETE FROM snapshot_items;  (110.6ms) 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-09-27 02:39:10.634502"], ["updated_at", "2022-09-27 02:39:10.634502"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.662060"]] TRANSACTION (0.7ms) commit transaction Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.4ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.5ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]  (0.1ms) SELECT sqlite_version(*) TRANSACTION (0.0ms) begin transaction ActiveSnapshot::SnapshotItem Create Many (0.4ms) 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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.688182',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.692966"]] 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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.696515',NULL) TRANSACTION (0.6ms) commit 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-09-27 02:39:10.763769"], ["updated_at", "2022-09-27 02:39:10.763769"]] 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.766515"]] 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":"2022-09-27T02:39:10.763Z","updated_at":"2022-09-27T02:39:10.763Z"}','2022-09-27 02:39:10.767711',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-09-27 02:39:10.768561"], ["id", 2]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-27 02:39:10.634000"], ["updated_at", "2022-09-27 02:39:10.634000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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_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-09-27 02:39:10.870009"], ["updated_at", "2022-09-27 02:39:10.870009"]] TRANSACTION (0.0ms) 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-09-27 02:39:10.875940"], ["updated_at", "2022-09-27 02:39:10.875940"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.878765"]] 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":"2022-09-27T02:39:10.870Z","updated_at":"2022-09-27T02:39:10.870Z"}','2022-09-27 02:39:10.882352',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-27T02:39:10.875Z","updated_at":"2022-09-27T02:39:10.875Z"}','2022-09-27 02:39:10.882352','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_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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) 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" = ? 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.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-27 02:39:10.634000"], ["updated_at", "2022-09-27 02:39:10.634000"], ["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_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 ------------------------------------------- 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-09-27 02:39:10.930693"], ["updated_at", "2022-09-27 02:39:10.930693"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.933767"]] 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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.936919',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-27T02:39:10.930Z","updated_at":"2022-09-27T02:39:10.930Z"}','2022-09-27 02:39:10.936919','comments') TRANSACTION (0.1ms) 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-09-28 02:39:10.938915"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-28 02:39:10.939619"], ["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-09-27 02:39:10.941142"], ["updated_at", "2022-09-27 02:39:10.941142"]] 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-09-27 02:39:10.942192"], ["updated_at", "2022-09-27 02:39:10.942192"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-27 02:39:10.634000"], ["updated_at", "2022-09-27 02:39:10.634000"], ["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-09-27 02:39:10.930000"], ["updated_at", "2022-09-27 02:39:10.930000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.965440"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.968600',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.969676"]] 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.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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.973380',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-27 02:39:10.978636"]] 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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.981370',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.982910"]] 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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.985022',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:10.986477"]] 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.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":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:10.989676',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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-27 02:39:11.010339"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-27T02:39:10.634Z","updated_at":"2022-09-27T02:39:10.634Z"}','2022-09-27 02:39:11.013525',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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]]  (6.6ms) DELETE FROM posts;  (1.6ms) 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;  (1.5ms) 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-09-27 02:40:00.908683"], ["updated_at", "2022-09-27 02:40:00.908683"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:00.931447"]] 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-09-27 02:40:00.908683000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:00.951133',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:00.955430"]] 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-09-27 02:40:00.908683000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:00.959291',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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.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-09-27 02:40:01.000558"], ["updated_at", "2022-09-27 02:40:01.000558"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.003620"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.006690',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:01.000558000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:01.000558000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:01.000558000 Z zone: *1 time: 2022-09-27 02:40:01.000558000 Z ','2022-09-27 02:40:01.006690','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-28 02:40:01.007980"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-28 02:40:01.016798"], ["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", "2022-09-27 02:40:01.027250"], ["updated_at", "2022-09-27 02:40:01.027250"]] 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", "2022-09-27 02:40:01.038188"], ["updated_at", "2022-09-27 02:40:01.038188"]] 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.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.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.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-09-27 02:40:00.908683"], ["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-09-27 02:40:01.000558"], ["updated_at", "2022-09-27 02:40:01.000558"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (5.8ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) 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-09-27 02:40:01.085229"], ["updated_at", "2022-09-27 02:40:01.085229"]] TRANSACTION (0.2ms) 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-09-27 02:40:01.087412"], ["updated_at", "2022-09-27 02:40:01.087412"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.089362"]] 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: &1 2022-09-27 02:40:01.085229000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:01.085229000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-27 02:40:01.085229000 Z ','2022-09-27 02:40:01.093448',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:01.087412000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:01.087412000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:01.087412000 Z zone: *1 time: 2022-09-27 02:40:01.087412000 Z ','2022-09-27 02:40:01.093448','comments') TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Load (0.3ms) 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 --------------------------- 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_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" = ? 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.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]] CACHE 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.1ms) SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (1.2ms) 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-09-27 02:40:01.120556"], ["updated_at", "2022-09-27 02:40:01.120556"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.123595"]] 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-09-27 02:40:01.120556000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:01.120556000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-27 02:40:01.120556000 Z ','2022-09-27 02:40:01.124974',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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-09-27 02:40:01.126095"], ["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_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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]] TRANSACTION (0.1ms) 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", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-09-27 02:40:01.144704"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.148465',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.150272"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.153034',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.154593"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.157083',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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.163959"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.167045',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.168059"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.170662',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-27 02:40:01.183760"]] 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-09-27 02:40:00.908683000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-27 02:40:00.908683000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-27 02:40:00.908683000 Z zone: *1 time: 2022-09-27 02:40:00.908683000 Z ','2022-09-27 02:40:01.186858',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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.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.8ms) 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  (1.4ms) 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]]  (2.4ms) 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.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", "2022-09-29 06:11:09.021282"], ["updated_at", "2022-09-29 06:11:09.021282"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.044562"]] 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.6ms) 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.064343',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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.068727"]] 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.072310',NULL) TRANSACTION (0.6ms) commit 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_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 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:11:09.021000"], ["updated_at", "2022-09-29 06:11:09.021000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (157.1ms) 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-09-29 06:11:09.310581"], ["updated_at", "2022-09-29 06:11:09.310581"]] TRANSACTION (0.0ms) 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-09-29 06:11:09.342574"], ["updated_at", "2022-09-29 06:11:09.342574"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.345072"]] 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.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":"2022-09-29T06:11:09.310Z","updated_at":"2022-09-29T06:11:09.310Z"}','2022-09-29 06:11:09.348213',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:11:09.342Z","updated_at":"2022-09-29T06:11:09.342Z"}','2022-09-29 06:11:09.348213','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.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.3ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? 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.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-09-29 06:11:09.363659"], ["updated_at", "2022-09-29 06:11:09.363659"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.366898"]] 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":"2022-09-29T06:11:09.363Z","updated_at":"2022-09-29T06:11:09.363Z"}','2022-09-29 06:11:09.368747',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-09-29 06:11:09.369601"], ["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_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.407149"]] 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.411642',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.412835"]] 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.416521',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.439405"]] 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.442508',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_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.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:11:09.448115"]] 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.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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.453055',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.455022"]] 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.457718',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.459281"]] 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.461488',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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:11:09.021000"], ["updated_at", "2022-09-29 06:11:09.021000"], ["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_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.1ms) 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.4ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:11:09.485574"], ["updated_at", "2022-09-29 06:11:09.485574"]] 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:11:09.488937"]] 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.1ms) 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":"2022-09-29T06:11:09.021Z","updated_at":"2022-09-29T06:11:09.021Z"}','2022-09-29 06:11:09.492263',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:11:09.485Z","updated_at":"2022-09-29T06:11:09.485Z"}','2022-09-29 06:11:09.492263','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-09-30 06:11:09.493527"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:11:09.494112"], ["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-09-29 06:11:09.495398"], ["updated_at", "2022-09-29 06:11:09.495398"]] 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-09-29 06:11:09.496312"], ["updated_at", "2022-09-29 06:11:09.496312"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items" TRANSACTION (0.1ms) 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]] 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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:11:09.021000"], ["updated_at", "2022-09-29 06:11:09.021000"], ["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-09-29 06:11:09.485000"], ["updated_at", "2022-09-29 06:11:09.485000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- 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.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]]  (6.8ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:14:00.454662"], ["updated_at", "2022-09-29 06:14:00.454662"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:00.478099"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:00.497610',NULL) TRANSACTION (0.8ms) commit transaction Post Update (0.9ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:00.502400"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:00.506042',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 --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- 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.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-09-29 06:14:00.592291"], ["updated_at", "2022-09-29 06:14:00.592291"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (8.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:00.619451"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:00.622761',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:14:00.592Z","updated_at":"2022-09-29T06:14:00.592Z"}','2022-09-29 06:14:00.622761','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-09-30 06:14:00.623955"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:14:00.624429"], ["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-09-29 06:14:00.625751"], ["updated_at", "2022-09-29 06:14:00.625751"]] 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-09-29 06:14:00.626555"], ["updated_at", "2022-09-29 06:14:00.626555"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:14:00.454000"], ["updated_at", "2022-09-29 06:14:00.454000"], ["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-09-29 06:14:00.592000"], ["updated_at", "2022-09-29 06:14:00.592000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (152.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) 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" = ? 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_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]] CACHE 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:14:00.454000"], ["updated_at", "2022-09-29 06:14:00.454000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-29 06:14:00.805784"], ["updated_at", "2022-09-29 06:14:00.805784"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-29 06:14:00.807344"], ["updated_at", "2022-09-29 06:14:00.807344"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:00.810540"]] 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":"2022-09-29T06:14:00.805Z","updated_at":"2022-09-29T06:14:00.805Z"}','2022-09-29 06:14:00.814467',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:14:00.807Z","updated_at":"2022-09-29T06:14:00.807Z"}','2022-09-29 06:14:00.814467','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_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]] CACHE 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_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_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-09-29 06:14:00.825938"], ["updated_at", "2022-09-29 06:14:00.825938"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:00.829125"]] 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":"2022-09-29T06:14:00.825Z","updated_at":"2022-09-29T06:14:00.825Z"}','2022-09-29 06:14:00.830805',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-09-29 06:14:00.831653"], ["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_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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:14:00.454000"], ["updated_at", "2022-09-29 06:14:00.454000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (5.8ms) 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.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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:28.784385"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:28.787576',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:28.791463"]] 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.1ms) 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:28.795778',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:28.797079"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:28.799800',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:14:28.803282"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:28.806308',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:28.808293"]] 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.2ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:28.811992',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:14:28.814006"]] 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":"2022-09-29T06:14:00.454Z","updated_at":"2022-09-29T06:14:00.454Z"}','2022-09-29 06:14:28.816542',NULL) 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", "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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] 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]]  (6.7ms) 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 Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:15:48.443444"], ["updated_at", "2022-09-29 06:15:48.443444"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:48.466984"]] 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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:48.487042',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:48.491619"]] 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.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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:48.495021',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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-09-29 06:15:48.536639"], ["updated_at", "2022-09-29 06:15:48.536639"]] 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-09-29 06:15:48.540489"], ["updated_at", "2022-09-29 06:15:48.540489"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:48.542518"]] 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.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":"2022-09-29T06:15:48.536Z","updated_at":"2022-09-29T06:15:48.536Z"}','2022-09-29 06:15:48.579315',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:15:48.540Z","updated_at":"2022-09-29T06:15:48.540Z"}','2022-09-29 06:15:48.579315','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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 (8.5ms) 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.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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:15:48.443000"], ["updated_at", "2022-09-29 06:15:48.443000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-29 06:15:48.629527"], ["updated_at", "2022-09-29 06:15:48.629527"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:48.632742"]] 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":"2022-09-29T06:15:48.629Z","updated_at":"2022-09-29T06:15:48.629Z"}','2022-09-29 06:15:48.634648',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ParentWithoutChildren Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-29 06:15:48.635472"], ["id", 2]] TRANSACTION (0.1ms) 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.5ms) 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" = ? 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.1ms) rollback transaction TRANSACTION (0.0ms) 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.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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 ------------------------------------------- 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-09-29 06:15:50.393981"], ["updated_at", "2022-09-29 06:15:50.393981"]] 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.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:50.397834"]] 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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.400933',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:15:50.393Z","updated_at":"2022-09-29T06:15:50.393Z"}','2022-09-29 06:15:50.400933','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-30 06:15:50.402264"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:15:50.402925"], ["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-09-29 06:15:50.404562"], ["updated_at", "2022-09-29 06:15:50.404562"]] 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-09-29 06:15:50.405660"], ["updated_at", "2022-09-29 06:15:50.405660"]] TRANSACTION (0.1ms) 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.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.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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:15:48.443000"], ["updated_at", "2022-09-29 06:15:48.443000"], ["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-09-29 06:15:50.393000"], ["updated_at", "2022-09-29 06:15:50.393000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (153.3ms) rollback 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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:50.586428"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.590229',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:50.591630"]] 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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.595364',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:15:50.599063"]] 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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.601693',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:50.603207"]] 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.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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.606146',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:50.607832"]] 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.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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.611444',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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:15:50.634383"]] 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.1ms) 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":"2022-09-29T06:15:48.443Z","updated_at":"2022-09-29T06:15:48.443Z"}','2022-09-29 06:15:50.637457',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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.2ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:15:48.443000"], ["updated_at", "2022-09-29 06:15:48.443000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_relationships ------------------------------------ TRANSACTION (0.0ms) 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]]  (6.6ms) DELETE FROM posts;  (1.1ms) 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.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", "2022-09-29 06:17:06.916384"], ["updated_at", "2022-09-29 06:17:06.916384"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:06.940285"]] 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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:06.959800',NULL) TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:06.964413"]] 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.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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:06.967857',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 -------------------------------------- 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_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-09-29 06:17:07.035202"], ["updated_at", "2022-09-29 06:17:07.035202"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (9.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.066182"]] 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":"2022-09-29T06:17:07.035Z","updated_at":"2022-09-29T06:17:07.035Z"}','2022-09-29 06:17:07.082556',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-09-29 06:17:07.083655"], ["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 (153.7ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:17:06.916000"], ["updated_at", "2022-09-29 06:17:06.916000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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]] CACHE 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_relationships -------------------------------- 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.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.8ms) 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-09-29 06:17:07.292664"], ["updated_at", "2022-09-29 06:17:07.292664"]] 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-09-29 06:17:07.298602"], ["updated_at", "2022-09-29 06:17:07.298602"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.302292"]] 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.3ms) 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":"2022-09-29T06:17:07.292Z","updated_at":"2022-09-29T06:17:07.292Z"}','2022-09-29 06:17:07.307759',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:17:07.298Z","updated_at":"2022-09-29T06:17:07.298Z"}','2022-09-29 06:17:07.307759','comments') TRANSACTION (0.1ms) 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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.315285"]] 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.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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.320791',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.322675"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.326887',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.350136"]] 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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.353931',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.5ms) 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:17:07.358398"]] 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.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.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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.362138',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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.364445"]] 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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.368075',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.369937"]] 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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.372818',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_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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:17:06.916000"], ["updated_at", "2022-09-29 06:17:06.916000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_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_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) 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-09-29 06:17:07.395157"], ["updated_at", "2022-09-29 06:17:07.395157"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:17:07.398290"]] 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.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":"2022-09-29T06:17:06.916Z","updated_at":"2022-09-29T06:17:06.916Z"}','2022-09-29 06:17:07.401979',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:17:07.395Z","updated_at":"2022-09-29T06:17:07.395Z"}','2022-09-29 06:17:07.401979','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-09-30 06:17:07.403344"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:17:07.403931"], ["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-09-29 06:17:07.405280"], ["updated_at", "2022-09-29 06:17:07.405280"]] 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", "2022-09-29 06:17:07.406215"], ["updated_at", "2022-09-29 06:17:07.406215"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:17:06.916000"], ["updated_at", "2022-09-29 06:17:06.916000"], ["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-09-29 06:17:07.395000"], ["updated_at", "2022-09-29 06:17:07.395000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction  (1.4ms) 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.7ms) 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';  (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", "2022-09-29 06:18:48.695342"], ["updated_at", "2022-09-29 06:18:48.695342"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.718421"]] 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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:48.738589',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.742828"]] 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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:48.746497',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) 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" = ? 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.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-09-29 06:18:48.842640"], ["updated_at", "2022-09-29 06:18:48.842640"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.853535"]] 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":"2022-09-29T06:18:48.842Z","updated_at":"2022-09-29T06:18:48.842Z"}','2022-09-29 06:18:48.854830',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-09-29 06:18:48.855982"], ["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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] TRANSACTION (5.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:18:48.695000"], ["updated_at", "2022-09-29 06:18:48.695000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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 -------------------------------------- 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]] CACHE 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 -------------------------------------- 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.1ms) 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-09-29 06:18:48.904835"], ["updated_at", "2022-09-29 06:18:48.904835"]] 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-09-29 06:18:48.909787"], ["updated_at", "2022-09-29 06:18:48.909787"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.911976"]] 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.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":"2022-09-29T06:18:48.904Z","updated_at":"2022-09-29T06:18:48.904Z"}','2022-09-29 06:18:48.917094',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:18:48.909Z","updated_at":"2022-09-29T06:18:48.909Z"}','2022-09-29 06:18:48.917094','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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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.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", "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.0ms) SAVEPOINT active_record_1 Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:18:48.695000"], ["updated_at", "2022-09-29 06:18:48.695000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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.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-09-29 06:18:48.948650"], ["updated_at", "2022-09-29 06:18:48.948650"]] 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.952702"]] 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.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.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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:48.956692',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:18:48.948Z","updated_at":"2022-09-29T06:18:48.948Z"}','2022-09-29 06:18:48.956692','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:18:48.958061"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:18:48.958683"], ["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-09-29 06:18:48.960012"], ["updated_at", "2022-09-29 06:18:48.960012"]] 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-09-29 06:18:48.960941"], ["updated_at", "2022-09-29 06:18:48.960941"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:18:48.695000"], ["updated_at", "2022-09-29 06:18:48.695000"], ["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-09-29 06:18:48.948000"], ["updated_at", "2022-09-29 06:18:48.948000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.985406"]] 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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:48.988555',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:18:48.993628"]] 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.1ms) SAVEPOINT active_record_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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:48.996283',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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:48.998971"]] 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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:49.002532',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:49.004566"]] 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:49.007043',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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:49.018091"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:49.022209',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:18:49.023449"]] 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":"2022-09-29T06:18:48.695Z","updated_at":"2022-09-29T06:18:48.695Z"}','2022-09-29 06:18:49.026068',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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]]  (176.7ms) 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.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", "2022-09-29 06:23:30.554747"], ["updated_at", "2022-09-29 06:23:30.554747"]] TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.577806"]] 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":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.597481',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.601683"]] 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":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.605354',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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-29 06:23:30.653953"], ["updated_at", "2022-09-29 06:23:30.653953"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.657201"]] 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.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":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.698795',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:23:30.653Z","updated_at":"2022-09-29T06:23:30.653Z"}','2022-09-29 06:23:30.698795','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:23:30.716683"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:23:30.717285"], ["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-09-29 06:23:30.718530"], ["updated_at", "2022-09-29 06:23:30.718530"]] 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-09-29 06:23:30.719350"], ["updated_at", "2022-09-29 06:23:30.719350"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:23:30.554000"], ["updated_at", "2022-09-29 06:23:30.554000"], ["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-09-29 06:23:30.653000"], ["updated_at", "2022-09-29 06:23:30.653000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- 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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.748134"]] 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":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.751290',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.754991"]] 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.1ms) SAVEPOINT active_record_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":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.758431',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.760055"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.763558',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:23:30.767422"]] 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.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.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":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.770499',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.772428"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.775771',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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.777678"]] 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:23:30.554Z","updated_at":"2022-09-29T06:23:30.554Z"}','2022-09-29 06:23:30.780601',NULL) 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", "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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.3ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) 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" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- SnapshotTest: test_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-09-29 06:23:30.807091"], ["updated_at", "2022-09-29 06:23:30.807091"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.810909"]] 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":"2022-09-29T06:23:30.807Z","updated_at":"2022-09-29T06:23:30.807Z"}','2022-09-29 06:23:30.812668',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-09-29 06:23:30.813605"], ["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_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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) 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]] CACHE 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.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:23:30.554000"], ["updated_at", "2022-09-29 06:23:30.554000"], ["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-09-29 06:23:30.847369"], ["updated_at", "2022-09-29 06:23:30.847369"]] 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-09-29 06:23:30.849683"], ["updated_at", "2022-09-29 06:23:30.849683"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:23:30.852029"]] 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":"2022-09-29T06:23:30.847Z","updated_at":"2022-09-29T06:23:30.847Z"}','2022-09-29 06:23:30.856421',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:23:30.849Z","updated_at":"2022-09-29T06:23:30.849Z"}','2022-09-29 06:23:30.856421','comments') TRANSACTION (0.1ms) 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.4ms) 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.1ms) 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:23:30.554000"], ["updated_at", "2022-09-29 06:23:30.554000"], ["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  (1.3ms) 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.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 Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:24:37.993014"], ["updated_at", "2022-09-29 06:24:37.993014"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.015650"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.035354',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.039506"]] 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.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.043076',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.083183"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.086205',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.087184"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.089501',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:24:38.124015"]] TRANSACTION (9.9ms) RELEASE SAVEPOINT active_record_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]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.153605',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.155393"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.157864',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.159188"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.161452',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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.183236"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.186333',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_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-09-29 06:24:38.192595"], ["updated_at", "2022-09-29 06:24:38.192595"]] 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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.196617"]] 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":"2022-09-29T06:24:37.993Z","updated_at":"2022-09-29T06:24:37.993Z"}','2022-09-29 06:24:38.200345',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:24:38.192Z","updated_at":"2022-09-29T06:24:38.192Z"}','2022-09-29 06:24:38.200345','comments') TRANSACTION (0.3ms) RELEASE 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-09-30 06:24:38.201826"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:24:38.202326"], ["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-09-29 06:24:38.203468"], ["updated_at", "2022-09-29 06:24:38.203468"]] 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-09-29 06:24:38.204272"], ["updated_at", "2022-09-29 06:24:38.204272"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:24:37.993000"], ["updated_at", "2022-09-29 06:24:37.993000"], ["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-09-29 06:24:38.192000"], ["updated_at", "2022-09-29 06:24:38.192000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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_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.1ms) SAVEPOINT active_record_1 Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:24:37.993000"], ["updated_at", "2022-09-29 06:24:37.993000"], ["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 ------------------------------ 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" = ? 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_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:24:37.993000"], ["updated_at", "2022-09-29 06:24:37.993000"], ["id", 1]] TRANSACTION (0.1ms) 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.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.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-09-29 06:24:38.251223"], ["updated_at", "2022-09-29 06:24:38.251223"]] 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-09-29 06:24:38.252921"], ["updated_at", "2022-09-29 06:24:38.252921"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.254788"]] 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":"2022-09-29T06:24:38.251Z","updated_at":"2022-09-29T06:24:38.251Z"}','2022-09-29 06:24:38.258521',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:24:38.252Z","updated_at":"2022-09-29T06:24:38.252Z"}','2022-09-29 06:24:38.258521','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.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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_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-09-29 06:24:38.268461"], ["updated_at", "2022-09-29 06:24:38.268461"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:24:38.271191"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T06:24:38.268Z","updated_at":"2022-09-29T06:24:38.268Z"}','2022-09-29 06:24:38.272652',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-09-29 06:24:38.273632"], ["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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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.8ms) 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.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.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:25:20.545284"], ["updated_at", "2022-09-29 06:25:20.545284"]] TRANSACTION (1.5ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.569716"]] 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.589670',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.594158"]] 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.3ms) 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.597478',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.638113"]] 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.641189',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.642140"]] 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.644231',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (7.6ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.711711"]] 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.714643',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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]] 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", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:25:20.722961"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.726645',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.728419"]] 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.730930',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.733112"]] 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.736305',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.7ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:25:20.751083"], ["updated_at", "2022-09-29 06:25:20.751083"]] 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-09-29 06:25:20.755889"], ["updated_at", "2022-09-29 06:25:20.755889"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.758697"]] 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":"2022-09-29T06:25:20.751Z","updated_at":"2022-09-29T06:25:20.751Z"}','2022-09-29 06:25:20.762169',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:25:20.755Z","updated_at":"2022-09-29T06:25:20.755Z"}','2022-09-29 06:25:20.762169','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 ------------------------------ 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" = ? 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-09-29 06:25:20.772608"], ["updated_at", "2022-09-29 06:25:20.772608"]] 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", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.775232"]] 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":"2022-09-29T06:25:20.772Z","updated_at":"2022-09-29T06:25:20.772Z"}','2022-09-29 06:25:20.776696',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-09-29 06:25:20.777514"], ["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_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.3ms) 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.1ms) 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]] CACHE 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:25:20.545000"], ["updated_at", "2022-09-29 06:25:20.545000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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 --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ 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.4ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:25:20.826450"], ["updated_at", "2022-09-29 06:25:20.826450"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:20.830121"]] 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.1ms) 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":"2022-09-29T06:25:20.545Z","updated_at":"2022-09-29T06:25:20.545Z"}','2022-09-29 06:25:20.834092',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:25:20.826Z","updated_at":"2022-09-29T06:25:20.826Z"}','2022-09-29 06:25:20.834092','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:25:20.835792"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:25:20.836445"], ["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-09-29 06:25:20.838037"], ["updated_at", "2022-09-29 06:25:20.838037"]] 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-09-29 06:25:20.838981"], ["updated_at", "2022-09-29 06:25:20.838981"]] 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:25:20.545000"], ["updated_at", "2022-09-29 06:25:20.545000"], ["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-09-29 06:25:20.826000"], ["updated_at", "2022-09-29 06:25:20.826000"]] 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" ActiveSnapshot::Snapshot Count (0.2ms) 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) rollback 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 ----------------------------- 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:25:20.545000"], ["updated_at", "2022-09-29 06:25:20.545000"], ["id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_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.2ms) 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.8ms) 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;  (1.4ms) 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", "2022-09-29 06:25:43.034337"], ["updated_at", "2022-09-29 06:25:43.034337"]] TRANSACTION (1.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:43.058147"]] 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:25:43.077617',NULL) TRANSACTION (0.7ms) commit transaction Post Update (0.9ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:43.082063"]] 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:25:43.085715',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.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" = ? 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_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]] CACHE 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.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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:25:43.034000"], ["updated_at", "2022-09-29 06:25:43.034000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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 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]] CACHE 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_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-09-29 06:25:43.203363"], ["updated_at", "2022-09-29 06:25:43.203363"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:25:43.206815"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T06:25:43.203Z","updated_at":"2022-09-29T06:25:43.203Z"}','2022-09-29 06:25:43.208725',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-09-29 06:25:43.209843"], ["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.3ms) 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-09-29 06:26:10.569233"], ["updated_at", "2022-09-29 06:26:10.569233"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-29 06:26:10.574925"], ["updated_at", "2022-09-29 06:26:10.574925"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.577442"]] 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":"2022-09-29T06:26:10.569Z","updated_at":"2022-09-29T06:26:10.569Z"}','2022-09-29 06:26:10.581756',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:26:10.574Z","updated_at":"2022-09-29T06:26:10.574Z"}','2022-09-29 06:26:10.581756','comments') TRANSACTION (0.1ms) 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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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_object ----------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:25:43.034000"], ["updated_at", "2022-09-29 06:25:43.034000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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.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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) 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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:26:10.624651"], ["updated_at", "2022-09-29 06:26:10.624651"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.627870"]] 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.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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.631658',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:26:10.624Z","updated_at":"2022-09-29T06:26:10.624Z"}','2022-09-29 06:26:10.631658','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-30 06:26:10.633419"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:26:10.634202"], ["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-09-29 06:26:10.635691"], ["updated_at", "2022-09-29 06:26:10.635691"]] 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", "2022-09-29 06:26:10.636686"], ["updated_at", "2022-09-29 06:26:10.636686"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:25:43.034000"], ["updated_at", "2022-09-29 06:25:43.034000"], ["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-09-29 06:26:10.624000"], ["updated_at", "2022-09-29 06:26:10.624000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.662685"]] 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.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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.666956',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:26:10.676955"]] 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.679701',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.682340"]] 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.684706',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.686673"]] 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.1ms) 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.689149',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_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.694068"]] 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.696900',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:10.698180"]] 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":"2022-09-29T06:25:43.034Z","updated_at":"2022-09-29T06:25:43.034Z"}','2022-09-29 06:26:10.700354',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) 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]]  (6.6ms) DELETE FROM posts;  (0.9ms) 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.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", "2022-09-29 06:26:21.663534"], ["updated_at", "2022-09-29 06:26:21.663534"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.686230"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.706264',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.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.710837"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.714141',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] CACHE 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.5ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:21.663000"], ["updated_at", "2022-09-29 06:26:21.663000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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" = ? 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.1ms) 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.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-09-29 06:26:21.828893"], ["updated_at", "2022-09-29 06:26:21.828893"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.831912"]] 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":"2022-09-29T06:26:21.828Z","updated_at":"2022-09-29T06:26:21.828Z"}','2022-09-29 06:26:21.833188',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-09-29 06:26:21.833960"], ["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.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]] CACHE 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_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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:26:21.862304"], ["updated_at", "2022-09-29 06:26:21.862304"]] TRANSACTION (0.0ms) 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-09-29 06:26:21.868647"], ["updated_at", "2022-09-29 06:26:21.868647"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.871916"]] 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":"2022-09-29T06:26:21.862Z","updated_at":"2022-09-29T06:26:21.862Z"}','2022-09-29 06:26:21.876743',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:26:21.868Z","updated_at":"2022-09-29T06:26:21.868Z"}','2022-09-29 06:26:21.876743','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.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 ------------------------------------------- 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-09-29 06:26:21.884067"], ["updated_at", "2022-09-29 06:26:21.884067"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.887002"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.891098',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:26:21.884Z","updated_at":"2022-09-29T06:26:21.884Z"}','2022-09-29 06:26:21.891098','comments') 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" Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:26:21.892537"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:26:21.893476"], ["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-09-29 06:26:21.895781"], ["updated_at", "2022-09-29 06:26:21.895781"]] 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-09-29 06:26:21.896776"], ["updated_at", "2022-09-29 06:26:21.896776"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:26:21.663000"], ["updated_at", "2022-09-29 06:26:21.663000"], ["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-09-29 06:26:21.884000"], ["updated_at", "2022-09-29 06:26:21.884000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.934210"]] 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.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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.938218',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.942358"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.945335',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.946445"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.948849',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:26:21.953543"]] 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.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,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.956299',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.957840"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.960020',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:21.961842"]] 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":"2022-09-29T06:26:21.663Z","updated_at":"2022-09-29T06:26:21.663Z"}','2022-09-29 06:26:21.964092',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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:21.663000"], ["updated_at", "2022-09-29 06:26:21.663000"], ["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.2ms) 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  (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]]  (7.1ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:28.037061"], ["updated_at", "2022-09-29 06:26:28.037061"]] 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.059972"]] 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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.079414',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.083995"]] 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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.087768',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- 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_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.203134"]] 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.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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.206843',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.212144"]] 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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.215588',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.217000"]] 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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.219514',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:26:28.227950"]] 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.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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.231641',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.233571"]] 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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.236073',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.237446"]] 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":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.239816',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_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.3ms) 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-09-29 06:26:28.251015"], ["updated_at", "2022-09-29 06:26:28.251015"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.254048"]] 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.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,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:26:28.037Z","updated_at":"2022-09-29T06:26:28.037Z"}','2022-09-29 06:26:28.257693',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:26:28.251Z","updated_at":"2022-09-29T06:26:28.251Z"}','2022-09-29 06:26:28.257693','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.3ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:26:28.258866"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:26:28.259591"], ["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-09-29 06:26:28.260968"], ["updated_at", "2022-09-29 06:26:28.260968"]] 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-09-29 06:26:28.262119"], ["updated_at", "2022-09-29 06:26:28.262119"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:26:28.037000"], ["updated_at", "2022-09-29 06:26:28.037000"], ["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-09-29 06:26:28.251000"], ["updated_at", "2022-09-29 06:26:28.251000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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_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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:28.037000"], ["updated_at", "2022-09-29 06:26:28.037000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-29 06:26:28.285961"], ["updated_at", "2022-09-29 06:26:28.285961"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.288779"]] 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":"2022-09-29T06:26:28.285Z","updated_at":"2022-09-29T06:26:28.285Z"}','2022-09-29 06:26:28.290154',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-09-29 06:26:28.290984"], ["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.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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_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" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) 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_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-09-29 06:26:28.325119"], ["updated_at", "2022-09-29 06:26:28.325119"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-29 06:26:28.327374"], ["updated_at", "2022-09-29 06:26:28.327374"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:28.330549"]] 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.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":"2022-09-29T06:26:28.325Z","updated_at":"2022-09-29T06:26:28.325Z"}','2022-09-29 06:26:28.334745',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:26:28.327Z","updated_at":"2022-09-29T06:26:28.327Z"}','2022-09-29 06:26:28.334745','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 ---------------------------------- 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.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", "Foobar"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.2ms) 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.1ms) rollback transaction TRANSACTION (0.1ms) 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:28.037000"], ["updated_at", "2022-09-29 06:26:28.037000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) 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]]  (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.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", "2022-09-29 06:26:33.711251"], ["updated_at", "2022-09-29 06:26:33.711251"]] TRANSACTION (1.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.735684"]] 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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.755489',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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.760221"]] 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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.764796',NULL) TRANSACTION (0.8ms) commit transaction TRANSACTION (0.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:33.711000"], ["updated_at", "2022-09-29 06:26:33.711000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- ActiveSnapshot::SnapshotItem Exists? (8.5ms) 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.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::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 -------------------------------------------- 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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:26:33.891833"], ["updated_at", "2022-09-29 06:26:33.891833"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.894947"]] 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.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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.897753',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:26:33.891Z","updated_at":"2022-09-29T06:26:33.891Z"}','2022-09-29 06:26:33.897753','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-09-30 06:26:33.899288"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:26:33.899735"], ["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-09-29 06:26:33.900819"], ["updated_at", "2022-09-29 06:26:33.900819"]] 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-09-29 06:26:33.901953"], ["updated_at", "2022-09-29 06:26:33.901953"]] 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:26:33.711000"], ["updated_at", "2022-09-29 06:26:33.711000"], ["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-09-29 06:26:33.891000"], ["updated_at", "2022-09-29 06:26:33.891000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.932988"]] 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.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.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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.937554',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.941512"]] 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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.944809',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.945992"]] 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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.949061',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:26:33.952899"]] 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.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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.955699',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.957219"]] 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.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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.959326',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.960700"]] 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":"2022-09-29T06:26:33.711Z","updated_at":"2022-09-29T06:26:33.711Z"}','2022-09-29 06:26:33.963080',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" 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_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-09-29 06:26:33.975852"], ["updated_at", "2022-09-29 06:26:33.975852"]] 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-09-29 06:26:33.977807"], ["updated_at", "2022-09-29 06:26:33.977807"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.979740"]] 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":"2022-09-29T06:26:33.975Z","updated_at":"2022-09-29T06:26:33.975Z"}','2022-09-29 06:26:33.982879',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:26:33.977Z","updated_at":"2022-09-29T06:26:33.977Z"}','2022-09-29 06:26:33.982879','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.1ms) 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_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_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-09-29 06:26:33.993418"], ["updated_at", "2022-09-29 06:26:33.993418"]] 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", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:26:33.996060"]] 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":"2022-09-29T06:26:33.993Z","updated_at":"2022-09-29T06:26:33.993Z"}','2022-09-29 06:26:33.997489',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-09-29 06:26:33.998308"], ["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.5ms) 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]] CACHE 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.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.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:26:33.711000"], ["updated_at", "2022-09-29 06:26:33.711000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? 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.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]]  (6.7ms) 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.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", "2022-09-29 06:28:09.219328"], ["updated_at", "2022-09-29 06:28:09.219328"]] TRANSACTION (1.5ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.243272"]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.262846',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.267075"]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.270824',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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.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-09-29 06:28:09.316426"], ["updated_at", "2022-09-29 06:28:09.316426"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.319277"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (7.2ms) 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]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.353895',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:28:09.316Z","updated_at":"2022-09-29T06:28:09.316Z"}','2022-09-29 06:28:09.353895','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:09.364027"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:09.364637"], ["id", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] 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", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:28:09.379880"], ["updated_at", "2022-09-29 06:28:09.379880"]] 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-09-29 06:28:09.380808"], ["updated_at", "2022-09-29 06:28:09.380808"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:28:09.219000"], ["updated_at", "2022-09-29 06:28:09.219000"], ["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-09-29 06:28:09.316000"], ["updated_at", "2022-09-29 06:28:09.316000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (5.9ms) rollback 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.418368"]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.421106',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:28:09.425834"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.430118',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.432077"]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.434855',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.436307"]] 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.1ms) 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.438981',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) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.455191"]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.458912',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.460262"]] 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":"2022-09-29T06:28:09.219Z","updated_at":"2022-09-29T06:28:09.219Z"}','2022-09-29 06:28:09.463284',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.2ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:09.219000"], ["updated_at", "2022-09-29 06:28:09.219000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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]] 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_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.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_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-09-29 06:28:09.487223"], ["updated_at", "2022-09-29 06:28:09.487223"]] 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-09-29 06:28:09.489012"], ["updated_at", "2022-09-29 06:28:09.489012"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.491242"]] 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":"2022-09-29T06:28:09.487Z","updated_at":"2022-09-29T06:28:09.487Z"}','2022-09-29 06:28:09.494864',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:28:09.489Z","updated_at":"2022-09-29T06:28:09.489Z"}','2022-09-29 06:28:09.494864','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.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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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 ---------------------------------------------------------- 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-09-29 06:28:09.505637"], ["updated_at", "2022-09-29 06:28:09.505637"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:09.508576"]] 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":"2022-09-29T06:28:09.505Z","updated_at":"2022-09-29T06:28:09.505Z"}','2022-09-29 06:28:09.510226',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-29 06:28:09.511229"], ["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.1ms) 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:09.219000"], ["updated_at", "2022-09-29 06:28:09.219000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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.2ms) 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  (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]]  (6.7ms) 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.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", "2022-09-29 06:28:16.621818"], ["updated_at", "2022-09-29 06:28:16.621818"]] TRANSACTION (1.3ms) 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 (7.8ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.637640"]] 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.665043',NULL) TRANSACTION (0.7ms) commit transaction Post Update (1.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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.670978"]] 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.674703',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:28:16.722279"]] 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.725298',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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.727012"]] 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 (7.8ms) 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.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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.747285',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (9.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.759370"]] 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.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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.787567',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 (5.8ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.811309"]] 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.1ms) 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.815274',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.818838"]] 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.821946',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.822888"]] 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.825498',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.3ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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.3ms) 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-09-29 06:28:16.836027"], ["updated_at", "2022-09-29 06:28:16.836027"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.838990"]] 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":"2022-09-29T06:28:16.621Z","updated_at":"2022-09-29T06:28:16.621Z"}','2022-09-29 06:28:16.842055',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:28:16.836Z","updated_at":"2022-09-29T06:28:16.836Z"}','2022-09-29 06:28:16.842055','comments') 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" Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:16.843277"], ["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:16.844280"], ["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-09-29 06:28:16.846081"], ["updated_at", "2022-09-29 06:28:16.846081"]] 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", "2022-09-29 06:28:16.847051"], ["updated_at", "2022-09-29 06:28:16.847051"]] 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:28:16.621000"], ["updated_at", "2022-09-29 06:28:16.621000"], ["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-09-29 06:28:16.836000"], ["updated_at", "2022-09-29 06:28:16.836000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_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_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-09-29 06:28:16.875771"], ["updated_at", "2022-09-29 06:28:16.875771"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.878963"]] 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":"2022-09-29T06:28:16.875Z","updated_at":"2022-09-29T06:28:16.875Z"}','2022-09-29 06:28:16.880327',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-09-29 06:28:16.881291"], ["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_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-09-29 06:28:16.903424"], ["updated_at", "2022-09-29 06:28:16.903424"]] 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-09-29 06:28:16.906193"], ["updated_at", "2022-09-29 06:28:16.906193"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:16.908395"]] 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":"2022-09-29T06:28:16.903Z","updated_at":"2022-09-29T06:28:16.903Z"}','2022-09-29 06:28:16.913183',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:28:16.906Z","updated_at":"2022-09-29T06:28:16.906Z"}','2022-09-29 06:28:16.913183','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 -------------------------- 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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:16.621000"], ["updated_at", "2022-09-29 06:28:16.621000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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_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.2ms) 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.1ms) 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:16.621000"], ["updated_at", "2022-09-29 06:28:16.621000"], ["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.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) 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]]  (6.6ms) DELETE FROM posts;  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (0.8ms) DELETE FROM snapshots;  (162.3ms) 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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:21.127768"], ["updated_at", "2022-09-29 06:28:21.127768"]] TRANSACTION (1.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.152056"]] 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.171199',NULL) TRANSACTION (0.7ms) commit transaction Post Update (1.5ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.176876"]] 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.180759',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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:28:21.221505"]] 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.3ms) 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.224526',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.226059"]] 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.228377',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.229741"]] 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.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.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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.246509',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (7.2ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.310058"]] 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.312782',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.322840"]] 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.326075',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.327048"]] 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.329402',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.4ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.5ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:28:21.354142"], ["updated_at", "2022-09-29 06:28:21.354142"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-29 06:28:21.358168"], ["updated_at", "2022-09-29 06:28:21.358168"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.360335"]] 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":"2022-09-29T06:28:21.354Z","updated_at":"2022-09-29T06:28:21.354Z"}','2022-09-29 06:28:21.363530',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:28:21.358Z","updated_at":"2022-09-29T06:28:21.358Z"}','2022-09-29 06:28:21.363530','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.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:21.127000"], ["updated_at", "2022-09-29 06:28:21.127000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) rollback transaction TRANSACTION (0.0ms) begin 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 ---------------------------------------------------------- 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-09-29 06:28:21.379706"], ["updated_at", "2022-09-29 06:28:21.379706"]] 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.382401"]] 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":"2022-09-29T06:28:21.379Z","updated_at":"2022-09-29T06:28:21.379Z"}','2022-09-29 06:28:21.384772',NULL) TRANSACTION (0.1ms) 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-09-29 06:28:21.386070"], ["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_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" = ? 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.1ms) rollback transaction TRANSACTION (0.1ms) 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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:28:21.410697"], ["updated_at", "2022-09-29 06:28:21.410697"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:21.413648"]] 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.1ms) 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":"2022-09-29T06:28:21.127Z","updated_at":"2022-09-29T06:28:21.127Z"}','2022-09-29 06:28:21.417576',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:28:21.410Z","updated_at":"2022-09-29T06:28:21.410Z"}','2022-09-29 06:28:21.417576','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-09-30 06:28:21.419314"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:21.420007"], ["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.1ms) 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-09-29 06:28:21.421625"], ["updated_at", "2022-09-29 06:28:21.421625"]] 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-09-29 06:28:21.422655"], ["updated_at", "2022-09-29 06:28:21.422655"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:28:21.127000"], ["updated_at", "2022-09-29 06:28:21.127000"], ["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-09-29 06:28:21.410000"], ["updated_at", "2022-09-29 06:28:21.410000"]] 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]] CACHE 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]] Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.1ms) 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! ------------------------------------ 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:21.127000"], ["updated_at", "2022-09-29 06:28:21.127000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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_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_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.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.6ms) DELETE FROM posts;  (175.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (1.0ms) DELETE FROM snapshots;  (0.8ms) 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.1ms) begin transaction Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:24.882124"], ["updated_at", "2022-09-29 06:28:24.882124"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:24.908508"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:24.930847',NULL) TRANSACTION (0.6ms) 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:24.935667"]] 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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:24.940222',NULL) TRANSACTION (163.4ms) commit transaction TRANSACTION (0.1ms) 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.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-09-29 06:28:25.146198"], ["updated_at", "2022-09-29 06:28:25.146198"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.149310"]] 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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.152107',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:28:25.146Z","updated_at":"2022-09-29T06:28:25.146Z"}','2022-09-29 06:28:25.152107','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-30 06:28:25.161758"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:25.162382"], ["id", 1]] TRANSACTION (0.2ms) 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-09-29 06:28:25.172372"], ["updated_at", "2022-09-29 06:28:25.172372"]] 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", "2022-09-29 06:28:25.183965"], ["updated_at", "2022-09-29 06:28:25.183965"]] TRANSACTION (0.1ms) 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.1ms) SAVEPOINT active_record_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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:28:24.882000"], ["updated_at", "2022-09-29 06:28:24.882000"], ["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-09-29 06:28:25.146000"], ["updated_at", "2022-09-29 06:28:25.146000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (6.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_object ----------------------------- ActiveSnapshot::Snapshot Load (0.2ms) 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_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.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::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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:24.882000"], ["updated_at", "2022-09-29 06:28:24.882000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) 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.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_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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:24.882000"], ["updated_at", "2022-09-29 06:28:24.882000"], ["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" = ? 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.3ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- 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]] CACHE 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_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-09-29 06:28:25.276305"], ["updated_at", "2022-09-29 06:28:25.276305"]] 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-09-29 06:28:25.278279"], ["updated_at", "2022-09-29 06:28:25.278279"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.280356"]] 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":"2022-09-29T06:28:25.276Z","updated_at":"2022-09-29T06:28:25.276Z"}','2022-09-29 06:28:25.283561',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:28:25.278Z","updated_at":"2022-09-29T06:28:25.278Z"}','2022-09-29 06:28:25.283561','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_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-09-29 06:28:25.291716"], ["updated_at", "2022-09-29 06:28:25.291716"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.294649"]] 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":"2022-09-29T06:28:25.291Z","updated_at":"2022-09-29T06:28:25.291Z"}','2022-09-29 06:28:25.296118',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-09-29 06:28:25.296941"], ["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.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 --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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 ActiveSnapshot::Snapshot Exists? (0.2ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:28:25.328337"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.332028',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.333863"]] 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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.336114',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.338428"]] 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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.341960',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) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.360640"]] 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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.363844',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.367136"]] 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.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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.369825',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:25.371230"]] 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.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":"2022-09-29T06:28:24.882Z","updated_at":"2022-09-29T06:28:24.882Z"}','2022-09-29 06:28:25.375547',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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]]  (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';  (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.1ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:44.244094"], ["updated_at", "2022-09-29 06:28:44.244094"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.269570"]] TRANSACTION (172.0ms) 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.461396',NULL) TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.465793"]] 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.469500',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-29 06:28:44.510801"], ["updated_at", "2022-09-29 06:28:44.510801"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.513781"]] 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.516798',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:28:44.510Z","updated_at":"2022-09-29T06:28:44.510Z"}','2022-09-29 06:28:44.516798','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-09-30 06:28:44.517912"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:44.518449"], ["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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:28:44.519514"], ["updated_at", "2022-09-29 06:28:44.519514"]] 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-09-29 06:28:44.520559"], ["updated_at", "2022-09-29 06:28:44.520559"]] 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 (7.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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:28:44.244000"], ["updated_at", "2022-09-29 06:28:44.244000"], ["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-09-29 06:28:44.510000"], ["updated_at", "2022-09-29 06:28:44.510000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (5.9ms) 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] CACHE 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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:44.244000"], ["updated_at", "2022-09-29 06:28:44.244000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:28:44.608978"], ["updated_at", "2022-09-29 06:28:44.608978"]] 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-09-29 06:28:44.610852"], ["updated_at", "2022-09-29 06:28:44.610852"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.612844"]] 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":"2022-09-29T06:28:44.608Z","updated_at":"2022-09-29T06:28:44.608Z"}','2022-09-29 06:28:44.616084',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:28:44.610Z","updated_at":"2022-09-29T06:28:44.610Z"}','2022-09-29 06:28:44.616084','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.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" = ? 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_relationships -------------------------------- 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]] CACHE 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 ---------------------------------------------------------- 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-09-29 06:28:44.636292"], ["updated_at", "2022-09-29 06:28:44.636292"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.640162"]] 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":"2022-09-29T06:28:44.636Z","updated_at":"2022-09-29T06:28:44.636Z"}','2022-09-29 06:28:44.641490',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-09-29 06:28:44.642254"], ["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.5ms) 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 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:44.244000"], ["updated_at", "2022-09-29 06:28:44.244000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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.1ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:28:44.688563"]] 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.692241',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.694164"]] 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.696474',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.697941"]] 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.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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.700083',NULL) 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", "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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.716312"]] 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.1ms) 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.719524',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.726185"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.729678',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:44.730789"]] 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":"2022-09-29T06:28:44.244Z","updated_at":"2022-09-29T06:28:44.244Z"}','2022-09-29 06:28:44.733172',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) 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]]  (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.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", "2022-09-29 06:28:51.084539"], ["updated_at", "2022-09-29 06:28:51.084539"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.099525"]] TRANSACTION (0.9ms) 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.126676',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.131065"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.134629',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.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.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-09-29 06:28:51.180707"], ["updated_at", "2022-09-29 06:28:51.180707"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.183135"]] 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":"2022-09-29T06:28:51.180Z","updated_at":"2022-09-29T06:28:51.180Z"}','2022-09-29 06:28:51.184535',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-09-29 06:28:51.185277"], ["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.2ms) 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_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-09-29 06:28:51.237770"], ["updated_at", "2022-09-29 06:28:51.237770"]] TRANSACTION (0.0ms) 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-09-29 06:28:51.277240"], ["updated_at", "2022-09-29 06:28:51.277240"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.280126"]] 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":"2022-09-29T06:28:51.237Z","updated_at":"2022-09-29T06:28:51.237Z"}','2022-09-29 06:28:51.283544',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:28:51.277Z","updated_at":"2022-09-29T06:28:51.277Z"}','2022-09-29 06:28:51.283544','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 (168.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" = ? 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_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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:51.084000"], ["updated_at", "2022-09-29 06:28:51.084000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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]] CACHE 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_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.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.475171"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.478976',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.480096"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.482750',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.498544"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.501885',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:28:51.512493"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.515337',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.517174"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.519450',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.520906"]] 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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.523234',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 ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- ActiveSnapshot::SnapshotItem Exists? (0.3ms) 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_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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:28:51.084000"], ["updated_at", "2022-09-29 06:28:51.084000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- 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_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) 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-09-29 06:28:51.554440"], ["updated_at", "2022-09-29 06:28:51.554440"]] 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 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:28:51.557245"]] 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.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.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":"2022-09-29T06:28:51.084Z","updated_at":"2022-09-29T06:28:51.084Z"}','2022-09-29 06:28:51.561235',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:28:51.554Z","updated_at":"2022-09-29T06:28:51.554Z"}','2022-09-29 06:28:51.561235','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-09-30 06:28:51.563078"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:28:51.563883"], ["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.1ms) 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-09-29 06:28:51.565406"], ["updated_at", "2022-09-29 06:28:51.565406"]] 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-09-29 06:28:51.566292"], ["updated_at", "2022-09-29 06:28:51.566292"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.0ms) 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:28:51.084000"], ["updated_at", "2022-09-29 06:28:51.084000"], ["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-09-29 06:28:51.554000"], ["updated_at", "2022-09-29 06:28:51.554000"]] 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" 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]] CACHE 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]] Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) 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]]  (6.7ms) 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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:29:20.614285"], ["updated_at", "2022-09-29 06:29:20.614285"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.637348"]] 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":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.657442',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.661967"]] 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":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.665749',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 -------------------------------------- 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.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.2ms) 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_relationships -------------------------------- TRANSACTION (0.1ms) 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 TRANSACTION (0.0ms) 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-09-29 06:29:20.785492"], ["updated_at", "2022-09-29 06:29:20.785492"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.788957"]] 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":"2022-09-29T06:29:20.785Z","updated_at":"2022-09-29T06:29:20.785Z"}','2022-09-29 06:29:20.790353',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-09-29 06:29:20.791167"], ["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_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-09-29 06:29:20.813656"], ["updated_at", "2022-09-29 06:29:20.813656"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 Comment Create (0.6ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-09-29 06:29:20.820085"], ["updated_at", "2022-09-29 06:29:20.820085"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.823495"]] 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":"2022-09-29T06:29:20.813Z","updated_at":"2022-09-29T06:29:20.813Z"}','2022-09-29 06:29:20.827752',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:29:20.820Z","updated_at":"2022-09-29T06:29:20.820Z"}','2022-09-29 06:29:20.827752','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_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]] CACHE 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:29:20.614000"], ["updated_at", "2022-09-29 06:29:20.614000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-29 06:29:20.842151"], ["updated_at", "2022-09-29 06:29:20.842151"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.845467"]] 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.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":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.849285',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:29:20.842Z","updated_at":"2022-09-29T06:29:20.842Z"}','2022-09-29 06:29:20.849285','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-09-30 06:29:20.851117"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:29:20.851987"], ["id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] 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", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:29:20.853740"], ["updated_at", "2022-09-29 06:29:20.853740"]] 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-09-29 06:29:20.855338"], ["updated_at", "2022-09-29 06:29:20.855338"]] TRANSACTION (0.1ms) 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.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] Post Load (0.7ms) 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:29:20.614000"], ["updated_at", "2022-09-29 06:29:20.614000"], ["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-09-29 06:29:20.842000"], ["updated_at", "2022-09-29 06:29:20.842000"]] 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]] CACHE 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.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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) rollback 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 ------------------------------------ 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:29:20.614000"], ["updated_at", "2022-09-29 06:29:20.614000"], ["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.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.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 ------------------------------------------- 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:29:20.884953"]] 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.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":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.888483',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.890326"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.892664',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.894119"]] 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.896259',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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.907244"]] 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":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.910309',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.911536"]] 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.1ms) 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.913867',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:20.928133"]] 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":"2022-09-29T06:29:20.614Z","updated_at":"2022-09-29T06:29:20.614Z"}','2022-09-29 06:29:20.931239',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- 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.9ms) 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.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", "2022-09-29 06:29:30.637194"], ["updated_at", "2022-09-29 06:29:30.637194"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.659798"]] 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.679361',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.683514"]] 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.687225',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- 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.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-09-29 06:29:30.729712"], ["updated_at", "2022-09-29 06:29:30.729712"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.732725"]] 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.735570',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:29:30.729Z","updated_at":"2022-09-29T06:29:30.729Z"}','2022-09-29 06:29:30.735570','comments') TRANSACTION (0.1ms) RELEASE 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.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:29:30.745046"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:29:30.753933"], ["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.1ms) 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-09-29 06:29:30.765584"], ["updated_at", "2022-09-29 06:29:30.765584"]] 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-09-29 06:29:30.776577"], ["updated_at", "2022-09-29 06:29:30.776577"]] 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.1ms) 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:29:30.637000"], ["updated_at", "2022-09-29 06:29:30.637000"], ["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-09-29 06:29:30.729000"], ["updated_at", "2022-09-29 06:29:30.729000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (5.9ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:29:30.637000"], ["updated_at", "2022-09-29 06:29:30.637000"], ["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.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" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.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_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]] CACHE 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_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-09-29 06:29:30.834300"], ["updated_at", "2022-09-29 06:29:30.834300"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.837032"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T06:29:30.834Z","updated_at":"2022-09-29T06:29:30.834Z"}','2022-09-29 06:29:30.838265',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-29 06:29:30.839461"], ["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.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-09-29 06:29:30.862805"], ["updated_at", "2022-09-29 06:29:30.862805"]] 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-09-29 06:29:30.865451"], ["updated_at", "2022-09-29 06:29:30.865451"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.868237"]] 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":"2022-09-29T06:29:30.862Z","updated_at":"2022-09-29T06:29:30.862Z"}','2022-09-29 06:29:30.871945',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:29:30.865Z","updated_at":"2022-09-29T06:29:30.865Z"}','2022-09-29 06:29:30.871945','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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:29:30.637000"], ["updated_at", "2022-09-29 06:29:30.637000"], ["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.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.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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:29:30.901078"]] 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.903961',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.906084"]] 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.909458',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.911176"]] 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.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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.913589',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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.920237"]] 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.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.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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.924263',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.925630"]] 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.1ms) 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.928418',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:29:30.942740"]] 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":"2022-09-29T06:29:30.637Z","updated_at":"2022-09-29T06:29:30.637Z"}','2022-09-29 06:29:30.945725',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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.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.8ms) 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.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", "2022-09-29 06:30:03.589474"], ["updated_at", "2022-09-29 06:30:03.589474"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.612315"]] 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.632084',NULL) TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.636727"]] 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.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) begin transaction ActiveSnapshot::SnapshotItem Create Many (0.6ms) 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.640133',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.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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:30:03.681132"]] 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.2ms) 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.684093',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.685657"]] 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.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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.694211',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.712300"]] 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.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.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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.739670',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (7.8ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.770939"]] 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.773966',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.778227"]] 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.781595',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.783018"]] 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.785941',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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.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-09-29 06:30:03.800668"], ["updated_at", "2022-09-29 06:30:03.800668"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.803822"]] 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":"2022-09-29T06:30:03.589Z","updated_at":"2022-09-29T06:30:03.589Z"}','2022-09-29 06:30:03.806956',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:30:03.800Z","updated_at":"2022-09-29T06:30:03.800Z"}','2022-09-29 06:30:03.806956','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-09-30 06:30:03.808134"], ["id", 1]] Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:30:03.808657"], ["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-09-29 06:30:03.810454"], ["updated_at", "2022-09-29 06:30:03.810454"]] 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", "2022-09-29 06:30:03.811746"], ["updated_at", "2022-09-29 06:30:03.811746"]] 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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:30:03.589000"], ["updated_at", "2022-09-29 06:30:03.589000"], ["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-09-29 06:30:03.800000"], ["updated_at", "2022-09-29 06:30:03.800000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------- SnapshotTest: test_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-09-29 06:30:03.829017"], ["updated_at", "2022-09-29 06:30:03.829017"]] 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", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.831866"]] 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":"2022-09-29T06:30:03.829Z","updated_at":"2022-09-29T06:30:03.829Z"}','2022-09-29 06:30:03.833178',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-09-29 06:30:03.834025"], ["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_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.2ms) 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]] CACHE 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.1ms) SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:30:03.589000"], ["updated_at", "2022-09-29 06:30:03.589000"], ["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" = ? 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.1ms) 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_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-09-29 06:30:03.877056"], ["updated_at", "2022-09-29 06:30:03.877056"]] 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-09-29 06:30:03.879615"], ["updated_at", "2022-09-29 06:30:03.879615"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:03.881913"]] 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.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":"2022-09-29T06:30:03.877Z","updated_at":"2022-09-29T06:30:03.877Z"}','2022-09-29 06:30:03.885847',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:30:03.879Z","updated_at":"2022-09-29T06:30:03.879Z"}','2022-09-29 06:30:03.885847','comments') TRANSACTION (0.1ms) 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 ----------------------------- 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.1ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:30:03.589000"], ["updated_at", "2022-09-29 06:30:03.589000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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 --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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]]  (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.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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:30:41.595482"], ["updated_at", "2022-09-29 06:30:41.595482"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.618110"]] 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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.637696',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.642097"]] 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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.645367',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_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-29 06:30:41.688299"], ["updated_at", "2022-09-29 06:30:41.688299"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.691029"]] 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.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.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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.716961',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:30:41.688Z","updated_at":"2022-09-29T06:30:41.688Z"}','2022-09-29 06:30:41.716961','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.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:30:41.727101"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:30:41.736155"], ["id", 1]] TRANSACTION (6.8ms) 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.1ms) 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-09-29 06:30:41.750377"], ["updated_at", "2022-09-29 06:30:41.750377"]] 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-09-29 06:30:41.751514"], ["updated_at", "2022-09-29 06:30:41.751514"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:30:41.595000"], ["updated_at", "2022-09-29 06:30:41.595000"], ["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-09-29 06:30:41.688000"], ["updated_at", "2022-09-29 06:30:41.688000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (6.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.3ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:30:41.785741"]] 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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.788885',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.790420"]] 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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.792727',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.794038"]] 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.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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.796812',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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.815360"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.819378',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.823121"]] 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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.826082',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.827172"]] 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.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":"2022-09-29T06:30:41.595Z","updated_at":"2022-09-29T06:30:41.595Z"}','2022-09-29 06:30:41.829921',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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.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_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.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]] Post Load (0.1ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:30:41.595000"], ["updated_at", "2022-09-29 06:30:41.595000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:30:41.595000"], ["updated_at", "2022-09-29 06:30:41.595000"], ["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-09-29 06:30:41.865497"], ["updated_at", "2022-09-29 06:30:41.865497"]] 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-09-29 06:30:41.867827"], ["updated_at", "2022-09-29 06:30:41.867827"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.869995"]] 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":"2022-09-29T06:30:41.865Z","updated_at":"2022-09-29T06:30:41.865Z"}','2022-09-29 06:30:41.873260',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:30:41.867Z","updated_at":"2022-09-29T06:30:41.867Z"}','2022-09-29 06:30:41.873260','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.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.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.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_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-09-29 06:30:41.886263"], ["updated_at", "2022-09-29 06:30:41.886263"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:30:41.889252"]] 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":"2022-09-29T06:30:41.886Z","updated_at":"2022-09-29T06:30:41.886Z"}','2022-09-29 06:30:41.890546',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-09-29 06:30:41.891336"], ["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  (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]]  (6.7ms) 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.8ms) DELETE FROM 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", "2022-09-29 06:31:50.608012"], ["updated_at", "2022-09-29 06:31:50.608012"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.630860"]] 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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.650802',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.655269"]] 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.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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.658685',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 (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:31:50.705815"]] 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.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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.715773',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.733337"]] 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.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.760594',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.768839"]] 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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.771895',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_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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.797146"]] 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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.800496',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.804031"]] 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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.807182',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.808151"]] 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.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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.811192',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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-09-29 06:31:50.816793"], ["updated_at", "2022-09-29 06:31:50.816793"]] 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-09-29 06:31:50.821115"], ["updated_at", "2022-09-29 06:31:50.821115"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.823450"]] 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":"2022-09-29T06:31:50.816Z","updated_at":"2022-09-29T06:31:50.816Z"}','2022-09-29 06:31:50.826877',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:31:50.821Z","updated_at":"2022-09-29T06:31:50.821Z"}','2022-09-29 06:31:50.826877','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 ------------------------------ 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" = ? 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.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]] CACHE 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 ---------------------------------------------------------- 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-09-29 06:31:50.844196"], ["updated_at", "2022-09-29 06:31:50.844196"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.847490"]] TRANSACTION (0.0ms) RELEASE 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,3,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T06:31:50.844Z","updated_at":"2022-09-29T06:31:50.844Z"}','2022-09-29 06:31:50.849028',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-09-29 06:31:50.849952"], ["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_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:31:50.608000"], ["updated_at", "2022-09-29 06:31:50.608000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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 -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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-09-29 06:31:50.869794"], ["updated_at", "2022-09-29 06:31:50.869794"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:31:50.873504"]] 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.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_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":"2022-09-29T06:31:50.608Z","updated_at":"2022-09-29T06:31:50.608Z"}','2022-09-29 06:31:50.877415',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:31:50.869Z","updated_at":"2022-09-29T06:31:50.869Z"}','2022-09-29 06:31:50.877415','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:31:50.878926"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:31:50.879418"], ["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-09-29 06:31:50.880681"], ["updated_at", "2022-09-29 06:31:50.880681"]] 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-09-29 06:31:50.881620"], ["updated_at", "2022-09-29 06:31:50.881620"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:31:50.608000"], ["updated_at", "2022-09-29 06:31:50.608000"], ["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-09-29 06:31:50.869000"], ["updated_at", "2022-09-29 06:31:50.869000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (0.1ms) 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! ------------------------------------ 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:31:50.608000"], ["updated_at", "2022-09-29 06:31:50.608000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) 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.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  (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';  (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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:04.140088"], ["updated_at", "2022-09-29 06:32:04.140088"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.162697"]] 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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.182681',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.186915"]] 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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.190531',NULL) TRANSACTION (0.6ms) 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.2ms) 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-09-29 06:32:04.233789"], ["updated_at", "2022-09-29 06:32:04.233789"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.236749"]] 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.1ms) SAVEPOINT active_record_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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.239651',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:32:04.233Z","updated_at":"2022-09-29T06:32:04.233Z"}','2022-09-29 06:32:04.239651','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.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:32:04.249410"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:32:04.258510"], ["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.1ms) 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-09-29 06:32:04.269807"], ["updated_at", "2022-09-29 06:32:04.269807"]] TRANSACTION (9.5ms) 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-09-29 06:32:04.280684"], ["updated_at", "2022-09-29 06:32:04.280684"]] TRANSACTION (0.1ms) 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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:32:04.140000"], ["updated_at", "2022-09-29 06:32:04.140000"], ["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-09-29 06:32:04.233000"], ["updated_at", "2022-09-29 06:32:04.233000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (5.9ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) 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]] CACHE 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_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-09-29 06:32:04.323305"], ["updated_at", "2022-09-29 06:32:04.323305"]] 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-09-29 06:32:04.324955"], ["updated_at", "2022-09-29 06:32:04.324955"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.327948"]] 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.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":"2022-09-29T06:32:04.323Z","updated_at":"2022-09-29T06:32:04.323Z"}','2022-09-29 06:32:04.331789',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:32:04.324Z","updated_at":"2022-09-29T06:32:04.324Z"}','2022-09-29 06:32:04.331789','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.4ms) rollback transaction TRANSACTION (0.0ms) begin 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 -------------------------- 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]] CACHE 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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:04.140000"], ["updated_at", "2022-09-29 06:32:04.140000"], ["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 -------------------------------------- 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.1ms) 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-09-29 06:32:04.350743"], ["updated_at", "2022-09-29 06:32:04.350743"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.353320"]] 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":"2022-09-29T06:32:04.350Z","updated_at":"2022-09-29T06:32:04.350Z"}','2022-09-29 06:32:04.354755',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-09-29 06:32:04.355520"], ["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_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.2ms) 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.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]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:32:04.388301"]] 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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.391420',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.394136"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.397611',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.399402"]] 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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.401947',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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.418912"]] 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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.422075',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.426180"]] 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.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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.430465',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:04.431919"]] 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.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":"2022-09-29T06:32:04.140Z","updated_at":"2022-09-29T06:32:04.140Z"}','2022-09-29 06:32:04.434432',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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]] CACHE 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.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) 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.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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:04.140000"], ["updated_at", "2022-09-29 06:32:04.140000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction  (1.3ms) 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';  (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", "2022-09-29 06:32:09.980924"], ["updated_at", "2022-09-29 06:32:09.980924"]] 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 (7.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:09.995929"]] 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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.023141',NULL) TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.027700"]] 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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.031360',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 --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-29 06:32:10.084521"], ["updated_at", "2022-09-29 06:32:10.084521"]] 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.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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.096095"]] 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.1ms) 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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.128493',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:32:10.084Z","updated_at":"2022-09-29T06:32:10.084Z"}','2022-09-29 06:32:10.128493','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-30 06:32:10.145885"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:32:10.146491"], ["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-09-29 06:32:10.147748"], ["updated_at", "2022-09-29 06:32:10.147748"]] 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-09-29 06:32:10.148571"], ["updated_at", "2022-09-29 06:32:10.148571"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:32:09.980000"], ["updated_at", "2022-09-29 06:32:09.980000"], ["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-09-29 06:32:10.084000"], ["updated_at", "2022-09-29 06:32:10.084000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ------------------------------------ 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:09.980000"], ["updated_at", "2022-09-29 06:32:09.980000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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]] 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_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-09-29 06:32:10.180462"], ["updated_at", "2022-09-29 06:32:10.180462"]] 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-09-29 06:32:10.182332"], ["updated_at", "2022-09-29 06:32:10.182332"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.185148"]] 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":"2022-09-29T06:32:10.180Z","updated_at":"2022-09-29T06:32:10.180Z"}','2022-09-29 06:32:10.188750',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:32:10.182Z","updated_at":"2022-09-29T06:32:10.182Z"}','2022-09-29 06:32:10.188750','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_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]] CACHE 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_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_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.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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:09.980000"], ["updated_at", "2022-09-29 06:32:09.980000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) 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-09-29 06:32:10.210095"], ["updated_at", "2022-09-29 06:32:10.210095"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.212625"]] TRANSACTION (0.0ms) RELEASE 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,3,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T06:32:10.210Z","updated_at":"2022-09-29T06:32:10.210Z"}','2022-09-29 06:32:10.213884',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-29 06:32:10.214660"], ["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.5ms) 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" = ? 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 ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.226324"]] 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.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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.229191',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.230476"]] 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.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.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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.233566',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:32:10.237718"]] 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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.240627',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.242223"]] 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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.244432',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.245808"]] 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.248189',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]] 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:10.268974"]] 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":"2022-09-29T06:32:09.980Z","updated_at":"2022-09-29T06:32:09.980Z"}','2022-09-29 06:32:10.272397',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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]]  (6.9ms) DELETE FROM posts;  (1.0ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:16.394631"], ["updated_at", "2022-09-29 06:32:16.394631"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.417257"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.436862',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.440949"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.444653',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.484734"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.487831',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.488795"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.491251',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:32:16.494713"]] 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]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.525096',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.546031"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.555421',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.557203"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.559243',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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.575806"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.579219',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] 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_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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:32:16.594799"], ["updated_at", "2022-09-29 06:32:16.594799"]] 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.598457"]] 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":"2022-09-29T06:32:16.394Z","updated_at":"2022-09-29T06:32:16.394Z"}','2022-09-29 06:32:16.601997',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:32:16.594Z","updated_at":"2022-09-29T06:32:16.594Z"}','2022-09-29 06:32:16.601997','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-09-30 06:32:16.603406"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:32:16.603985"], ["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-09-29 06:32:16.605379"], ["updated_at", "2022-09-29 06:32:16.605379"]] 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-09-29 06:32:16.606330"], ["updated_at", "2022-09-29 06:32:16.606330"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:32:16.394000"], ["updated_at", "2022-09-29 06:32:16.394000"], ["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-09-29 06:32:16.594000"], ["updated_at", "2022-09-29 06:32:16.594000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:16.394000"], ["updated_at", "2022-09-29 06:32:16.394000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_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.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::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_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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:16.394000"], ["updated_at", "2022-09-29 06:32:16.394000"], ["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.0ms) 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_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-09-29 06:32:16.648512"], ["updated_at", "2022-09-29 06:32:16.648512"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.651749"]] 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":"2022-09-29T06:32:16.648Z","updated_at":"2022-09-29T06:32:16.648Z"}','2022-09-29 06:32:16.653172',NULL) TRANSACTION (0.1ms) 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-09-29 06:32:16.654092"], ["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.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" = ? 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_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-09-29 06:32:16.678420"], ["updated_at", "2022-09-29 06:32:16.678420"]] 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-09-29 06:32:16.681726"], ["updated_at", "2022-09-29 06:32:16.681726"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:16.684435"]] 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":"2022-09-29T06:32:16.678Z","updated_at":"2022-09-29T06:32:16.678Z"}','2022-09-29 06:32:16.688687',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:32:16.681Z","updated_at":"2022-09-29T06:32:16.681Z"}','2022-09-29 06:32:16.688687','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.4ms) 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ----------------------------------------------- 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';  (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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:22.386142"], ["updated_at", "2022-09-29 06:32:22.386142"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.408894"]] 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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.428706',NULL) TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.433248"]] 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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.436585',NULL) TRANSACTION (0.6ms) commit 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_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]] CACHE 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.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:22.386000"], ["updated_at", "2022-09-29 06:32:22.386000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_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_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" = ? 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:32:22.555684"], ["updated_at", "2022-09-29 06:32:22.555684"]] 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", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.559165"]] 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":"2022-09-29T06:32:22.555Z","updated_at":"2022-09-29T06:32:22.555Z"}','2022-09-29 06:32:22.560764',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-09-29 06:32:22.561920"], ["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 (165.1ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:32:22.747768"], ["updated_at", "2022-09-29 06:32:22.747768"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.9ms) 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-09-29 06:32:22.753078"], ["updated_at", "2022-09-29 06:32:22.753078"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.756490"]] 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":"2022-09-29T06:32:22.747Z","updated_at":"2022-09-29T06:32:22.747Z"}','2022-09-29 06:32:22.760597',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:32:22.753Z","updated_at":"2022-09-29T06:32:22.753Z"}','2022-09-29 06:32:22.760597','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 ----------------------------- 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:32:22.386000"], ["updated_at", "2022-09-29 06:32:22.386000"], ["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_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-09-29 06:32:22.784390"], ["updated_at", "2022-09-29 06:32:22.784390"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.787593"]] 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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.790316',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:32:22.784Z","updated_at":"2022-09-29T06:32:22.784Z"}','2022-09-29 06:32:22.790316','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-09-30 06:32:22.791822"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:32:22.792447"], ["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-09-29 06:32:22.794070"], ["updated_at", "2022-09-29 06:32:22.794070"]] 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-09-29 06:32:22.795300"], ["updated_at", "2022-09-29 06:32:22.795300"]] 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.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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:32:22.386000"], ["updated_at", "2022-09-29 06:32:22.386000"], ["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-09-29 06:32:22.784000"], ["updated_at", "2022-09-29 06:32:22.784000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:32:22.810389"]] 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.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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.814293',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.816116"]] 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.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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.818893',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.820455"]] 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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.822646',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.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.833548"]] 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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.836907',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.838040"]] 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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.840378',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:32:22.855829"]] 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.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":"2022-09-29T06:32:22.386Z","updated_at":"2022-09-29T06:32:22.386Z"}','2022-09-29 06:32:22.858704',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) 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]]  (6.7ms) DELETE FROM posts;  (0.9ms) 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.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", "2022-09-29 06:34:28.906773"], ["updated_at", "2022-09-29 06:34:28.906773"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:28.930107"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:28.950161',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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:28.954605"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:28.957905',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:34:28.906000"], ["updated_at", "2022-09-29 06:34:28.906000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_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.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::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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.086860"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.089743',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.093605"]] 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.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.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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.097773',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.099758"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.102457',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:34:29.105983"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.108826',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.111082"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.114641',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.116439"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.119226',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_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.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-09-29 06:34:29.127423"], ["updated_at", "2022-09-29 06:34:29.127423"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.131502"]] 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":"2022-09-29T06:34:28.906Z","updated_at":"2022-09-29T06:34:28.906Z"}','2022-09-29 06:34:29.134875',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:34:29.127Z","updated_at":"2022-09-29T06:34:29.127Z"}','2022-09-29 06:34:29.134875','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-09-30 06:34:29.136153"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:34:29.136623"], ["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-09-29 06:34:29.137810"], ["updated_at", "2022-09-29 06:34:29.137810"]] 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", "2022-09-29 06:34:29.138649"], ["updated_at", "2022-09-29 06:34:29.138649"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:34:28.906000"], ["updated_at", "2022-09-29 06:34:28.906000"], ["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-09-29 06:34:29.127000"], ["updated_at", "2022-09-29 06:34:29.127000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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_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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:34:28.906000"], ["updated_at", "2022-09-29 06:34:28.906000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) 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.2ms) 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_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-09-29 06:34:29.169204"], ["updated_at", "2022-09-29 06:34:29.169204"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.171753"]] 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":"2022-09-29T06:34:29.169Z","updated_at":"2022-09-29T06:34:29.169Z"}','2022-09-29 06:34:29.172999',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-09-29 06:34:29.173769"], ["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_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-09-29 06:34:29.179912"], ["updated_at", "2022-09-29 06:34:29.179912"]] 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", "Example comment"], ["post_id", 2], ["created_at", "2022-09-29 06:34:29.182094"], ["updated_at", "2022-09-29 06:34:29.182094"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:34:29.184151"]] 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.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":"2022-09-29T06:34:29.179Z","updated_at":"2022-09-29T06:34:29.179Z"}','2022-09-29 06:34:29.187309',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:34:29.182Z","updated_at":"2022-09-29T06:34:29.182Z"}','2022-09-29 06:34:29.187309','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 --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- 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';  (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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:17.613862"], ["updated_at", "2022-09-29 06:35:17.613862"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:17.636437"]] 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":"2022-09-29T06:35:17.613Z","updated_at":"2022-09-29T06:35:17.613Z"}','2022-09-29 06:35:17.656734',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:17.661254"]] 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":"2022-09-29T06:35:17.613Z","updated_at":"2022-09-29T06:35:17.613Z"}','2022-09-29 06:35:17.664565',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 -------------------------------------- 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]] CACHE 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_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (6.8ms) 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 -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-29 06:35:17.781913"], ["updated_at", "2022-09-29 06:35:17.781913"]] 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-09-29 06:35:17.786911"], ["updated_at", "2022-09-29 06:35:17.786911"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:17.789113"]] 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":"2022-09-29T06:35:17.781Z","updated_at":"2022-09-29T06:35:17.781Z"}','2022-09-29 06:35:17.792529',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:35:17.786Z","updated_at":"2022-09-29T06:35:17.786Z"}','2022-09-29 06:35:17.792529','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.4ms) 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-09-29 06:35:17.799506"], ["updated_at", "2022-09-29 06:35:17.799506"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:17.802910"]] 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":"2022-09-29T06:35:17.799Z","updated_at":"2022-09-29T06:35:17.799Z"}','2022-09-29 06:35:17.804188',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-09-29 06:35:17.805003"], ["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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:17.613000"], ["updated_at", "2022-09-29 06:35:17.613000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- 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_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.4ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:35:17.822589"], ["updated_at", "2022-09-29 06:35:17.822589"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:17.825466"]] 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":"2022-09-29T06:35:17.613Z","updated_at":"2022-09-29T06:35:17.613Z"}','2022-09-29 06:35:17.828510',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:35:17.822Z","updated_at":"2022-09-29T06:35:17.822Z"}','2022-09-29 06:35:17.828510','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-09-30 06:35:17.829628"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:35:17.830072"], ["id", 1]] TRANSACTION (0.3ms) SAVEPOINT active_record_1 Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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", "2022-09-29 06:35:17.831629"], ["updated_at", "2022-09-29 06:35:17.831629"]] 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", "2022-09-29 06:35:17.833358"], ["updated_at", "2022-09-29 06:35:17.833358"]] 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:35:17.613000"], ["updated_at", "2022-09-29 06:35:17.613000"], ["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-09-29 06:35:17.822000"], ["updated_at", "2022-09-29 06:35:17.822000"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- SnapshotsConcernTest: test_create_snapshot! ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.2ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:35:17.849444"]] 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.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":"2022-09-29T06:35:17.613Z","updated_at":"2022-09-29T06:35:17.613Z"}','2022-09-29 06:35:17.853074',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (1.4ms) 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.7ms) 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';  (0.8ms) DELETE FROM 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:28.136750"], ["updated_at", "2022-09-29 06:35:28.136750"]] 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.151602"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.178564',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.183157"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.186841',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.2ms) 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-09-29 06:35:28.229804"], ["updated_at", "2022-09-29 06:35:28.229804"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.232845"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.235799',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:35:28.229Z","updated_at":"2022-09-29T06:35:28.229Z"}','2022-09-29 06:35:28.235799','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-09-30 06:35:28.236910"], ["id", 1]] Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:35:28.237363"], ["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-09-29 06:35:28.238538"], ["updated_at", "2022-09-29 06:35:28.238538"]] TRANSACTION (0.1ms) 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-09-29 06:35:28.240238"], ["updated_at", "2022-09-29 06:35:28.240238"]] 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.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]] 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:35:28.136000"], ["updated_at", "2022-09-29 06:35:28.136000"], ["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-09-29 06:35:28.229000"], ["updated_at", "2022-09-29 06:35:28.229000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (6.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.313776"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.316781',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.318054"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.320298',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------- SnapshotsConcernTest: test_create_snapshot! ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:35:28.324816"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.327963',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.329549"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.331829',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.333337"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.335723',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) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.359553"]] 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":"2022-09-29T06:35:28.136Z","updated_at":"2022-09-29T06:35:28.136Z"}','2022-09-29 06:35:28.362406',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" 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_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ ActiveSnapshot::Snapshot Load (0.2ms) 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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:28.136000"], ["updated_at", "2022-09-29 06:35:28.136000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback 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.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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ 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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:28.136000"], ["updated_at", "2022-09-29 06:35:28.136000"], ["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.2ms) 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.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-09-29 06:35:28.407144"], ["updated_at", "2022-09-29 06:35:28.407144"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.410295"]] 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":"2022-09-29T06:35:28.407Z","updated_at":"2022-09-29T06:35:28.407Z"}','2022-09-29 06:35:28.411617',NULL) TRANSACTION (0.1ms) 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-09-29 06:35:28.412476"], ["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.3ms) 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_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]] CACHE 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_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 ----------------------------------------------------- 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-09-29 06:35:28.425618"], ["updated_at", "2022-09-29 06:35:28.425618"]] 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-09-29 06:35:28.427452"], ["updated_at", "2022-09-29 06:35:28.427452"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:28.429404"]] 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":"2022-09-29T06:35:28.425Z","updated_at":"2022-09-29T06:35:28.425Z"}','2022-09-29 06:35:28.432460',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:35:28.427Z","updated_at":"2022-09-29T06:35:28.427Z"}','2022-09-29 06:35:28.432460','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.4ms) rollback transaction  (1.3ms) 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]]  (7.1ms) DELETE FROM posts;  (0.9ms) 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.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", "2022-09-29 06:35:59.346748"], ["updated_at", "2022-09-29 06:35:59.346748"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.371434"]] 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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.391693',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.395872"]] 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.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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.399501',NULL) TRANSACTION (0.6ms) commit 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.2ms) 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-09-29 06:35:59.442972"], ["updated_at", "2022-09-29 06:35:59.442972"]] 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-09-29 06:35:59.446782"], ["updated_at", "2022-09-29 06:35:59.446782"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.456955"]] 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":"2022-09-29T06:35:59.442Z","updated_at":"2022-09-29T06:35:59.442Z"}','2022-09-29 06:35:59.499798',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:35:59.446Z","updated_at":"2022-09-29T06:35:59.446Z"}','2022-09-29 06:35:59.499798','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 (7.9ms) 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 -------------------------------------- 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]] CACHE 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 -------------------------- 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:59.346000"], ["updated_at", "2022-09-29 06:35:59.346000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-29 06:35:59.534840"], ["updated_at", "2022-09-29 06:35:59.534840"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.538241"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T06:35:59.534Z","updated_at":"2022-09-29T06:35:59.534Z"}','2022-09-29 06:35:59.539608',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-09-29 06:35:59.540611"], ["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.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" = ? 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 ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.553397"]] 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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.557179',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.558245"]] 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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.560697',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:35:59.564624"]] 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.1ms) 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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.568459',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.570778"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.573344',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.575116"]] 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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.577500',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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.597387"]] 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.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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.601235',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) 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.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.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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:35:59.346000"], ["updated_at", "2022-09-29 06:35:59.346000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) 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.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:35:59.633497"], ["updated_at", "2022-09-29 06:35:59.633497"]] 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 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:35:59.636898"]] 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":"2022-09-29T06:35:59.346Z","updated_at":"2022-09-29T06:35:59.346Z"}','2022-09-29 06:35:59.640370',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:35:59.633Z","updated_at":"2022-09-29T06:35:59.633Z"}','2022-09-29 06:35:59.640370','comments') TRANSACTION (0.1ms) 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-09-30 06:35:59.641626"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:35:59.642102"], ["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.1ms) 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-09-29 06:35:59.643303"], ["updated_at", "2022-09-29 06:35:59.643303"]] 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-09-29 06:35:59.644182"], ["updated_at", "2022-09-29 06:35:59.644182"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:35:59.346000"], ["updated_at", "2022-09-29 06:35:59.346000"], ["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-09-29 06:35:59.633000"], ["updated_at", "2022-09-29 06:35:59.633000"]] 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]] CACHE 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]] Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) rollback transaction  (1.4ms) 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.8ms) DELETE FROM 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:36:09.043525"], ["updated_at", "2022-09-29 06:36:09.043525"]] TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.066767"]] TRANSACTION (0.6ms) commit transaction Post Load (0.2ms) 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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.088809',NULL) TRANSACTION (0.7ms) commit transaction Post Update (0.9ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.093601"]] 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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.097237',NULL) TRANSACTION (0.7ms) 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.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-09-29 06:36:09.144050"], ["updated_at", "2022-09-29 06:36:09.144050"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.147124"]] 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":"2022-09-29T06:36:09.144Z","updated_at":"2022-09-29T06:36:09.144Z"}','2022-09-29 06:36:09.148928',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-09-29 06:36:09.149958"], ["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.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.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 ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (10.3ms) 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" = ? 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_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]] CACHE 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.6ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:36:09.043000"], ["updated_at", "2022-09-29 06:36:09.043000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) 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.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_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-09-29 06:36:09.243078"], ["updated_at", "2022-09-29 06:36:09.243078"]] 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-09-29 06:36:09.251433"], ["updated_at", "2022-09-29 06:36:09.251433"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.254804"]] 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":"2022-09-29T06:36:09.243Z","updated_at":"2022-09-29T06:36:09.243Z"}','2022-09-29 06:36:09.261304',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:36:09.251Z","updated_at":"2022-09-29T06:36:09.251Z"}','2022-09-29 06:36:09.261304','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.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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_validations ---------------------------------- 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.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.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.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.1ms) SAVEPOINT active_record_1 Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:36:09.043000"], ["updated_at", "2022-09-29 06:36:09.043000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ 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-09-29 06:36:09.296475"], ["updated_at", "2022-09-29 06:36:09.296475"]] TRANSACTION (0.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.299906"]] 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.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.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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.304245',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:36:09.296Z","updated_at":"2022-09-29T06:36:09.296Z"}','2022-09-29 06:36:09.304245','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-09-30 06:36:09.305807"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:36:09.306569"], ["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-09-29 06:36:09.308227"], ["updated_at", "2022-09-29 06:36:09.308227"]] 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-09-29 06:36:09.309131"], ["updated_at", "2022-09-29 06:36:09.309131"]] 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:36:09.043000"], ["updated_at", "2022-09-29 06:36:09.043000"], ["id", 1]] Comment Create (0.2ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:36:09.296000"], ["updated_at", "2022-09-29 06:36:09.296000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- 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 ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.323780"]] 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.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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.326800',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.327789"]] 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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.329964',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.343937"]] 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.1ms) 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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.347325',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:36:09.355323"]] 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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.359403',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.361473"]] 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.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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.364868',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:36:09.367460"]] 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":"2022-09-29T06:36:09.043Z","updated_at":"2022-09-29T06:36:09.043Z"}','2022-09-29 06:36:09.370274',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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) 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]]  (6.7ms) 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.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:41:01.436232"], ["updated_at", "2022-09-29 06:41:01.436232"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.459113"]] 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.479438',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.483738"]] 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.487548',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- 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.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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:41:01.436000"], ["updated_at", "2022-09-29 06:41:01.436000"], ["id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.7ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.1ms) 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_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.623991"]] 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.628436',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:41:01.632684"]] 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.635487',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.637199"]] 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.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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.640292',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.642701"]] 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.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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.645526',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_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.650611"]] 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.653489',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.654725"]] 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.3ms) 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.658452',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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_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.1ms) SAVEPOINT active_record_1 Comment Create (0.5ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 06:41:01.672910"], ["updated_at", "2022-09-29 06:41:01.672910"]] TRANSACTION (0.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.676876"]] 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":"2022-09-29T06:41:01.436Z","updated_at":"2022-09-29T06:41:01.436Z"}','2022-09-29 06:41:01.680335',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:41:01.672Z","updated_at":"2022-09-29T06:41:01.672Z"}','2022-09-29 06:41:01.680335','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:41:01.681662"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:41:01.682152"], ["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-09-29 06:41:01.683357"], ["updated_at", "2022-09-29 06:41:01.683357"]] 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", "2022-09-29 06:41:01.684223"], ["updated_at", "2022-09-29 06:41:01.684223"]] 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.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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:41:01.436000"], ["updated_at", "2022-09-29 06:41:01.436000"], ["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-09-29 06:41:01.672000"], ["updated_at", "2022-09-29 06:41:01.672000"]] 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" 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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_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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) 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" = ? 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.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-09-29 06:41:01.706302"], ["updated_at", "2022-09-29 06:41:01.706302"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.709494"]] 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":"2022-09-29T06:41:01.706Z","updated_at":"2022-09-29T06:41:01.706Z"}','2022-09-29 06:41:01.710903',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-09-29 06:41:01.711734"], ["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.3ms) 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_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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:41:01.436000"], ["updated_at", "2022-09-29 06:41:01.436000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.1ms) 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-09-29 06:41:01.726664"], ["updated_at", "2022-09-29 06:41:01.726664"]] 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", "Example comment"], ["post_id", 2], ["created_at", "2022-09-29 06:41:01.728717"], ["updated_at", "2022-09-29 06:41:01.728717"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:41:01.730785"]] 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":"2022-09-29T06:41:01.726Z","updated_at":"2022-09-29T06:41:01.726Z"}','2022-09-29 06:41:01.734158',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:41:01.728Z","updated_at":"2022-09-29T06:41:01.728Z"}','2022-09-29 06:41:01.734158','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  (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.8ms) 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.8ms) DELETE FROM snapshot_items;  (0.6ms) 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-09-29 06:43:40.170587"], ["updated_at", "2022-09-29 06:43:40.170587"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.193636"]] TRANSACTION (0.7ms) commit transaction Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.4ms) 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.213309',NULL) TRANSACTION (0.8ms) commit transaction Post Update (0.9ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.218099"]] 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.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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.221883',NULL) TRANSACTION (0.8ms) commit transaction TRANSACTION (0.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback 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.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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:43:40.170000"], ["updated_at", "2022-09-29 06:43:40.170000"], ["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.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.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::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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.353417"]] 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.356730',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.357716"]] 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.360010',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:43:40.363599"]] 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.1ms) 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.367291',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.369626"]] 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.372132',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.373864"]] 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.375946',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.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.391497"]] 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.394530',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) 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.4ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:43:40.170000"], ["updated_at", "2022-09-29 06:43:40.170000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_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-09-29 06:43:40.411240"], ["updated_at", "2022-09-29 06:43:40.411240"]] 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", "Example comment"], ["post_id", 2], ["created_at", "2022-09-29 06:43:40.415250"], ["updated_at", "2022-09-29 06:43:40.415250"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.417598"]] 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":"2022-09-29T06:43:40.411Z","updated_at":"2022-09-29T06:43:40.411Z"}','2022-09-29 06:43:40.420865',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:43:40.415Z","updated_at":"2022-09-29T06:43:40.415Z"}','2022-09-29 06:43:40.420865','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_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" = ? 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.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-09-29 06:43:40.430923"], ["updated_at", "2022-09-29 06:43:40.430923"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.433845"]] 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":"2022-09-29T06:43:40.430Z","updated_at":"2022-09-29T06:43:40.430Z"}','2022-09-29 06:43:40.435385',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-09-29 06:43:40.436359"], ["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.3ms) 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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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 -------------------------------------------- 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.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-09-29 06:43:40.447800"], ["updated_at", "2022-09-29 06:43:40.447800"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:43:40.451218"]] 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":"2022-09-29T06:43:40.170Z","updated_at":"2022-09-29T06:43:40.170Z"}','2022-09-29 06:43:40.454329',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:43:40.447Z","updated_at":"2022-09-29T06:43:40.447Z"}','2022-09-29 06:43:40.454329','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-09-30 06:43:40.455541"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:43:40.455986"], ["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-09-29 06:43:40.457162"], ["updated_at", "2022-09-29 06:43:40.457162"]] 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-09-29 06:43:40.458003"], ["updated_at", "2022-09-29 06:43:40.458003"]] TRANSACTION (0.1ms) 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 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:43:40.170000"], ["updated_at", "2022-09-29 06:43:40.170000"], ["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-09-29 06:43:40.447000"], ["updated_at", "2022-09-29 06:43:40.447000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction  (1.2ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.2ms) 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.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.3ms) 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-09-29 06:45:37.150202"], ["updated_at", "2022-09-29 06:45:37.150202"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.173630"]] 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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.194643',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.198776"]] 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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.202530',NULL) TRANSACTION (0.6ms) 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.2ms) 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-09-29 06:45:37.245360"], ["updated_at", "2022-09-29 06:45:37.245360"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.248454"]] 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.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.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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.259826',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:45:37.245Z","updated_at":"2022-09-29T06:45:37.245Z"}','2022-09-29 06:45:37.259826','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-30 06:45:37.270205"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:45:37.270838"], ["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.1ms) 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-09-29 06:45:37.289306"], ["updated_at", "2022-09-29 06:45:37.289306"]] 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-09-29 06:45:37.290751"], ["updated_at", "2022-09-29 06:45:37.290751"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::SnapshotItem Count (5.9ms) 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.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.3ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:45:37.150000"], ["updated_at", "2022-09-29 06:45:37.150000"], ["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-09-29 06:45:37.245000"], ["updated_at", "2022-09-29 06:45:37.245000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (5.9ms) 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.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.0ms) SAVEPOINT active_record_1 Post Update (0.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:45:37.150000"], ["updated_at", "2022-09-29 06:45:37.150000"], ["id", 1]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) 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.3ms) 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.3ms) 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- 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.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 ------------------------------ 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" = ? 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_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-09-29 06:45:37.372335"], ["updated_at", "2022-09-29 06:45:37.372335"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.375603"]] 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":"2022-09-29T06:45:37.372Z","updated_at":"2022-09-29T06:45:37.372Z"}','2022-09-29 06:45:37.376996',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ParentWithoutChildren Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-09-29 06:45:37.378276"], ["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]] CACHE 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.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:45:37.150000"], ["updated_at", "2022-09-29 06:45:37.150000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] CACHE 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_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-09-29 06:45:37.394233"], ["updated_at", "2022-09-29 06:45:37.394233"]] 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-09-29 06:45:37.396639"], ["updated_at", "2022-09-29 06:45:37.396639"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.398761"]] 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":"2022-09-29T06:45:37.394Z","updated_at":"2022-09-29T06:45:37.394Z"}','2022-09-29 06:45:37.402324',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:45:37.396Z","updated_at":"2022-09-29T06:45:37.396Z"}','2022-09-29 06:45:37.402324','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.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.411166"]] 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.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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.414917',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.416172"]] 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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.418870',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:45:37.422194"]] 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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.425264',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.427038"]] 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.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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.430668',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.432660"]] 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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.435332',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_relationships ---------------------------------------- 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:45:37.456580"]] 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.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":"2022-09-29T06:45:37.150Z","updated_at":"2022-09-29T06:45:37.150Z"}','2022-09-29 06:45:37.460070',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction  (1.3ms) SELECT sqlite_version(*) ActiveRecord::SchemaMigration Pluck (0.2ms) 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;  (1.4ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (1.0ms) 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", "2022-09-29 06:49:24.182026"], ["updated_at", "2022-09-29 06:49:24.182026"]] TRANSACTION (0.6ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.205254"]] 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-09-29 06:49:24.182026000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.225944',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.230231"]] 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-09-29 06:49:24.182026000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.234700',NULL) TRANSACTION (0.7ms) commit 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.3ms) 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.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_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 (5.7ms) 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_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.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-09-29 06:49:24.367196"], ["updated_at", "2022-09-29 06:49:24.367196"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.370602"]] 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.1ms) SAVEPOINT active_record_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: 2022-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.375532',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.367196000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.367196000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.367196000 Z zone: *1 time: 2022-09-29 06:49:24.367196000 Z ','2022-09-29 06:49:24.375532','comments') 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" Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:49:24.377176"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:49:24.378124"], ["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-09-29 06:49:24.379495"], ["updated_at", "2022-09-29 06:49:24.379495"]] 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-09-29 06:49:24.380411"], ["updated_at", "2022-09-29 06:49:24.380411"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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", "2022-09-29 06:49:24.182026"], ["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-09-29 06:49:24.367196"], ["updated_at", "2022-09-29 06:49:24.367196"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.403778"]] 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-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.407200',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.412334"]] 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.1ms) 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-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.415875',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.416969"]] 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.2ms) 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-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.419522',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-09-29 06:49:24.432227"]] 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-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.435654',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.437511"]] 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-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.440444',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.441999"]] 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.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: 2022-09-29 06:49:24.182026000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.182026000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.182026000 Z zone: *1 time: 2022-09-29 06:49:24.182026000 Z ','2022-09-29 06:49:24.444617',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 ------------------------------ 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" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.1ms) 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-09-29 06:49:24.458186"], ["updated_at", "2022-09-29 06:49:24.458186"]] 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-09-29 06:49:24.460144"], ["updated_at", "2022-09-29 06:49:24.460144"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.462631"]] 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-09-29 06:49:24.458186000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.458186000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-29 06:49:24.458186000 Z ','2022-09-29 06:49:24.467924',NULL),(NULL,3,'Comment',1,'--- id: 1 content: Example comment post_id: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.460144000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.460144000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: 2022-09-29 06:49:24.460144000 Z zone: *1 time: 2022-09-29 06:49:24.460144000 Z ','2022-09-29 06:49:24.467924','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_relationships -------------------------------- 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]] CACHE 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]] CACHE 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]] 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] TRANSACTION (0.1ms) 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.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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:49:24.489429"], ["updated_at", "2022-09-29 06:49:24.489429"]] 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.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "--- {}\n"], ["created_at", "2022-09-29 06:49:24.492445"]] TRANSACTION (0.0ms) RELEASE 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,3,'ParentWithoutChildren',2,'--- id: 2 a: 1 b: 2 created_at: !ruby/object:ActiveSupport::TimeWithZone utc: &1 2022-09-29 06:49:24.489429000 Z zone: &2 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC time: 2022-09-29 06:49:24.489429000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone utc: *1 zone: *2 time: 2022-09-29 06:49:24.489429000 Z ','2022-09-29 06:49:24.494440',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-09-29 06:49:24.495442"], ["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  (1.4ms) 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.5ms) 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.8ms) DELETE FROM snapshot_items;  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] TRANSACTION (0.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:50:21.629455"], ["updated_at", "2022-09-29 06:50:21.629455"]] TRANSACTION (0.7ms) commit transaction TRANSACTION (0.1ms) 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", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:21.645954"]] TRANSACTION (0.8ms) commit transaction Post Load (0.2ms) 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.2ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]  (0.1ms) SELECT sqlite_version(*) TRANSACTION (0.0ms) begin transaction ActiveSnapshot::SnapshotItem Create Many (0.4ms) 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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:21.675991',NULL) TRANSACTION (0.7ms) commit transaction Post Update (0.9ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:21.681304"]] 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]] 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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:21.686137',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction --------------------------- SnapshotTest: test_metadata --------------------------- ActiveSnapshot::Snapshot Load (0.3ms) 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 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:50:21.629000"], ["updated_at", "2022-09-29 06:50:21.629000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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]] CACHE Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) 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.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:50:21.750219"], ["updated_at", "2022-09-29 06:50:21.750219"]] TRANSACTION (0.0ms) 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-09-29 06:50:21.773441"], ["updated_at", "2022-09-29 06:50:21.773441"]] 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", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:21.787029"]] 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":"2022-09-29T06:50:21.750Z","updated_at":"2022-09-29T06:50:21.750Z"}','2022-09-29 06:50:21.819931',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T06:50:21.773Z","updated_at":"2022-09-29T06:50:21.773Z"}','2022-09-29 06:50:21.819931','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 (179.3ms) rollback transaction TRANSACTION (0.1ms) 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.7ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-29 06:50:22.009964"], ["updated_at", "2022-09-29 06:50:22.009964"]] 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", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.014244"]] 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":"2022-09-29T06:50:22.009Z","updated_at":"2022-09-29T06:50:22.009Z"}','2022-09-29 06:50:22.016142',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-09-29 06:50:22.017061"], ["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.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.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] 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.2ms) 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 ----------------------------- 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_relationships ------------------------------------ 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.1ms) 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 06:50:21.629000"], ["updated_at", "2022-09-29 06:50:21.629000"], ["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.7ms) 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.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", "Foobar"], ["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.2ms) 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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.069002"]] 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.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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.073276',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (2.7ms) rollback transaction TRANSACTION (0.1ms) 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.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 06:50:22.082075"]] 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.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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.086790',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 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.089943"]] 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.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.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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.094245',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.096435"]] 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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.2ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.101675',NULL) 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", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.5ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.108806"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.112536',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.114182"]] 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.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.118281',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) 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 ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] 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-09-29 06:50:22.142787"], ["updated_at", "2022-09-29 06:50:22.142787"]] 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.2ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 06:50:22.147912"]] 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.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) SAVEPOINT active_record_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":"2022-09-29T06:50:21.629Z","updated_at":"2022-09-29T06:50:21.629Z"}','2022-09-29 06:50:22.153276',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T06:50:22.142Z","updated_at":"2022-09-29T06:50:22.142Z"}','2022-09-29 06:50:22.153276','comments') TRANSACTION (0.1ms) RELEASE 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-09-30 06:50:22.154974"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 06:50:22.155749"], ["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-09-29 06:50:22.157225"], ["updated_at", "2022-09-29 06:50:22.157225"]] 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-09-29 06:50:22.158124"], ["updated_at", "2022-09-29 06:50:22.158124"]] 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.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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 06:50:21.629000"], ["updated_at", "2022-09-29 06:50:21.629000"], ["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-09-29 06:50:22.142000"], ["updated_at", "2022-09-29 06:50:22.142000"]] 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.2ms) 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]] CACHE 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]] Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) rollback transaction  (1.3ms) 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;  (1.6ms) 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", "2022-09-29 07:04:40.180810"], ["updated_at", "2022-09-29 07:04:40.180810"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.195936"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.222525',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.227007"]] 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.230445',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 -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- 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.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-09-29 07:04:40.286669"], ["updated_at", "2022-09-29 07:04:40.286669"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.290052"]] 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.293454',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T07:04:40.286Z","updated_at":"2022-09-29T07:04:40.286Z"}','2022-09-29 07:04:40.293454','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-09-30 07:04:40.294625"], ["id", 1]] Post Update (6.5ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 07:04:40.295152"], ["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.1ms) 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-09-29 07:04:40.303231"], ["updated_at", "2022-09-29 07:04:40.303231"]] 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-09-29 07:04:40.311331"], ["updated_at", "2022-09-29 07:04:40.311331"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items" TRANSACTION (0.1ms) SAVEPOINT active_record_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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 07:04:40.180000"], ["updated_at", "2022-09-29 07:04:40.180000"], ["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-09-29 07:04:40.286000"], ["updated_at", "2022-09-29 07:04:40.286000"]] TRANSACTION (0.3ms) RELEASE SAVEPOINT active_record_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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.374186"]] 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.377343',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" 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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.3ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.389823"]] 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.393038',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.394006"]] 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.396286',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 07:04:40.399856"]] 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.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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.403937',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.405742"]] TRANSACTION (0.2ms) 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.408403',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.409809"]] 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":"2022-09-29T07:04:40.180Z","updated_at":"2022-09-29T07:04:40.180Z"}','2022-09-29 07:04:40.412129',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------- 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_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-09-29 07:04:40.424693"], ["updated_at", "2022-09-29 07:04:40.424693"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.427190"]] 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":"2022-09-29T07:04:40.424Z","updated_at":"2022-09-29T07:04:40.424Z"}','2022-09-29 07:04:40.428668',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-09-29 07:04:40.429481"], ["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.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:04:40.180000"], ["updated_at", "2022-09-29 07:04:40.180000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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_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" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ----------------------------------------------------- SnapshotTest: test_fetch_reified_items_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-09-29 07:04:40.446849"], ["updated_at", "2022-09-29 07:04:40.446849"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) 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-09-29 07:04:40.448520"], ["updated_at", "2022-09-29 07:04:40.448520"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:04:40.451107"]] 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.3ms) 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":"2022-09-29T07:04:40.446Z","updated_at":"2022-09-29T07:04:40.446Z"}','2022-09-29 07:04:40.455148',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T07:04:40.448Z","updated_at":"2022-09-29T07:04:40.448Z"}','2022-09-29 07:04:40.455148','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_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]] CACHE 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_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.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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:04:40.180000"], ["updated_at", "2022-09-29 07:04:40.180000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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]]  (6.7ms) 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.0ms) begin transaction Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:06:33.620036"], ["updated_at", "2022-09-29 07:06:33.620036"]] TRANSACTION (0.7ms) commit transaction TRANSACTION (0.3ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.634796"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.661049',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.665627"]] 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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.668987',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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-09-29 07:06:33.709463"], ["updated_at", "2022-09-29 07:06:33.709463"]] 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-09-29 07:06:33.713251"], ["updated_at", "2022-09-29 07:06:33.713251"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.715346"]] 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":"2022-09-29T07:06:33.709Z","updated_at":"2022-09-29T07:06:33.709Z"}','2022-09-29 07:06:33.718452',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T07:06:33.713Z","updated_at":"2022-09-29T07:06:33.713Z"}','2022-09-29 07:06:33.718452','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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 -------------------------- SnapshotTest: test_restore -------------------------- 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]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:06:33.620000"], ["updated_at", "2022-09-29 07:06:33.620000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- 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]] CACHE 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_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_single_model_snapshots_without_children ---------------------------------------------------------- TRANSACTION (0.0ms) 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-09-29 07:06:33.797824"], ["updated_at", "2022-09-29 07:06:33.797824"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.800628"]] 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":"2022-09-29T07:06:33.797Z","updated_at":"2022-09-29T07:06:33.797Z"}','2022-09-29 07:06:33.801844',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) 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-09-29 07:06:33.802614"], ["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_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" = ? 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.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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:06:33.620000"], ["updated_at", "2022-09-29 07:06:33.620000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.3ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- 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.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_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- 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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.851356"]] 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.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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.854695',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.861011"]] 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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.864367',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.865401"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.867707',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 07:06:33.872065"]] 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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.875432',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.877039"]] 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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.879530',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.881291"]] 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.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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.883595',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 ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" 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-09-29 07:06:33.894751"], ["updated_at", "2022-09-29 07:06:33.894751"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:06:33.897823"]] 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":"2022-09-29T07:06:33.620Z","updated_at":"2022-09-29T07:06:33.620Z"}','2022-09-29 07:06:33.900879',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T07:06:33.894Z","updated_at":"2022-09-29T07:06:33.894Z"}','2022-09-29 07:06:33.900879','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-09-30 07:06:33.902326"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 07:06:33.903319"], ["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-09-29 07:06:33.905081"], ["updated_at", "2022-09-29 07:06:33.905081"]] 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-09-29 07:06:33.906370"], ["updated_at", "2022-09-29 07:06:33.906370"]] 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 07:06:33.620000"], ["updated_at", "2022-09-29 07:06:33.620000"], ["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-09-29 07:06:33.894000"], ["updated_at", "2022-09-29 07:06:33.894000"]] 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" 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]] CACHE 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]] Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) 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]]  (6.7ms) 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.0ms) begin transaction Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:08:25.834810"], ["updated_at", "2022-09-29 07:08:25.834810"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:25.849899"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:25.876762',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:25.881289"]] 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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:25.884674',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) 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-09-29 07:08:25.926405"], ["updated_at", "2022-09-29 07:08:25.926405"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:25.929251"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-29T07:08:25.926Z","updated_at":"2022-09-29T07:08:25.926Z"}','2022-09-29 07:08:25.930439',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-09-29 07:08:25.931335"], ["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_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.1ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- 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]] CACHE 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_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]] CACHE 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.4ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:08:25.834000"], ["updated_at", "2022-09-29 07:08:25.834000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-29 07:08:26.007087"], ["updated_at", "2022-09-29 07:08:26.007087"]] 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-09-29 07:08:26.011254"], ["updated_at", "2022-09-29 07:08:26.011254"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.013447"]] 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":"2022-09-29T07:08:26.007Z","updated_at":"2022-09-29T07:08:26.007Z"}','2022-09-29 07:08:26.016523',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-29T07:08:26.011Z","updated_at":"2022-09-29T07:08:26.011Z"}','2022-09-29 07:08:26.016523','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_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" = ? 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 -------------------------------------------- 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.4ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-09-29 07:08:26.029247"], ["updated_at", "2022-09-29 07:08:26.029247"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.032074"]] 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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.035022',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-29T07:08:26.029Z","updated_at":"2022-09-29T07:08:26.029Z"}','2022-09-29 07:08:26.035022','comments') TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Count (0.0ms) 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-09-30 07:08:26.036530"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-09-30 07:08:26.037410"], ["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-09-29 07:08:26.038943"], ["updated_at", "2022-09-29 07:08:26.038943"]] 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-09-29 07:08:26.039887"], ["updated_at", "2022-09-29 07:08:26.039887"]] 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.3ms) 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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-29 07:08:25.834000"], ["updated_at", "2022-09-29 07:08:25.834000"], ["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-09-29 07:08:26.029000"], ["updated_at", "2022-09-29 07:08:26.029000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-29 07:08:25.834000"], ["updated_at", "2022-09-29 07:08:25.834000"], ["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.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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.093435"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.096972',NULL) TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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_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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-29 07:08:26.101979"]] 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]] 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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.106204',NULL) 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", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.108318"]] 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.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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.111056',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.113000"]] 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.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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.115337',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 ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.120123"]] 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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.122834',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-29 07:08:26.123779"]] 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":"2022-09-29T07:08:25.834Z","updated_at":"2022-09-29T07:08:25.834Z"}','2022-09-29 07:08:26.126011',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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]]  (2.3ms) DELETE FROM posts;  (0.9ms) 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.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.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:14:27.042378"], ["updated_at", "2022-09-30 06:14:27.042378"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.058270"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.084940',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.089449"]] 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.092833',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_restore_item! ------------------------------------ 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]] 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:14:27.042000"], ["updated_at", "2022-09-30 06:14:27.042000"], ["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.3ms) 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.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::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_relationships ------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.172475"]] 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]] 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.208669',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.216180"]] 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,4,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.218806',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.4ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-30 06:14:27.222380"]] 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.225061',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.226496"]] 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.228695',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.230059"]] 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.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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.233640',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_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.249027"]] 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.253036',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] 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.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-09-30 06:14:27.268094"], ["updated_at", "2022-09-30 06:14:27.268094"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.271033"]] 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":"2022-09-30T06:14:27.042Z","updated_at":"2022-09-30T06:14:27.042Z"}','2022-09-30 06:14:27.274211',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-30T06:14:27.268Z","updated_at":"2022-09-30T06:14:27.268Z"}','2022-09-30 06:14:27.274211','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-10-01 06:14:27.275373"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-10-01 06:14:27.275968"], ["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-09-30 06:14:27.277259"], ["updated_at", "2022-09-30 06:14:27.277259"]] 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-09-30 06:14:27.278056"], ["updated_at", "2022-09-30 06:14:27.278056"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-30 06:14:27.042000"], ["updated_at", "2022-09-30 06:14:27.042000"], ["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-09-30 06:14:27.268000"], ["updated_at", "2022-09-30 06:14:27.268000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- 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_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" = ? 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_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-09-30 06:14:27.301014"], ["updated_at", "2022-09-30 06:14:27.301014"]] 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-09-30 06:14:27.302991"], ["updated_at", "2022-09-30 06:14:27.302991"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.304851"]] 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.1ms) 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":"2022-09-30T06:14:27.301Z","updated_at":"2022-09-30T06:14:27.301Z"}','2022-09-30 06:14:27.308194',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-30T06:14:27.302Z","updated_at":"2022-09-30T06:14:27.302Z"}','2022-09-30 06:14:27.308194','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_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]] CACHE 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:14:27.042000"], ["updated_at", "2022-09-30 06:14:27.042000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.2ms) 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-09-30 06:14:27.321215"], ["updated_at", "2022-09-30 06:14:27.321215"]] 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", "ParentWithoutChildren"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:14:27.324071"]] TRANSACTION (0.0ms) RELEASE 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,3,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-30T06:14:27.321Z","updated_at":"2022-09-30T06:14:27.321Z"}','2022-09-30 06:14:27.325413',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-09-30 06:14:27.326315"], ["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.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_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_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]] CACHE 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  (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]]  (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.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", "2022-09-30 06:15:32.736891"], ["updated_at", "2022-09-30 06:15:32.736891"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:32.752322"]] TRANSACTION (0.7ms) commit transaction Post Load (0.2ms) 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:32.778983',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:32.783555"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:32.786832',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 -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) 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.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------- SnapshotTest: test_fetch_reified_items -------------------------------------- ActiveSnapshot::Snapshot Load (0.4ms) 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_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-09-30 06:15:32.854771"], ["updated_at", "2022-09-30 06:15:32.854771"]] TRANSACTION (0.0ms) 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-09-30 06:15:32.904922"], ["updated_at", "2022-09-30 06:15:32.904922"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:32.907370"]] 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":"2022-09-30T06:15:32.854Z","updated_at":"2022-09-30T06:15:32.854Z"}','2022-09-30 06:15:32.910634',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-30T06:15:32.904Z","updated_at":"2022-09-30T06:15:32.904Z"}','2022-09-30 06:15:32.910634','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 (241.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:15:32.736000"], ["updated_at", "2022-09-30 06:15:32.736000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) 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-09-30 06:15:33.168684"], ["updated_at", "2022-09-30 06:15:33.168684"]] 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.171685"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-09-30T06:15:33.168Z","updated_at":"2022-09-30T06:15:33.168Z"}','2022-09-30 06:15:33.174227',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-09-30 06:15:33.175311"], ["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.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_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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.199410"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.202945',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-30 06:15:33.209753"]] TRANSACTION (0.2ms) 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.212950',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.214743"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.217141',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.218723"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.220936',NULL) 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", "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 ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.225399"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.228237',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.229241"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.231438',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------ SnapshotItemTest: test_relationships ------------------------------------ TRANSACTION (0.0ms) 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.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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:15:32.736000"], ["updated_at", "2022-09-30 06:15:32.736000"], ["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 ---------------------------------------- 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 ------------------------------------------- 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-09-30 06:15:33.249356"], ["updated_at", "2022-09-30 06:15:33.249356"]] TRANSACTION (0.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:15:33.252555"]] 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":"2022-09-30T06:15:32.736Z","updated_at":"2022-09-30T06:15:32.736Z"}','2022-09-30 06:15:33.255574',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-30T06:15:33.249Z","updated_at":"2022-09-30T06:15:33.249Z"}','2022-09-30 06:15:33.255574','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-10-01 06:15:33.256748"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-10-01 06:15:33.257184"], ["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.1ms) 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-09-30 06:15:33.258560"], ["updated_at", "2022-09-30 06:15:33.258560"]] 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-09-30 06:15:33.260038"], ["updated_at", "2022-09-30 06:15:33.260038"]] TRANSACTION (0.1ms) 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 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.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] Post Update (0.1ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-30 06:15:32.736000"], ["updated_at", "2022-09-30 06:15:32.736000"], ["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-09-30 06:15:33.249000"], ["updated_at", "2022-09-30 06:15:33.249000"]] 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.4ms) 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]]  (6.8ms) DELETE FROM posts;  (0.9ms) 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 Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:16:20.157318"], ["updated_at", "2022-09-30 06:16:20.157318"]] TRANSACTION (0.8ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.173904"]] TRANSACTION (0.6ms) commit transaction Post Load (0.2ms) 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.200347',NULL) TRANSACTION (0.6ms) commit transaction Post Update (1.1ms) 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.204908"]] 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.208295',NULL) TRANSACTION (0.6ms) 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.2ms) 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-09-30 06:16:20.251239"], ["updated_at", "2022-09-30 06:16:20.251239"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.254215"]] 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.256958',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-09-30T06:16:20.251Z","updated_at":"2022-09-30T06:16:20.251Z"}','2022-09-30 06:16:20.256958','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-10-01 06:16:20.258318"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-10-01 06:16:20.258856"], ["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.1ms) 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-09-30 06:16:20.260529"], ["updated_at", "2022-09-30 06:16:20.260529"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-09-30 06:16:20.261817"], ["updated_at", "2022-09-30 06:16:20.261817"]] 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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-09-30 06:16:20.157000"], ["updated_at", "2022-09-30 06:16:20.157000"], ["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-09-30 06:16:20.251000"], ["updated_at", "2022-09-30 06:16:20.251000"]] TRANSACTION (0.1ms) 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]] CACHE 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (241.4ms) 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.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_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 ------------------------------------ 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:16:20.157000"], ["updated_at", "2022-09-30 06:16:20.157000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) 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-09-30 06:16:20.589708"], ["updated_at", "2022-09-30 06:16:20.589708"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.593001"]] 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":"2022-09-30T06:16:20.589Z","updated_at":"2022-09-30T06:16:20.589Z"}','2022-09-30 06:16:20.594264',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-09-30 06:16:20.595303"], ["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]] CACHE 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.3ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-09-30 06:16:20.157000"], ["updated_at", "2022-09-30 06:16:20.157000"], ["id", 1]] TRANSACTION (0.2ms) 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.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-09-30 06:16:20.607334"], ["updated_at", "2022-09-30 06:16:20.607334"]] 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-09-30 06:16:20.609751"], ["updated_at", "2022-09-30 06:16:20.609751"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.611644"]] 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":"2022-09-30T06:16:20.607Z","updated_at":"2022-09-30T06:16:20.607Z"}','2022-09-30 06:16:20.614730',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-09-30T06:16:20.609Z","updated_at":"2022-09-30T06:16:20.609Z"}','2022-09-30 06:16:20.614730','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_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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? 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_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 ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] 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]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-09-30 06:16:20.641009"]] 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.643963',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.645522"]] 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.647680',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.649179"]] 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.651281',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) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.667011"]] 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.1ms) 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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.670126',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.674808"]] 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.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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.678033',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-09-30 06:16:20.679364"]] 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.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":"2022-09-30T06:16:20.157Z","updated_at":"2022-09-30T06:16:20.157Z"}','2022-09-30 06:16:20.681832',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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.8ms) 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 (1.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]  (1.8ms) DELETE FROM posts;  (3.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';  (2.5ms) DELETE FROM snapshots;  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';  (2.2ms) 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", "2022-11-14 23:51:48.086521"], ["updated_at", "2022-11-14 23:51:48.086521"]] 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.6ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.116308"]] 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.5ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]  (0.1ms) SELECT sqlite_version(*) TRANSACTION (0.0ms) begin transaction ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.143858',NULL) TRANSACTION (0.6ms) 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.148484"]] 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.3ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) begin transaction ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.152000',NULL) TRANSACTION (0.6ms) commit transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- 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 (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["user_type", nil], ["user_id", nil], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2022-11-14 23:51:48.217357"]] 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":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.220012',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.221718"]] 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.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":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.223837',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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.226595"]] 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.229762',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) begin transaction ---------------------------------------------- SnapshotsConcernTest: test_optional_identifier ---------------------------------------------- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.1ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.240789"]] 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,3,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.245079',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", nil], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.246243"]] 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":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.248808',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" 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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] TRANSACTION (0.1ms) rollback transaction TRANSACTION (0.1ms) begin transaction ---------------------------------------------------------------- SnapshotsConcernTest: test_legacy_positional_identifier_argument ---------------------------------------------------------------- ActiveSnapshot::Snapshot Count (0.2ms) SELECT COUNT(*) FROM "snapshots" Post Load (0.0ms) 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", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.283041"]] 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":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.286111',NULL) TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots" TRANSACTION (0.3ms) 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.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_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-11-14 23:51:48.296076"], ["updated_at", "2022-11-14 23:51:48.296076"]] 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-11-14 23:51:48.299930"], ["updated_at", "2022-11-14 23:51:48.299930"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.301979"]] 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":"2022-11-14T23:51:48.296Z","updated_at":"2022-11-14T23:51:48.296Z"}','2022-11-14 23:51:48.305046',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"Example comment","post_id":2,"created_at":"2022-11-14T23:51:48.299Z","updated_at":"2022-11-14T23:51:48.299Z"}','2022-11-14 23:51:48.305046','comments') TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 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", 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 ------------------------------ 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" = ? 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.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]] CACHE 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.1ms) SAVEPOINT active_record_1 Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-11-14 23:51:48.086000"], ["updated_at", "2022-11-14 23:51:48.086000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) 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-11-14 23:51:48.327638"], ["updated_at", "2022-11-14 23:51:48.327638"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.330642"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_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,'ParentWithoutChildren',2,'{"id":2,"a":1,"b":2,"created_at":"2022-11-14T23:51:48.327Z","updated_at":"2022-11-14T23:51:48.327Z"}','2022-11-14 23:51:48.331856',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-11-14 23:51:48.332830"], ["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.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 ------------------------------------------------------------------------ ActiveSnapshot::ConfigTest::storage_method: test_accepts_serialized_yaml ------------------------------------------------------------------------ TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_config_doesnt_accept_not_specified_storage_methods --------------------------------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_defaults_to_serialized_json ---------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_native_json -------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_accepts_to_serialized_json --------------------------------------------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.1ms) begin transaction -------------------------------------------------------------------------- ActiveSnapshot::ConfigTest::storage_method: test_converts_symbol_to_string -------------------------------------------------------------------------- TRANSACTION (0.1ms) 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 ------------------------------------ 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2022-11-14 23:51:48.086000"], ["updated_at", "2022-11-14 23:51:48.086000"], ["id", 1]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.4ms) rollback 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.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-11-14 23:51:48.358320"], ["updated_at", "2022-11-14 23:51:48.358320"]] 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", "user_type", "user_id", "metadata", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["user_type", nil], ["user_id", nil], ["metadata", "{}"], ["created_at", "2022-11-14 23:51:48.361430"]] 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.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":"2022-11-14T23:51:48.086Z","updated_at":"2022-11-14T23:51:48.086Z"}','2022-11-14 23:51:48.364508',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2022-11-14T23:51:48.358Z","updated_at":"2022-11-14T23:51:48.358Z"}','2022-11-14 23:51:48.364508','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-11-15 23:51:48.365899"], ["id", 1]] Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-11-15 23:51:48.366345"], ["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-11-14 23:51:48.367779"], ["updated_at", "2022-11-14 23:51:48.367779"]] 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-11-14 23:51:48.368677"], ["updated_at", "2022-11-14 23:51:48.368677"]] TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 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.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.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.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 "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2022-11-14 23:51:48.086000"], ["updated_at", "2022-11-14 23:51:48.086000"], ["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-11-14 23:51:48.358000"], ["updated_at", "2022-11-14 23:51:48.358000"]] 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]] CACHE 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.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]] CACHE Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] CACHE Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] CACHE 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 ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- TRANSACTION (0.1ms) rollback transaction