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

- old
+ new

@@ -1,637 +1,277 @@ -  (1.2ms) SELECT sqlite_version(*) -  (1.5ms) SELECT sqlite_version(*) -  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (1.8ms) SELECT sqlite_version(*) +  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) +  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) begin transaction + 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.3ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306085821) +  (0.1ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "post_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) +  (0.1ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") +  (0.1ms) CREATE TABLE "notes" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "post_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) +  (0.1ms) CREATE INDEX "index_notes_on_post_id" ON "notes" ("post_id") + ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] + TRANSACTION (0.7ms) commit transaction +Migrating to CreateSnapshotsTables (20210306100122) TRANSACTION (0.1ms) begin transaction -  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.3ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.2ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.2ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306085821"]] - TRANSACTION (0.1ms) commit transaction - ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] - TRANSACTION (0.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 08:58:24.143036"], ["updated_at", "2021-03-06 08:58:24.143036"]] - TRANSACTION (0.1ms) commit transaction -  (0.1ms) DELETE FROM posts; +  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" text, "created_at" datetime NOT NULL) +  (0.1ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") +  (0.1ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") +  (0.1ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") +  (0.1ms) CREATE TABLE "snapshot_items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "snapshot_id" integer NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "object" text NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) +  (0.1ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") +  (0.1ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") + ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306100122"]] + TRANSACTION (0.6ms) commit transaction + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-19 23:28:07.589659"], ["updated_at", "2021-08-19 23:28:07.589659"]] + TRANSACTION (0.6ms) commit transaction +  (0.7ms) DELETE FROM posts;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; +  (0.7ms) DELETE FROM snapshots;  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) DELETE FROM snapshot_items; +  (0.7ms) 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]] + 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.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 08:58:24.161099"], ["updated_at", "2021-03-06 08:58:24.161099"]] - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.184854"]] - TRANSACTION (0.1ms) commit transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:07.601363"], ["updated_at", "2021-08-19 23:28:07.601363"]] + TRANSACTION (0.7ms) commit transaction + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.616280"]] + TRANSACTION (1.2ms) commit transaction Post Load (0.2ms) 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]] -  (0.2ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T08:58:24.161Z","updated_at":"2021-03-06T08:58:24.161Z"}','2021-03-06 08:58:24.212441',NULL) - TRANSACTION (0.1ms) commit transaction - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - TRANSACTION (0.1ms) begin transaction + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.0ms) SELECT sqlite_version(*) + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- +id: 1 +a: 1 +b: 3 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:28:07.601363000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.601363000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:28:07.601363000 Z +','2021-08-19 23:28:07.639023',NULL) + TRANSACTION (0.8ms) commit transaction + 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.218941"]] - TRANSACTION (0.1ms) commit transaction + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.643299"]] + TRANSACTION (0.5ms) commit transaction Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:28:07.601363000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.601363000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:28:07.601363000 Z +','2021-08-19 23:28:07.646425',NULL) + TRANSACTION (0.8ms) commit transaction TRANSACTION (0.1ms) 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":"2021-03-06T08:58:24.161Z","updated_at":"2021-03-06T08:58:24.161Z"}','2021-03-06 08:58:24.224327',NULL) - TRANSACTION (0.1ms) 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.3ms) 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_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.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.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.3ms) 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.3ms) 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 08:58:24.161000"], ["updated_at", "2021-03-06 08:58:24.161000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------- -SnapshotItemTest: 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.2ms) 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.2ms) 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.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 ------------------------------- -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.3ms) 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.3ms) 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.3ms) 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 (8.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.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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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.3ms) 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", "2021-03-06 08:58:24.161000"], ["updated_at", "2021-03-06 08:58:24.161000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------- -SnapshotTest: test_relationships --------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 08:58:24.366028"], ["updated_at", "2021-03-06 08:58:24.366028"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.691182"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.601363000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: *1 + time: 2021-08-19 23:28:07.601363000 Z +','2021-08-19 23:28:07.694320',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.688491000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.688491000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.688491000 Z + zone: *1 + time: 2021-08-19 23:28:07.688491000 Z +','2021-08-19 23:28:07.694320','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - 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.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", "2021-03-06 08:58:24.372989"]] +  (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:07.695499"], ["id", 1]] + Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:07.695924"], ["id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.696917"], ["updated_at", "2021-08-19 23:28:07.696917"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - 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]] - 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":"2021-03-06T08:58:24.161Z","updated_at":"2021-03-06T08:58:24.161Z"}','2021-03-06 08:58:24.379754',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T08:58:24.366Z","updated_at":"2021-03-06T08:58:24.366Z"}','2021-03-06 08:58:24.379754','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 08:58:24.383250"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 08:58:24.384491"], ["id", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - 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", "foo"], ["post_id", 1], ["created_at", "2021-03-06 08:58:24.387735"], ["updated_at", "2021-03-06 08:58:24.387735"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 08:58:24.390467"], ["updated_at", "2021-03-06 08:58:24.390467"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.697739"], ["updated_at", "2021-08-19 23:28:07.697739"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2021-03-06 08:58:24.161000"], ["updated_at", "2021-03-06 08:58:24.161000"], ["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", "2021-03-06 08:58:24.366000"], ["updated_at", "2021-03-06 08:58:24.366000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:28:07.601363"], ["id", 1]] + Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "snapshot_items"  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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]] -  (0.3ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - 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.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.2ms) 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", "2021-03-06 08:58:24.419720"]] - 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]] - 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":"2021-03-06T08:58:24.161Z","updated_at":"2021-03-06T08:58:24.161Z"}','2021-03-06 08:58:24.425153',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 08:58:24.429476"]] - 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]] - 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":"2021-03-06T08:58:24.161Z","updated_at":"2021-03-06T08:58:24.161Z"}','2021-03-06 08:58:24.434495',NULL) - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.438667"]] - 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]] - 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2021-03-06T08:58:24.161Z","updated_at":"2021-03-06T08:58:24.161Z"}','2021-03-06 08:58:24.443734',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_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]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -SnapshotsConcernTest: test_relationships ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction -  (1.4ms) SELECT sqlite_version(*) -  (1.5ms) SELECT sqlite_version(*) -  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) 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.2ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306090620) - TRANSACTION (0.1ms) begin transaction -  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.2ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.2ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.2ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306090620"]] - TRANSACTION (0.1ms) 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.3ms) begin transaction - ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:06:22.569301"], ["updated_at", "2021-03-06 09:06:22.569301"]] - TRANSACTION (0.3ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:06:22.589163"], ["updated_at", "2021-03-06 09:06:22.589163"]] - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.611520"]] - TRANSACTION (0.1ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T09:06:22.589Z","updated_at":"2021-03-06T09:06:22.589Z"}','2021-03-06 09:06:22.636450',NULL) - TRANSACTION (0.1ms) commit transaction - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - 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", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.642741"]] - TRANSACTION (0.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]] - TRANSACTION (0.1ms) 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":"2021-03-06T09:06:22.589Z","updated_at":"2021-03-06T09:06:22.589Z"}','2021-03-06 09:06:22.647915',NULL) - TRANSACTION (0.1ms) 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.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 ------------------------------------- -SnapshotItemTest: test_relationships ------------------------------------- - TRANSACTION (0.1ms) 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.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.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.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.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.3ms) 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! ------------------------------------- +  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.3ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------- +SnapshotTest: test_restore +-------------------------- 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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:06:22.589000"], ["updated_at", "2021-03-06 09:06:22.589000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - 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.3ms) 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.2ms) 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", "2021-03-06 09:06:22.726462"]] - 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]] - 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":"2021-03-06T09:06:22.589Z","updated_at":"2021-03-06T09:06:22.589Z"}','2021-03-06 09:06:22.732488',NULL) - TRANSACTION (0.1ms) 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 2"], ["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 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.737216"]] - 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]] - 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":"2021-03-06T09:06:22.589Z","updated_at":"2021-03-06T09:06:22.589Z"}','2021-03-06 09:06:22.742476',NULL) - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.755093"]] - 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]] - 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2021-03-06T09:06:22.589Z","updated_at":"2021-03-06T09:06:22.589Z"}','2021-03-06 09:06:22.760237',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) 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.1ms) begin transaction ----------------------------------------- -SnapshotsConcernTest: test_relationships ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------- -SnapshotTest: test_relationships --------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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.0ms) begin transaction -------------------------------------- -SnapshotTest: test_fetch_reified_items +SnapshotTest: test_build_snapshot_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]] - TRANSACTION (0.1ms) rollback transaction + 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_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.3ms) 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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction -------------------------------------- -SnapshotTest: test_build_snapshot_item +SnapshotTest: test_fetch_reified_items -------------------------------------- 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.2ms) 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.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.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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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.3ms) 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", "2021-03-06 09:06:22.589000"], ["updated_at", "2021-03-06 09:06:22.589000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:06:22.836522"], ["updated_at", "2021-03-06 09:06:22.836522"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - 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.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", "2021-03-06 09:06:22.843369"]] - 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]] - TRANSACTION (0.2ms) 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":"2021-03-06T09:06:22.589Z","updated_at":"2021-03-06T09:06:22.589Z"}','2021-03-06 09:06:22.849849',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T09:06:22.836Z","updated_at":"2021-03-06T09:06:22.836Z"}','2021-03-06 09:06:22.849849','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.2ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:06:22.853458"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:06:22.854778"], ["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.1ms) SAVEPOINT active_record_1 - Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:06:22.857948"], ["updated_at", "2021-03-06 09:06:22.857948"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:06:22.860565"], ["updated_at", "2021-03-06 09:06:22.860565"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2021-03-06 09:06:22.589000"], ["updated_at", "2021-03-06 09:06:22.589000"], ["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", "2021-03-06 09:06:22.836000"], ["updated_at", "2021-03-06 09:06:22.836000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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]] -  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction -  (1.1ms) SELECT sqlite_version(*) -  (1.4ms) SELECT sqlite_version(*) -  (0.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) 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.3ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306090856) - TRANSACTION (0.1ms) begin transaction -  (0.2ms) 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" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.2ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.2ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.2ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306090856"]] - TRANSACTION (0.1ms) commit transaction - ActiveRecord::InternalMetadata Load (0.6ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] - TRANSACTION (0.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:08:58.845558"], ["updated_at", "2021-03-06 09:08:58.845558"]] - TRANSACTION (0.0ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:08:58.858683"], ["updated_at", "2021-03-06 09:08:58.858683"]] - TRANSACTION (0.0ms) 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:58.876821"]] - TRANSACTION (0.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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.1ms) 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":"2021-03-06T09:08:58.858Z","updated_at":"2021-03-06T09:08:58.858Z"}','2021-03-06 09:08:58.896382',NULL) - TRANSACTION (0.0ms) commit transaction - Post Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction - ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["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", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:58.900550"]] - TRANSACTION (0.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]] - TRANSACTION (0.0ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.1ms) 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":"2021-03-06T09:08:58.858Z","updated_at":"2021-03-06T09:08:58.858Z"}','2021-03-06 09:08:58.903729',NULL) - TRANSACTION (0.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.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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - ActiveSnapshot::SnapshotItem Load (0.2ms) 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.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:08:58.858000"], ["updated_at", "2021-03-06 09:08:58.858000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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" 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", "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_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_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction --------------------------------------- -SnapshotTest: test_fetch_reified_items --------------------------------------- +------------------------------------ +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]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction +------------------------------------ +SnapshotItemTest: test_restore_item! +------------------------------------ + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.6ms) rollback transaction + TRANSACTION (0.0ms) begin transaction ------------------------------------------------ SnapshotsConcernTest: test_has_snapshot_children ------------------------------------------------ - Post Load (0.2ms) 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.1ms) begin transaction + TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction @@ -639,347 +279,254 @@ 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.2ms) 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", "2021-03-06 09:08:58.992198"]] - 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]] - 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":"2021-03-06T09:08:58.858Z","updated_at":"2021-03-06T09:08:58.858Z"}','2021-03-06 09:08:58.995950',NULL) - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:28:07.754325"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.601363000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: *1 + time: 2021-08-19 23:28:07.601363000 Z +','2021-08-19 23:28:07.757455',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", "2021-03-06 09:08:58.998844"]] - 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]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.759398"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.601363000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: *1 + time: 2021-08-19 23:28:07.601363000 Z +','2021-08-19 23:28:07.762080',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 TRANSACTION (0.1ms) SAVEPOINT active_record_1 - ActiveSnapshot::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":"2021-03-06T09:08:58.858Z","updated_at":"2021-03-06T09:08:58.858Z"}','2021-03-06 09:08:59.001850',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", "{}"], ["created_at", "2021-03-06 09:08:59.004501"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.764341"]] + 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]] - 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":"2021-03-06T09:08:58.858Z","updated_at":"2021-03-06T09:08:58.858Z"}','2021-03-06 09:08:59.007512',NULL) - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:07.601363000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:07.601363000 Z + zone: *1 + time: 2021-08-19 23:28:07.601363000 Z +','2021-08-19 23:28:07.767417',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.1ms) rollback transaction + 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.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:08:59.020057"], ["updated_at", "2021-03-06 09:08:59.020057"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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", "{}"], ["created_at", "2021-03-06 09:08:59.024289"]] - 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]] - 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":"2021-03-06T09:08:58.858Z","updated_at":"2021-03-06T09:08:58.858Z"}','2021-03-06 09:08:59.028250',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T09:08:59.020Z","updated_at":"2021-03-06T09:08:59.020Z"}','2021-03-06 09:08:59.028250','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:08:59.030437"], ["id", 1]] - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:08:59.031206"], ["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.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", "2021-03-06 09:08:59.033217"], ["updated_at", "2021-03-06 09:08:59.033217"]] - 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", "2021-03-06 09:08:59.034835"], ["updated_at", "2021-03-06 09:08:59.034835"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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", "2021-03-06 09:08:58.858000"], ["updated_at", "2021-03-06 09:08:58.858000"], ["id", 1]] - Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:08:59.020000"], ["updated_at", "2021-03-06 09:08:59.020000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] -  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - 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.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.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:08:58.858000"], ["updated_at", "2021-03-06 09:08:58.858000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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 -  (1.1ms) SELECT sqlite_version(*) -  (1.2ms) SELECT sqlite_version(*) -  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.2ms) 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) + TRANSACTION (0.0ms) rollback transaction +  (1.5ms) SELECT sqlite_version(*)  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) begin transaction -  (0.2ms) 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") - ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.0ms) commit transaction -Migrating to CreateSnapshotsTables (20210306091040) - TRANSACTION (0.0ms) begin transaction -  (0.2ms) 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" json, "created_at" datetime 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.2ms) 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" json NOT NULL, "created_at" datetime 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", "20210306091040"]] - TRANSACTION (0.0ms) commit transaction +  (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]] - TRANSACTION (0.0ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:10:42.909084"], ["updated_at", "2021-03-06 09:10:42.909084"]] - TRANSACTION (0.0ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) DELETE FROM snapshot_items; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; +  (1.9ms) DELETE FROM posts; +  (1.4ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (1.2ms) DELETE FROM snapshots; +  (1.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (1.0ms) DELETE FROM snapshot_items; +  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; 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.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:10:42.921978"], ["updated_at", "2021-03-06 09:10:42.921978"]] - TRANSACTION (0.1ms) commit transaction - TRANSACTION (0.1ms) begin transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:46.603059"], ["updated_at", "2021-08-19 23:28:46.603059"]] + 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:42.940125"]] - TRANSACTION (0.1ms) commit transaction + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.616208"]] + 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]] -  (0.1ms) SELECT sqlite_version(*) + 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.1ms) 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":"2021-03-06T09:10:42.921Z","updated_at":"2021-03-06T09:10:42.921Z"}','2021-03-06 09:10:42.959636',NULL) - TRANSACTION (0.0ms) commit transaction - Post Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - TRANSACTION (0.1ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- +id: 1 +a: 1 +b: 3 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:28:46.603059000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.603059000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:28:46.603059000 Z +','2021-08-19 23:28:46.631882',NULL) + TRANSACTION (0.6ms) commit transaction + Post Update (0.7ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:42.963800"]] - TRANSACTION (0.0ms) commit transaction + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.635496"]] + 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.1ms) 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":"2021-03-06T09:10:42.921Z","updated_at":"2021-03-06T09:10:42.921Z"}','2021-03-06 09:10:42.967007',NULL) - TRANSACTION (0.0ms) commit transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction - 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,2,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:28:46.603059000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.603059000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:28:46.603059000 Z +','2021-08-19 23:28:46.638687',NULL) + TRANSACTION (0.5ms) commit transaction + TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- - TRANSACTION (0.1ms) rollback transaction + 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.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:10:43.013846"], ["updated_at", "2021-03-06 09:10:43.013846"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:43.018772"]] - 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]] - 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":"2021-03-06T09:10:42.921Z","updated_at":"2021-03-06T09:10:42.921Z"}','2021-03-06 09:10:43.023295',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T09:10:43.013Z","updated_at":"2021-03-06T09:10:43.013Z"}','2021-03-06 09:10:43.023295','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:10:43.025648"], ["id", 1]] - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:10:43.026558"], ["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.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", "2021-03-06 09:10:43.028640"], ["updated_at", "2021-03-06 09:10:43.028640"]] - 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", "2021-03-06 09:10:43.030310"], ["updated_at", "2021-03-06 09:10:43.030310"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - ActiveSnapshot::SnapshotItem Load (0.2ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.670427"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.603059000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: *1 + time: 2021-08-19 23:28:46.603059000 Z +','2021-08-19 23:28:46.672991',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.668148000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.668148000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.668148000 Z + zone: *1 + time: 2021-08-19 23:28:46.668148000 Z +','2021-08-19 23:28:46.672991','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:46.673978"], ["id", 1]] + Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:46.674338"], ["id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.675175"], ["updated_at", "2021-08-19 23:28:46.675175"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.675840"], ["updated_at", "2021-08-19 23:28:46.675840"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::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", "2021-03-06 09:10:42.921000"], ["updated_at", "2021-03-06 09:10:42.921000"], ["id", 1]] - Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:10:43.013000"], ["updated_at", "2021-03-06 09:10:43.013000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:28:46.603059"], ["id", 1]] + Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"  (0.1ms) SELECT COUNT(*) FROM "snapshots"  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.2ms) rollback transaction + TRANSACTION (0.0ms) begin transaction -------------------------------------------- ActiveSnapshotTest: test_exposes_main_module -------------------------------------------- TRANSACTION (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.1ms) 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", "2021-03-06 09:10:43.057757"]] - 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]] - 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":"2021-03-06T09:10:42.921Z","updated_at":"2021-03-06T09:10:42.921Z"}','2021-03-06 09:10:43.061150',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", "{}"], ["created_at", "2021-03-06 09:10:43.063961"]] - 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]] - 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":"2021-03-06T09:10:42.921Z","updated_at":"2021-03-06T09:10:42.921Z"}','2021-03-06 09:10:43.066994',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", "{}"], ["created_at", "2021-03-06 09:10:43.069588"]] - 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]] - 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":"2021-03-06T09:10:42.921Z","updated_at":"2021-03-06T09:10:42.921Z"}','2021-03-06 09:10:43.072598',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.1ms) ROLLBACK TO SAVEPOINT active_record_1 - 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.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.0ms) begin transaction ----------------------------------------- -SnapshotsConcernTest: 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::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.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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction + 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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:10:42.921000"], ["updated_at", "2021-03-06 09:10:42.921000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 +-------------------------------- +SnapshotTest: test_relationships +-------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------ SnapshotTest: test_validations ------------------------------ @@ -987,2347 +534,835 @@ 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.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.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.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.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.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:10:42.921000"], ["updated_at", "2021-03-06 09:10:42.921000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_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 -  (1.3ms) SELECT sqlite_version(*) -  (1.3ms) SELECT sqlite_version(*) -  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) 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.2ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306091241) - TRANSACTION (0.1ms) begin transaction -  (0.2ms) 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" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.2ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.2ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.2ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306091241"]] - TRANSACTION (0.1ms) 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.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:12:44.028585"], ["updated_at", "2021-03-06 09:12:44.028585"]] - TRANSACTION (0.1ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:12:44.044597"], ["updated_at", "2021-03-06 09:12:44.044597"]] - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.066055"]] - TRANSACTION (0.1ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T09:12:44.044Z","updated_at":"2021-03-06T09:12:44.044Z"}','2021-03-06 09:12:44.089995',NULL) - TRANSACTION (0.1ms) commit transaction - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - 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", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.095901"]] - TRANSACTION (0.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]] - TRANSACTION (0.1ms) 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":"2021-03-06T09:12:44.044Z","updated_at":"2021-03-06T09:12:44.044Z"}','2021-03-06 09:12:44.100807',NULL) - TRANSACTION (0.1ms) 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.2ms) 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.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:12:44.044000"], ["updated_at", "2021-03-06 09:12:44.044000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) 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.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.4ms) 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.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.3ms) 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_relationships ------------------------------------- - TRANSACTION (0.1ms) 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.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.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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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.3ms) 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", "2021-03-06 09:12:44.044000"], ["updated_at", "2021-03-06 09:12:44.044000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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_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_metadata ---------------------------- - ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------- SnapshotTest: test_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.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +----------------------------------------------- +InstallGeneratorTest: test_should_add_migration +----------------------------------------------- TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------- -SnapshotTest: 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.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.3ms) 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.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.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.2ms) 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", "2021-03-06 09:12:44.221259"]] - 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]] - 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":"2021-03-06T09:12:44.044Z","updated_at":"2021-03-06T09:12:44.044Z"}','2021-03-06 09:12:44.226972',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 09:12:44.231298"]] - 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]] - 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":"2021-03-06T09:12:44.044Z","updated_at":"2021-03-06T09:12:44.044Z"}','2021-03-06 09:12:44.236386',NULL) - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.240430"]] - 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]] - 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2021-03-06T09:12:44.044Z","updated_at":"2021-03-06T09:12:44.044Z"}','2021-03-06 09:12:44.245266',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin 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.1ms) begin transaction + TRANSACTION (0.0ms) begin transaction ---------------------------------------- SnapshotsConcernTest: test_relationships ---------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:12:44.278695"], ["updated_at", "2021-03-06 09:12:44.278695"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - 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.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", "2021-03-06 09:12:44.285267"]] - 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]] - 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":"2021-03-06T09:12:44.044Z","updated_at":"2021-03-06T09:12:44.044Z"}','2021-03-06 09:12:44.291667',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T09:12:44.278Z","updated_at":"2021-03-06T09:12:44.278Z"}','2021-03-06 09:12:44.291667','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:12:44.295066"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:12:44.296314"], ["id", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - 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", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:12:44.299573"], ["updated_at", "2021-03-06 09:12:44.299573"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:12:44.302211"], ["updated_at", "2021-03-06 09:12:44.302211"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2021-03-06 09:12:44.044000"], ["updated_at", "2021-03-06 09:12:44.044000"], ["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", "2021-03-06 09:12:44.278000"], ["updated_at", "2021-03-06 09:12:44.278000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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]] -  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction -  (1.3ms) SELECT sqlite_version(*) -  (1.3ms) SELECT sqlite_version(*) -  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) 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.3ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306092834) - TRANSACTION (0.1ms) begin transaction -  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.2ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.2ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.2ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306092834"]] - TRANSACTION (0.1ms) 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.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:28:36.969946"], ["updated_at", "2021-03-06 09:28:36.969946"]] - TRANSACTION (0.1ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:28:36.996383"], ["updated_at", "2021-03-06 09:28:36.996383"]] - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.018800"]] - TRANSACTION (0.1ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T09:28:36.996Z","updated_at":"2021-03-06T09:28:36.996Z"}','2021-03-06 09:28:37.043602',NULL) - TRANSACTION (0.1ms) commit transaction - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - 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", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.049824"]] - TRANSACTION (0.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]] - TRANSACTION (0.1ms) 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":"2021-03-06T09:28:36.996Z","updated_at":"2021-03-06T09:28:36.996Z"}','2021-03-06 09:28:37.054948',NULL) - TRANSACTION (0.1ms) 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.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 ------------------------------------- -SnapshotItemTest: test_relationships ------------------------------------- - TRANSACTION (0.1ms) 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.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.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.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.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.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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:28:36.996000"], ["updated_at", "2021-03-06 09:28:36.996000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - 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.1ms) 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.2ms) 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_metadata ---------------------------- - ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------- -SnapshotTest: test_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.3ms) 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.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.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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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.3ms) 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", "2021-03-06 09:28:36.996000"], ["updated_at", "2021-03-06 09:28:36.996000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:28:37.175237"], ["updated_at", "2021-03-06 09:28:37.175237"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - 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.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", "2021-03-06 09:28:37.182215"]] - 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]] - 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":"2021-03-06T09:28:36.996Z","updated_at":"2021-03-06T09:28:36.996Z"}','2021-03-06 09:28:37.188989',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T09:28:37.175Z","updated_at":"2021-03-06T09:28:37.175Z"}','2021-03-06 09:28:37.188989','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:28:37.192514"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:28:37.193734"], ["id", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - 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", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:28:37.197093"], ["updated_at", "2021-03-06 09:28:37.197093"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:28:37.199814"], ["updated_at", "2021-03-06 09:28:37.199814"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2021-03-06 09:28:36.996000"], ["updated_at", "2021-03-06 09:28:36.996000"], ["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", "2021-03-06 09:28:37.175000"], ["updated_at", "2021-03-06 09:28:37.175000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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]] -  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) 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.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.2ms) 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", "2021-03-06 09:28:37.247789"]] - 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 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:28:46.720422"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.603059000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: *1 + time: 2021-08-19 23:28:46.603059000 Z +','2021-08-19 23:28:46.723268',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.725154"]] + 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]] - 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":"2021-03-06T09:28:36.996Z","updated_at":"2021-03-06T09:28:36.996Z"}','2021-03-06 09:28:37.253161',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 09:28:37.257455"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.603059000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: *1 + time: 2021-08-19 23:28:46.603059000 Z +','2021-08-19 23:28:46.727906',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.729775"]] + 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]] - 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":"2021-03-06T09:28:36.996Z","updated_at":"2021-03-06T09:28:36.996Z"}','2021-03-06 09:28:37.262484',NULL) - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.266655"]] - 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]] - 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2021-03-06T09:28:36.996Z","updated_at":"2021-03-06T09:28:36.996Z"}','2021-03-06 09:28:37.271634',NULL) - TRANSACTION (0.1ms) 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]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:28:46.603059000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:28:46.603059000 Z + zone: *1 + time: 2021-08-19 23:28:46.603059000 Z +','2021-08-19 23:28:46.732939',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.1ms) 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.1ms) rollback transaction -  (1.4ms) SELECT sqlite_version(*) -  (1.3ms) SELECT sqlite_version(*) -  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) 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.3ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306093333) - TRANSACTION (0.1ms) begin transaction -  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.3ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.3ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.3ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306093333"]] - TRANSACTION (0.1ms) commit transaction - ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] - TRANSACTION (0.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:33:35.911939"], ["updated_at", "2021-03-06 09:33:35.911939"]] - TRANSACTION (0.1ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:33:35.928774"], ["updated_at", "2021-03-06 09:33:35.928774"]] - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:35.950660"]] - TRANSACTION (0.1ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T09:33:35.928Z","updated_at":"2021-03-06T09:33:35.928Z"}','2021-03-06 09:33:35.975292',NULL) - TRANSACTION (0.1ms) commit transaction - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - 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", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:35.981468"]] - TRANSACTION (0.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]] - TRANSACTION (0.1ms) 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":"2021-03-06T09:33:35.928Z","updated_at":"2021-03-06T09:33:35.928Z"}','2021-03-06 09:33:35.986575',NULL) - TRANSACTION (0.1ms) commit transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction + 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_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 + 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::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.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", "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.1ms) begin transaction + 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]] + 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.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:33:35.928000"], ["updated_at", "2021-03-06 09:33:35.928000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -SnapshotsConcernTest: test_relationships ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction + 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 -------------------------------------------- -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.2ms) 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", "2021-03-06 09:33:36.076170"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 +------------------------------------ +SnapshotItemTest: test_relationships +------------------------------------ + TRANSACTION (0.0ms) rollback transaction +  (1.5ms) SELECT sqlite_version(*) +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (1.9ms) DELETE FROM posts; +  (1.3ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (1.2ms) DELETE FROM snapshots; +  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (1.1ms) DELETE FROM snapshot_items; +  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:11.308109"], ["updated_at", "2021-08-19 23:29:11.308109"]] + 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.320795"]] + TRANSACTION (0.6ms) commit transaction 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]] - 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":"2021-03-06T09:33:35.928Z","updated_at":"2021-03-06T09:33:35.928Z"}','2021-03-06 09:33:36.080337',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.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", "2021-03-06 09:33:36.083355"]] - 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]] - 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":"2021-03-06T09:33:35.928Z","updated_at":"2021-03-06T09:33:35.928Z"}','2021-03-06 09:33:36.086627',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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:36.089365"]] - 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]] - 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":"2021-03-06T09:33:35.928Z","updated_at":"2021-03-06T09:33:35.928Z"}','2021-03-06 09:33:36.092466',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.1ms) ROLLBACK TO SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction + 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 ------------------------------------------------- -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.1ms) rollback transaction + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- +id: 1 +a: 1 +b: 3 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:29:11.308109000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:29:11.308109000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:29:11.308109000 Z +','2021-08-19 23:29:11.336271',NULL) + TRANSACTION (0.6ms) commit transaction + Post Update (0.6ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] 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 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.339527"]] + TRANSACTION (0.5ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] TRANSACTION (0.0ms) begin transaction --------------------------------------- -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 + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:29:11.308109000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:29:11.308109000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:29:11.308109000 Z +','2021-08-19 23:29:11.342050',NULL) + TRANSACTION (0.4ms) commit transaction 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.0ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction +--------------------------- +SnapshotTest: test_metadata +--------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------- SnapshotTest: test_restore -------------------------- - ActiveSnapshot::Snapshot Load (0.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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::Snapshot Load (0.0ms) 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.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] - Post Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:33:35.928000"], ["updated_at", "2021-03-06 09:33:35.928000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) rollback transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.2ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------- -SnapshotTest: test_metadata ---------------------------- +-------------------------------------- +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 -------------------------------------------- -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.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:33:36.136905"], ["updated_at", "2021-03-06 09:33:36.136905"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:36.141213"]] - 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]] - 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":"2021-03-06T09:33:35.928Z","updated_at":"2021-03-06T09:33:35.928Z"}','2021-03-06 09:33:36.145285',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T09:33:36.136Z","updated_at":"2021-03-06T09:33:36.136Z"}','2021-03-06 09:33:36.145285','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:33:36.147556"], ["id", 1]] - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 09:33:36.148330"], ["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.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", "2021-03-06 09:33:36.150415"], ["updated_at", "2021-03-06 09:33:36.150415"]] - 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", "2021-03-06 09:33:36.152053"], ["updated_at", "2021-03-06 09:33:36.152053"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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", "2021-03-06 09:33:35.928000"], ["updated_at", "2021-03-06 09:33:35.928000"], ["id", 1]] - Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:33:36.136000"], ["updated_at", "2021-03-06 09:33:36.136000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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]] -  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - 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 -  (1.3ms) SELECT sqlite_version(*) -  (1.3ms) SELECT sqlite_version(*) -  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) 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.2ms) 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.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.1ms) commit transaction -Migrating to CreateSnapshotsTables (20210306100122) - TRANSACTION (0.1ms) begin transaction -  (0.2ms) 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" json, "created_at" datetime NOT NULL) -  (0.2ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.2ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) 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" json NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.2ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.2ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306100122"]] - TRANSACTION (0.1ms) 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.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 10:01:25.283218"], ["updated_at", "2021-03-06 10:01:25.283218"]] - TRANSACTION (0.1ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:01:25.299506"], ["updated_at", "2021-03-06 10:01:25.299506"]] - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.321090"]] - TRANSACTION (0.1ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T10:01:25.299Z","updated_at":"2021-03-06T10:01:25.299Z"}','2021-03-06 10:01:25.345314',NULL) - TRANSACTION (0.1ms) commit transaction - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - 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", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.351318"]] - TRANSACTION (0.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]] - TRANSACTION (0.1ms) 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":"2021-03-06T10:01:25.299Z","updated_at":"2021-03-06T10:01:25.299Z"}','2021-03-06 10:01:25.356357',NULL) - TRANSACTION (0.1ms) commit 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.3ms) 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]] + 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]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------- -SnapshotTest: test_validations ------------------------------- - 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::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.3ms) 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.3ms) 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 --------------------------------------- -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.3ms) 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_metadata ---------------------------- - ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------- -SnapshotTest: test_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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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.3ms) 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", "2021-03-06 10:01:25.299000"], ["updated_at", "2021-03-06 10:01:25.299000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - 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.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.2ms) 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", "2021-03-06 10:01:25.458320"]] - TRANSACTION (0.1ms) 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]] - 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":"2021-03-06T10:01:25.299Z","updated_at":"2021-03-06T10:01:25.299Z"}','2021-03-06 10:01:25.464119',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 10:01:25.468523"]] - 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]] - 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":"2021-03-06T10:01:25.299Z","updated_at":"2021-03-06T10:01:25.299Z"}','2021-03-06 10:01:25.473528',NULL) - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.477622"]] - 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]] - 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,5,'Post',1,'{"id":1,"a":2,"b":4,"created_at":"2021-03-06T10:01:25.299Z","updated_at":"2021-03-06T10:01:25.299Z"}','2021-03-06 10:01:25.482622',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_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]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -SnapshotsConcernTest: test_relationships ----------------------------------------- - TRANSACTION (0.1ms) 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.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.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.3ms) 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.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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:01:25.299000"], ["updated_at", "2021-03-06 10:01:25.299000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) 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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------------- -SnapshotItemTest: test_relationships ------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:01:25.542121"], ["updated_at", "2021-03-06 10:01:25.542121"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - 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.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", "2021-03-06 10:01:25.548749"]] - 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]] - 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":"2021-03-06T10:01:25.299Z","updated_at":"2021-03-06T10:01:25.299Z"}','2021-03-06 10:01:25.555304',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T10:01:25.542Z","updated_at":"2021-03-06T10:01:25.542Z"}','2021-03-06 10:01:25.555304','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:01:25.558659"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:01:25.559824"], ["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.1ms) SAVEPOINT active_record_1 - Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:01:25.562972"], ["updated_at", "2021-03-06 10:01:25.562972"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:01:25.565533"], ["updated_at", "2021-03-06 10:01:25.565533"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["created_at", "2021-03-06 10:01:25.299000"], ["updated_at", "2021-03-06 10:01:25.299000"], ["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", "2021-03-06 10:01:25.542000"], ["updated_at", "2021-03-06 10:01:25.542000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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]] -  (0.3ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.1ms) rollback transaction -  (1.1ms) SELECT sqlite_version(*) -  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) begin transaction -  (0.2ms) 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.2ms) 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") - ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (0.0ms) commit transaction -Migrating to CreateSnapshotsTables (20210306100122) - TRANSACTION (0.1ms) begin transaction -  (0.2ms) 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" json, "created_at" datetime 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.2ms) 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" json NOT NULL, "created_at" datetime 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.0ms) 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.1ms) begin transaction - ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 10:10:43.746775"], ["updated_at", "2021-03-06 10:10:43.746775"]] - TRANSACTION (0.1ms) commit transaction -  (0.1ms) DELETE FROM posts; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (0.1ms) DELETE FROM snapshots; -  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (0.1ms) 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.1ms) begin transaction - Post Create (0.1ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:10:43.759961"], ["updated_at", "2021-03-06 10:10:43.759961"]] - TRANSACTION (0.0ms) 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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.778612"]] - TRANSACTION (0.1ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'{"id":1,"a":1,"b":3,"created_at":"2021-03-06T10:10:43.759Z","updated_at":"2021-03-06T10:10:43.759Z"}','2021-03-06 10:10:43.799413',NULL) - TRANSACTION (0.0ms) commit transaction - Post Update (0.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.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.803936"]] - TRANSACTION (0.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]] - TRANSACTION (0.0ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.1ms) 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":"2021-03-06T10:10:43.759Z","updated_at":"2021-03-06T10:10:43.759Z"}','2021-03-06 10:10:43.807373',NULL) - TRANSACTION (0.0ms) commit 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.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", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 10:10:43.850428"]] - 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]] - 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":"2021-03-06T10:10:43.759Z","updated_at":"2021-03-06T10:10:43.759Z"}','2021-03-06 10:10:43.855492',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 10:10:43.859615"]] - 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]] - 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":"2021-03-06T10:10:43.759Z","updated_at":"2021-03-06T10:10:43.759Z"}','2021-03-06 10:10:43.863311',NULL) - TRANSACTION (0.1ms) 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.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.866944"]] - 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]] - 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":"2021-03-06T10:10:43.759Z","updated_at":"2021-03-06T10:10:43.759Z"}','2021-03-06 10:10:43.870999',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 - TRANSACTION (0.2ms) rollback transaction - TRANSACTION (0.1ms) 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.1ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction ------------------------------------------- ActiveSnapshotTest: test_snapshot_lifecycle ------------------------------------------- - Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:10:43.918250"], ["updated_at", "2021-03-06 10:10:43.918250"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.923148"]] - 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]] - 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":"2021-03-06T10:10:43.759Z","updated_at":"2021-03-06T10:10:43.759Z"}','2021-03-06 10:10:43.927476',NULL),(NULL,3,'Comment',1,'{"id":1,"content":"foo","post_id":1,"created_at":"2021-03-06T10:10:43.918Z","updated_at":"2021-03-06T10:10:43.918Z"}','2021-03-06 10:10:43.927476','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:10:43.929789"], ["id", 1]] - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:10:43.930638"], ["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.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", "2021-03-06 10:10:43.932687"], ["updated_at", "2021-03-06 10:10:43.932687"]] - 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", "2021-03-06 10:10:43.934350"], ["updated_at", "2021-03-06 10:10:43.934350"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - ActiveSnapshot::SnapshotItem Load (0.2ms) 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", "2021-03-06 10:10:43.759000"], ["updated_at", "2021-03-06 10:10:43.759000"], ["id", 1]] - Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:10:43.918000"], ["updated_at", "2021-03-06 10:10:43.918000"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.386301"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:29:11.308109000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:29:11.308109000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:29:11.308109000 Z + zone: *1 + time: 2021-08-19 23:29:11.308109000 Z +','2021-08-19 23:29:11.389012',NULL),(NULL,3,'Comment',1,'--- +id: 1 +content: foo +post_id: 1 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:29:11.384159000 Z + zone: &1 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:29:11.384159000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: 2021-08-19 23:29:11.384159000 Z + zone: *1 + time: 2021-08-19 23:29:11.384159000 Z +','2021-08-19 23:29:11.389012','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:11.390035"], ["id", 1]] + Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:11.390390"], ["id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391260"], ["updated_at", "2021-08-19 23:29:11.391260"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391968"], ["updated_at", "2021-08-19 23:29:11.391968"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:29:11.308109"], ["id", 1]] + Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots"  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] -  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.1ms) rollback transaction + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.0ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.3ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- 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_relationships --------------------------------- - TRANSACTION (0.1ms) rollback 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" 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.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.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.1ms) 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - 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.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:10:43.759000"], ["updated_at", "2021-03-06 10:10:43.759000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) 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.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.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.2ms) UPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:10:43.759000"], ["updated_at", "2021-03-06 10:10:43.759000"], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.0ms) rollback transaction + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.2ms) rollback transaction TRANSACTION (0.0ms) begin transaction ---------------------------------- SnapshotItemTest: test_validations ---------------------------------- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]] ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]] - ActiveSnapshot::Snapshot Load (0.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::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_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.5ms) SELECT sqlite_version(*) -  (3.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) -  (2.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL) -  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -Migrating to SetUpTestTables (20210128155312) - TRANSACTION (0.1ms) begin transaction -  (0.6ms) 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.3ms) 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.5ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id") - ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]] - TRANSACTION (2.6ms) commit transaction -Migrating to CreateSnapshotsTables (20210306100122) - TRANSACTION (0.1ms) begin transaction -  (0.4ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" text, "created_at" datetime NOT NULL) -  (0.3ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id") -  (0.2ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier") -  (0.2ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id") -  (0.3ms) CREATE TABLE "snapshot_items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "snapshot_id" integer NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "object" text NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar) -  (0.3ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id") -  (0.3ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id") - ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306100122"]] - TRANSACTION (2.7ms) commit transaction - ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] - TRANSACTION (0.1ms) 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", "2021-03-06 10:31:20.311300"], ["updated_at", "2021-03-06 10:31:20.311300"]] - TRANSACTION (2.9ms) commit transaction -  (1.9ms) DELETE FROM posts; -  (0.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (2.0ms) DELETE FROM snapshots; -  (0.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (2.0ms) DELETE FROM snapshot_items; -  (0.2ms) 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.1ms) begin transaction - Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:31:20.340449"], ["updated_at", "2021-03-06 10:31:20.340449"]] - TRANSACTION (1.8ms) commit transaction - TRANSACTION (0.1ms) begin transaction - 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", 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", "2021-03-06 10:31:20.369355"]] - TRANSACTION (2.0ms) commit transaction - Post Load (0.3ms) 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]] -  (0.1ms) 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: 2021-03-06 10:31:20.340449000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:31:20.340449000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z - zone: *1 - time: 2021-03-06 10:31:20.340449000 Z -','2021-03-06 10:31:20.398625',NULL) - TRANSACTION (2.1ms) commit transaction - Post Update (2.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::Snapshot Exists? (0.3ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.409875"]] - TRANSACTION (2.7ms) commit transaction - Post Load (0.2ms) 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]] - TRANSACTION (0.1ms) 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: 2021-03-06 10:31:20.340449000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:31:20.340449000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z - zone: *1 - time: 2021-03-06 10:31:20.340449000 Z -','2021-03-06 10:31:20.419509',NULL) - TRANSACTION (2.0ms) commit transaction - TRANSACTION (0.1ms) begin 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.3ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.2ms) 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", "2021-03-06 10:31:20.467125"]] - 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]] - 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,'--- + 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", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:29:11.411538"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:11.308109000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:31:20.340449000 Z + time: 2021-08-19 23:29:11.308109000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:11.308109000 Z zone: *1 - time: 2021-03-06 10:31:20.340449000 Z -','2021-03-06 10:31:20.474484',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 10:31:20.479635"]] - 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]] - 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,4,'Post',1,'--- + time: 2021-08-19 23:29:11.308109000 Z +','2021-08-19 23:29:11.413742',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.415146"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:11.308109000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:31:20.340449000 Z + time: 2021-08-19 23:29:11.308109000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:11.308109000 Z zone: *1 - time: 2021-03-06 10:31:20.340449000 Z -','2021-03-06 10:31:20.485682',NULL) - TRANSACTION (0.1ms) 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.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.490712"]] - 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]] - 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,5,'Post',1,'--- + time: 2021-08-19 23:29:11.308109000 Z +','2021-08-19 23:29:11.417040',NULL) + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.418345"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:11.308109000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:31:20.340449000 Z + time: 2021-08-19 23:29:11.308109000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:11.308109000 Z zone: *1 - time: 2021-03-06 10:31:20.340449000 Z -','2021-03-06 10:31:20.496748',NULL) - TRANSACTION (0.1ms) 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]] + time: 2021-08-19 23:29:11.308109000 Z +','2021-08-19 23:29:11.420235',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.2ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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.1ms) 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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - ActiveSnapshot::SnapshotItem Load (0.3ms) 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.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.2ms) 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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ------------------------------- -SnapshotTest: test_validations ------------------------------- - ActiveSnapshot::Snapshot Load (0.4ms) 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? (8.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.3ms) 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 --------------------------------------- -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.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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------- -SnapshotTest: test_relationships --------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) 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.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.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.3ms) 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.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_relationships ------------------------------------- - TRANSACTION (0.1ms) rollback 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.2ms) 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.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.2ms) 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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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 +  (1.4ms) SELECT sqlite_version(*) +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] +  (1.8ms) DELETE FROM posts; +  (1.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; +  (1.1ms) DELETE FROM snapshots; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; +  (0.9ms) DELETE FROM snapshot_items; +  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]] + TRANSACTION (0.0ms) begin transaction + Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:21.079132"], ["updated_at", "2021-08-19 23:29:21.079132"]] + TRANSACTION (0.8ms) commit transaction + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.092194"]] + TRANSACTION (0.8ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.0ms) SELECT sqlite_version(*) + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- +id: 1 +a: 1 +b: 3 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:29:21.079132000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:29:21.079132000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:29:21.079132000 Z +','2021-08-19 23:29:21.107905',NULL) + TRANSACTION (1.0ms) commit transaction + Post Update (1.0ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.113375"]] + TRANSACTION (0.8ms) commit transaction + Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) begin transaction + ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'--- +id: 1 +a: 2 +b: 4 +created_at: !ruby/object:ActiveSupport::TimeWithZone + utc: &1 2021-08-19 23:29:21.079132000 Z + zone: &2 !ruby/object:ActiveSupport::TimeZone + name: Etc/UTC + time: 2021-08-19 23:29:21.079132000 Z +updated_at: !ruby/object:ActiveSupport::TimeWithZone + utc: *1 + zone: *2 + time: 2021-08-19 23:29:21.079132000 Z +','2021-08-19 23:29:21.117615',NULL) + TRANSACTION (0.6ms) commit transaction + TRANSACTION (0.0ms) begin transaction ---------------------------------------- ActiveSnapshotTest: test_exposes_version ---------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + 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", "2021-03-06 10:31:20.630104"], ["updated_at", "2021-03-06 10:31:20.630104"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - 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", "2021-03-06 10:31:20.637564"]] - 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]] - 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,'--- + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.151063"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:31:20.340449000 Z + time: 2021-08-19 23:29:21.079132000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.340449000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: *1 - time: 2021-03-06 10:31:20.340449000 Z -','2021-03-06 10:31:20.645370',NULL),(NULL,3,'Comment',1,'--- + time: 2021-08-19 23:29:21.079132000 Z +','2021-08-19 23:29:21.153591',NULL),(NULL,3,'Comment',1,'--- id: 1 content: foo post_id: 1 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.630104000 Z + utc: 2021-08-19 23:29:21.148886000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:31:20.630104000 Z + time: 2021-08-19 23:29:21.148886000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:31:20.630104000 Z + utc: 2021-08-19 23:29:21.148886000 Z zone: *1 - time: 2021-03-06 10:31:20.630104000 Z -','2021-03-06 10:31:20.645370','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.3ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:31:20.648882"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:31:20.650234"], ["id", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - 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", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:31:20.653698"], ["updated_at", "2021-03-06 10:31:20.653698"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:31:20.656699"], ["updated_at", "2021-03-06 10:31:20.656699"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshots" -  (0.2ms) 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]] + time: 2021-08-19 23:29:21.148886000 Z +','2021-08-19 23:29:21.153591','comments') + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:21.154558"], ["id", 1]] + Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:21.154916"], ["id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.155758"], ["updated_at", "2021-08-19 23:29:21.155758"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Comment Create (0.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.156425"], ["updated_at", "2021-08-19 23:29:21.156425"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.0ms) SELECT COUNT(*) FROM "snapshot_items" + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] ActiveSnapshot::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.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-06 10:31:20.340449"], ["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", "2021-03-06 10:31:20.630104"], ["updated_at", "2021-03-06 10:31:20.630104"]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] + Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] + Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:29:21.079132"], ["id", 1]] + Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]] TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.2ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] +  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" +  (0.0ms) SELECT COUNT(*) FROM "snapshots" +  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] -  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.2ms) rollback transaction -  (1.4ms) SELECT sqlite_version(*) -  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC - ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] -  (6.2ms) DELETE FROM posts; -  (2.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (2.3ms) DELETE FROM snapshots; -  (2.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (19.5ms) DELETE FROM snapshot_items; -  (32.0ms) 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.1ms) begin transaction - Post Create (0.2ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:32:12.899281"], ["updated_at", "2021-03-06 10:32:12.899281"]] - TRANSACTION (6.0ms) 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", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:12.926653"]] - TRANSACTION (42.3ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) SELECT sqlite_version(*) - TRANSACTION (0.1ms) begin transaction - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'--- -id: 1 -a: 1 -b: 3 -created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:32:12.899281000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z - zone: *1 - time: 2021-03-06 10:32:12.899281000 Z -','2021-03-06 10:32:12.995044',NULL) - TRANSACTION (15.4ms) commit transaction - Post Update (35.6ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] - TRANSACTION (0.2ms) begin transaction - ActiveSnapshot::Snapshot Exists? (0.5ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:13.058367"]] - TRANSACTION (15.5ms) 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]] - TRANSACTION (0.1ms) 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: 2021-03-06 10:32:12.899281000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:32:12.899281000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z - zone: *1 - time: 2021-03-06 10:32:12.899281000 Z -','2021-03-06 10:32:13.082124',NULL) - TRANSACTION (14.7ms) commit transaction - TRANSACTION (0.1ms) begin transaction + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] +  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.3ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------------------------- +ActiveSnapshotTest: test_exposes_main_module +-------------------------------------------- + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction ------------------------------------------------ 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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -SnapshotsConcernTest: test_relationships ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction + 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.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-03-06 10:32:13.167264"]] - 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]] + ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:29:21.176506"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + 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: 2021-03-06 10:32:12.899281000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:32:12.899281000 Z + time: 2021-08-19 23:29:21.079132000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: *1 - time: 2021-03-06 10:32:12.899281000 Z -','2021-03-06 10:32:13.171841',NULL) - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + time: 2021-08-19 23:29:21.079132000 Z +','2021-08-19 23:29:21.179444',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.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", "2021-03-06 10:32:13.175016"]] - 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]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.182276"]] + TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:32:12.899281000 Z + time: 2021-08-19 23:29:21.079132000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: *1 - time: 2021-03-06 10:32:12.899281000 Z -','2021-03-06 10:32:13.178785',NULL) - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) SAVEPOINT active_record_1 + time: 2021-08-19 23:29:21.079132000 Z +','2021-08-19 23:29:21.185087',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", "2021-03-06 10:32:13.181700"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 + ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.186765"]] + 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]] - 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,5,'Post',1,'--- + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'--- id: 1 a: 2 b: 4 created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: &1 !ruby/object:ActiveSupport::TimeZone name: Etc/UTC - time: 2021-03-06 10:32:12.899281000 Z + time: 2021-08-19 23:29:21.079132000 Z updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z + utc: 2021-08-19 23:29:21.079132000 Z zone: *1 - time: 2021-03-06 10:32:12.899281000 Z -','2021-03-06 10:32:13.185229',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 - TRANSACTION (0.2ms) 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.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 ------------------------------------- -SnapshotItemTest: test_relationships ------------------------------------- - 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.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.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.1ms) rollback transaction + time: 2021-08-19 23:29:21.079132000 Z +','2021-08-19 23:29:21.189732',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.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.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.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:32:13.231204"], ["updated_at", "2021-03-06 10:32:13.231204"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:13.235818"]] - 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]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- -id: 1 -a: 2 -b: 4 -created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:32:12.899281000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:12.899281000 Z - zone: *1 - time: 2021-03-06 10:32:12.899281000 Z -','2021-03-06 10:32:13.240717',NULL),(NULL,3,'Comment',1,'--- -id: 1 -content: foo -post_id: 1 -created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:13.231204000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:32:13.231204000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:32:13.231204000 Z - zone: *1 - time: 2021-03-06 10:32:13.231204000 Z -','2021-03-06 10:32:13.240717','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:32:13.243008"], ["id", 1]] - Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:32:13.243839"], ["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.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", "2021-03-06 10:32:13.245866"], ["updated_at", "2021-03-06 10:32:13.245866"]] - 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", "2021-03-06 10:32:13.247615"], ["updated_at", "2021-03-06 10:32:13.247615"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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", "2021-03-06 10:32:12.899281"], ["id", 1]] - Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:32:13.231204"], ["updated_at", "2021-03-06 10:32:13.231204"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] -  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.2ms) rollback transaction - TRANSACTION (0.0ms) begin transaction ---------------------------------------- -ActiveSnapshotTest: test_exposes_version +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 + TRANSACTION (0.1ms) rollback transaction + TRANSACTION (0.1ms) begin transaction ----------------------------------------------- InstallGeneratorTest: test_should_add_migration ----------------------------------------------- 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.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.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.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - 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.1ms) RELEASE SAVEPOINT active_record_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.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.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.1ms) rollback transaction + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction -------------------------------- SnapshotTest: test_relationships -------------------------------- TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction +-------------------------------------- +SnapshotTest: test_build_snapshot_item +-------------------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) rollback transaction + TRANSACTION (0.0ms) begin transaction +-------------------------- +SnapshotTest: test_restore +-------------------------- + ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + TRANSACTION (0.0ms) SAVEPOINT active_record_1 + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] + Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]] + Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]] + 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.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.1ms) rollback transaction -  (1.4ms) SELECT sqlite_version(*) -  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC -  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC - ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]] -  (5.6ms) DELETE FROM posts; -  (2.4ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts'; -  (3.3ms) DELETE FROM snapshots; -  (2.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots'; -  (2.8ms) DELETE FROM snapshot_items; -  (2.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items'; - Post Load (0.5ms) 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", "2021-03-06 10:35:09.036765"], ["updated_at", "2021-03-06 10:35:09.036765"]] - TRANSACTION (2.1ms) 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", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.059827"]] - TRANSACTION (2.1ms) commit transaction - Post Load (0.2ms) 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]] -  (0.1ms) 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: 2021-03-06 10:35:09.036765000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.036765000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: *1 - time: 2021-03-06 10:35:09.036765000 Z -','2021-03-06 10:35:09.084857',NULL) - TRANSACTION (2.2ms) commit transaction - Post Update (2.1ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]] + TRANSACTION (0.0ms) rollback transaction TRANSACTION (0.0ms) begin transaction - ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]] - ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.093521"]] - TRANSACTION (1.9ms) 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]] - TRANSACTION (0.1ms) 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: 2021-03-06 10:35:09.036765000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.036765000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: *1 - time: 2021-03-06 10:35:09.036765000 Z -','2021-03-06 10:35:09.099915',NULL) - TRANSACTION (2.0ms) commit transaction - TRANSACTION (0.2ms) begin transaction ------------------------------------------------ -InstallGeneratorTest: test_should_add_migration ------------------------------------------------ - TRANSACTION (0.1ms) 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_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.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction + TRANSACTION (0.0ms) 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.2ms) 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.1ms) RELEASE SAVEPOINT active_record_1 - TRANSACTION (0.2ms) 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.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.4ms) 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.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.3ms) 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_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.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.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.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.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.3ms) 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.3ms) 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 --------------------------------------- -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.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_restore --------------------------- - ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]] + Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["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.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."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.3ms) 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.1ms) 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 -------------------------------------------- -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", "2021-03-06 10:35:09.241866"], ["updated_at", "2021-03-06 10:35:09.241866"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.2ms) SELECT COUNT(*) FROM "snapshot_items" - 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", "2021-03-06 10:35:09.249216"]] - 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]] - 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: 2021-03-06 10:35:09.036765000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.036765000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: *1 - time: 2021-03-06 10:35:09.036765000 Z -','2021-03-06 10:35:09.256626',NULL),(NULL,3,'Comment',1,'--- -id: 1 -content: foo -post_id: 1 -created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.241866000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.241866000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.241866000 Z - zone: *1 - time: 2021-03-06 10:35:09.241866000 Z -','2021-03-06 10:35:09.256626','comments') - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:35:09.259949"], ["id", 1]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-07 10:35:09.261156"], ["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.1ms) SAVEPOINT active_record_1 - Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:35:09.264365"], ["updated_at", "2021-03-06 10:35:09.264365"]] - 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", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:35:09.266944"], ["updated_at", "2021-03-06 10:35:09.266944"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (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]] - 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.3ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]] - Comment Destroy (0.2ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]] - Comment Destroy (0.3ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]] - Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-03-06 10:35:09.036765"], ["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", "2021-03-06 10:35:09.241866"], ["updated_at", "2021-03-06 10:35:09.241866"]] - TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1 -  (0.2ms) SELECT COUNT(*) FROM "snapshot_items" -  (0.1ms) SELECT COUNT(*) FROM "snapshots" -  (0.3ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] -  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] - Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]] - TRANSACTION (0.2ms) rollback transaction - TRANSACTION (0.1ms) begin transaction --------------------------------------------- -ActiveSnapshotTest: test_exposes_main_module --------------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) begin transaction ----------------------------------------- -ActiveSnapshotTest: test_exposes_version ----------------------------------------- - TRANSACTION (0.1ms) rollback transaction - TRANSACTION (0.1ms) 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.2ms) 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.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", "2021-03-06 10:35:09.320756"]] - 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]] - TRANSACTION (0.1ms) SAVEPOINT active_record_1 - ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'--- -id: 1 -a: 2 -b: 4 -created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.036765000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: *1 - time: 2021-03-06 10:35:09.036765000 Z -','2021-03-06 10:35:09.327102',NULL) - TRANSACTION (0.1ms) 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 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", "2021-03-06 10:35:09.331757"]] - 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]] - 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: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.036765000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: *1 - time: 2021-03-06 10:35:09.036765000 Z -','2021-03-06 10:35:09.342118',NULL) - TRANSACTION (0.1ms) 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.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", "2021-03-06 10:35:09.346573"]] - 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]] - 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,5,'Post',1,'--- -id: 1 -a: 2 -b: 4 -created_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: &1 !ruby/object:ActiveSupport::TimeZone - name: Etc/UTC - time: 2021-03-06 10:35:09.036765000 Z -updated_at: !ruby/object:ActiveSupport::TimeWithZone - utc: 2021-03-06 10:35:09.036765000 Z - zone: *1 - time: 2021-03-06 10:35:09.036765000 Z -','2021-03-06 10:35:09.352884',NULL) - TRANSACTION (0.1ms) 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]] - TRANSACTION (0.1ms) ROLLBACK TO 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