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 @@
- [1m[35m (1.2ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.5ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
+ [1m[35m (1.8ms)[0m [1m[34mSELECT sqlite_version(*)[0m
+ [1m[35m (1.1ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
+ [1m[35m (1.0ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
[1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306085821)
+ [1m[35m (0.1ms)[0m [1m[35mCREATE 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)[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE 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)[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_notes_on_post_id" ON "notes" ("post_id")[0m
+ [1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
+ [1m[36mTRANSACTION (0.7ms)[0m [1m[36mcommit transaction[0m
+Migrating to CreateSnapshotsTables (20210306100122)
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306085821"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 08:58:24.143036"], ["updated_at", "2021-03-06 08:58:24.143036"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
+ [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE 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)[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
+ [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
+ [1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306100122"]]
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-08-19 23:28:07.589659"], ["updated_at", "2021-08-19 23:28:07.589659"]]
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.7ms)[0m [1m[31mDELETE FROM posts;[0m
[1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
+ [1m[35m (0.7ms)[0m [1m[31mDELETE FROM snapshots;[0m
[1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
+ [1m[35m (0.7ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
[1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 08:58:24.161099"], ["updated_at", "2021-03-06 08:58:24.161099"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.184854"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Create (0.3ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:07.601363"], ["updated_at", "2021-08-19 23:28:07.601363"]]
+ [1m[36mTRANSACTION (0.7ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.616280"]]
+ [1m[36mTRANSACTION (1.2ms)[0m [1m[36mcommit transaction[0m
[1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.2ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Update (0.8ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.218941"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.643299"]]
+ [1m[36mTRANSACTION (0.5ms)[0m [1m[36mcommit transaction[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.3ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 08:58:24.161000"], ["updated_at", "2021-03-06 08:58:24.161000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (8.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 08:58:24.161000"], ["updated_at", "2021-03-06 08:58:24.161000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
ActiveSnapshotTest: test_exposes_main_module
--------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+----------------------------------------
+ActiveSnapshotTest: test_exposes_version
+----------------------------------------
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
ActiveSnapshotTest: test_snapshot_lifecycle
-------------------------------------------
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 08:58:24.366028"], ["updated_at", "2021-03-06 08:58:24.366028"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.691182"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.372989"]]
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:28:07.695499"], ["id", 1]]
+ [1m[36mPost Update (0.0ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:28:07.695924"], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.696917"], ["updated_at", "2021-08-19 23:28:07.696917"]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 08:58:24.383250"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 08:58:24.384491"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 08:58:24.387735"], ["updated_at", "2021-03-06 08:58:24.387735"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 08:58:24.390467"], ["updated_at", "2021-03-06 08:58:24.390467"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.697739"], ["updated_at", "2021-08-19 23:28:07.697739"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 08:58:24.161000"], ["updated_at", "2021-03-06 08:58:24.161000"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
+ [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-19 23:28:07.601363"], ["id", 1]]
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 08:58:24.419720"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.429476"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 08:58:24.438667"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.5ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306090620)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306090620"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.3ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.5ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:06:22.569301"], ["updated_at", "2021-03-06 09:06:22.569301"]]
- [1m[36mTRANSACTION (0.3ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:06:22.589163"], ["updated_at", "2021-03-06 09:06:22.589163"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.611520"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.642741"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+--------------------------
+SnapshotTest: test_restore
+--------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:06:22.589000"], ["updated_at", "2021-03-06 09:06:22.589000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 09:06:22.726462"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.737216"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.755093"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
+ [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------
-SnapshotTest: test_fetch_reified_items
+SnapshotTest: test_build_snapshot_item
--------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------
-SnapshotTest: test_build_snapshot_item
+SnapshotTest: test_fetch_reified_items
--------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
[1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:06:22.589000"], ["updated_at", "2021-03-06 09:06:22.589000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:06:22.836522"], ["updated_at", "2021-03-06 09:06:22.836522"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:06:22.843369"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:06:22.853458"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:06:22.854778"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:06:22.857948"], ["updated_at", "2021-03-06 09:06:22.857948"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:06:22.860565"], ["updated_at", "2021-03-06 09:06:22.860565"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 09:06:22.589000"], ["updated_at", "2021-03-06 09:06:22.589000"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306090856)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306090856"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.6ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:08:58.845558"], ["updated_at", "2021-03-06 09:08:58.845558"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.1ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:08:58.858683"], ["updated_at", "2021-03-06 09:08:58.858683"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:58.876821"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:58.900550"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:08:58.858000"], ["updated_at", "2021-03-06 09:08:58.858000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------
SnapshotTest: test_validations
------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------
SnapshotTest: test_metadata
---------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------
SnapshotTest: test_relationships
--------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
+------------------------------------
+SnapshotItemTest: test_relationships
+------------------------------------
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+----------------------------------
+SnapshotItemTest: test_validations
+----------------------------------
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+-----------------------------
+SnapshotItemTest: test_object
+-----------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+------------------------------------
+SnapshotItemTest: test_restore_item!
+------------------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
SnapshotsConcernTest: test_has_snapshot_children
------------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
SnapshotsConcernTest: test_relationships
----------------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
@@ -639,347 +279,254 @@
SnapshotsConcernTest: test_create_snapshot!
-------------------------------------------
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 09:08:58.992198"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:28:07.754325"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:58.998844"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.759398"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:59.004501"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.764341"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:08:59.020057"], ["updated_at", "2021-03-06 09:08:59.020057"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:08:59.024289"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:08:59.030437"], ["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:08:59.031206"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:08:59.033217"], ["updated_at", "2021-03-06 09:08:59.033217"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:08:59.034835"], ["updated_at", "2021-03-06 09:08:59.034835"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 09:08:58.858000"], ["updated_at", "2021-03-06 09:08:58.858000"], ["id", 1]]
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:08:58.858000"], ["updated_at", "2021-03-06 09:08:58.858000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------------
InstallGeneratorTest: test_should_add_migration
-----------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.2ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (1.5ms)[0m [1m[34mSELECT sqlite_version(*)[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306091040)
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306091040"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:10:42.909084"], ["updated_at", "2021-03-06 09:10:42.909084"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
+ [1m[35m (1.9ms)[0m [1m[31mDELETE FROM posts;[0m
+ [1m[35m (1.4ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
+ [1m[35m (1.2ms)[0m [1m[31mDELETE FROM snapshots;[0m
+ [1m[35m (1.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
+ [1m[35m (1.0ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
+ [1m[35m (1.0ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.1ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:10:42.921978"], ["updated_at", "2021-03-06 09:10:42.921978"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mPost Create (0.3ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:46.603059"], ["updated_at", "2021-08-19 23:28:46.603059"]]
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:42.940125"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.616208"]]
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Update (0.7ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:42.963800"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.635496"]]
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.5ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
ActiveSnapshotTest: test_exposes_version
----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
ActiveSnapshotTest: test_snapshot_lifecycle
-------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:10:43.013846"], ["updated_at", "2021-03-06 09:10:43.013846"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:43.018772"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:10:43.025648"], ["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:10:43.026558"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:10:43.028640"], ["updated_at", "2021-03-06 09:10:43.028640"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:10:43.030310"], ["updated_at", "2021-03-06 09:10:43.030310"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.670427"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:28:46.673978"], ["id", 1]]
+ [1m[36mPost Update (0.0ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:28:46.674338"], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.675175"], ["updated_at", "2021-08-19 23:28:46.675175"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.675840"], ["updated_at", "2021-08-19 23:28:46.675840"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 09:10:42.921000"], ["updated_at", "2021-03-06 09:10:42.921000"], ["id", 1]]
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
+ [1m[36mPost Update (0.0ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-19 23:28:46.603059"], ["id", 1]]
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
ActiveSnapshotTest: test_exposes_main_module
--------------------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 09:10:43.057757"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:43.063961"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:10:43.069588"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------
SnapshotTest: test_fetch_reified_items
--------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:10:42.921000"], ["updated_at", "2021-03-06 09:10:42.921000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+--------------------------------
+SnapshotTest: test_relationships
+--------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------
SnapshotTest: test_validations
------------------------------
@@ -987,2347 +534,835 @@
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------
SnapshotTest: test_metadata
---------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:10:42.921000"], ["updated_at", "2021-03-06 09:10:42.921000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306091241)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306091241"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:12:44.028585"], ["updated_at", "2021-03-06 09:12:44.028585"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:12:44.044597"], ["updated_at", "2021-03-06 09:12:44.044597"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.066055"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.095901"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:12:44.044000"], ["updated_at", "2021-03-06 09:12:44.044000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.4ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------
SnapshotTest: test_restore
--------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:12:44.044000"], ["updated_at", "2021-03-06 09:12:44.044000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
+ [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
SnapshotTest: test_build_snapshot_item
--------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+-----------------------------------------------
+InstallGeneratorTest: test_should_add_migration
+-----------------------------------------------
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 09:12:44.221259"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.231298"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.240430"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
SnapshotsConcernTest: test_has_snapshot_children
------------------------------------------------
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
SnapshotsConcernTest: test_relationships
----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:12:44.278695"], ["updated_at", "2021-03-06 09:12:44.278695"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:12:44.285267"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:12:44.295066"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:12:44.296314"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:12:44.299573"], ["updated_at", "2021-03-06 09:12:44.299573"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:12:44.302211"], ["updated_at", "2021-03-06 09:12:44.302211"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 09:12:44.044000"], ["updated_at", "2021-03-06 09:12:44.044000"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306092834)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306092834"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:28:36.969946"], ["updated_at", "2021-03-06 09:28:36.969946"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:28:36.996383"], ["updated_at", "2021-03-06 09:28:36.996383"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.018800"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.049824"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:28:36.996000"], ["updated_at", "2021-03-06 09:28:36.996000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:28:36.996000"], ["updated_at", "2021-03-06 09:28:36.996000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:28:37.175237"], ["updated_at", "2021-03-06 09:28:37.175237"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.182215"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:28:37.192514"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:28:37.193734"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:28:37.197093"], ["updated_at", "2021-03-06 09:28:37.197093"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:28:37.199814"], ["updated_at", "2021-03-06 09:28:37.199814"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 09:28:36.996000"], ["updated_at", "2021-03-06 09:28:36.996000"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
SnapshotsConcernTest: test_create_snapshot!
-------------------------------------------
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 09:28:37.247789"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:28:46.720422"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.725154"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.257455"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.729775"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:28:37.266655"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306093333)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306093333"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 09:33:35.911939"], ["updated_at", "2021-03-06 09:33:35.911939"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:33:35.928774"], ["updated_at", "2021-03-06 09:33:35.928774"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:35.950660"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:35.981468"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.4ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------
SnapshotItemTest: test_object
-----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------
SnapshotItemTest: test_validations
----------------------------------
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------
SnapshotItemTest: test_restore_item!
------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:33:35.928000"], ["updated_at", "2021-03-06 09:33:35.928000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 09:33:36.076170"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+------------------------------------
+SnapshotItemTest: test_relationships
+------------------------------------
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (1.5ms)[0m [1m[34mSELECT sqlite_version(*)[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
+ [1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
+ [1m[35m (1.9ms)[0m [1m[31mDELETE FROM posts;[0m
+ [1m[35m (1.3ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
+ [1m[35m (1.2ms)[0m [1m[31mDELETE FROM snapshots;[0m
+ [1m[35m (1.0ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
+ [1m[35m (1.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
+ [1m[35m (1.0ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mPost Create (0.3ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:11.308109"], ["updated_at", "2021-08-19 23:29:11.308109"]]
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.320795"]]
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:36.083355"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:36.089365"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Update (0.6ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.339527"]]
+ [1m[36mTRANSACTION (0.5ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.4ms)[0m [1m[36mcommit transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------
SnapshotTest: test_validations
------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.0ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+---------------------------
+SnapshotTest: test_metadata
+---------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------
SnapshotTest: test_relationships
--------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------
SnapshotTest: test_restore
--------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.0ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 09:33:35.928000"], ["updated_at", "2021-03-06 09:33:35.928000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
+ [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
+--------------------------------------
+SnapshotTest: test_fetch_reified_items
+--------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:33:36.136905"], ["updated_at", "2021-03-06 09:33:36.136905"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 09:33:36.141213"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:33:36.147556"], ["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 09:33:36.148330"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 09:33:36.150415"], ["updated_at", "2021-03-06 09:33:36.150415"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 09:33:36.152053"], ["updated_at", "2021-03-06 09:33:36.152053"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 09:33:35.928000"], ["updated_at", "2021-03-06 09:33:35.928000"], ["id", 1]]
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (1.3ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.4ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306100122)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306100122"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 10:01:25.283218"], ["updated_at", "2021-03-06 10:01:25.283218"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:01:25.299506"], ["updated_at", "2021-03-06 10:01:25.299506"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.321090"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.351318"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------
SnapshotTest: test_build_snapshot_item
--------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.0ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.3ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:01:25.299000"], ["updated_at", "2021-03-06 10:01:25.299000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 10:01:25.458320"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.468523"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.477622"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:01:25.299000"], ["updated_at", "2021-03-06 10:01:25.299000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:01:25.542121"], ["updated_at", "2021-03-06 10:01:25.542121"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:01:25.548749"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:01:25.558659"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:01:25.559824"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:01:25.562972"], ["updated_at", "2021-03-06 10:01:25.562972"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:01:25.565533"], ["updated_at", "2021-03-06 10:01:25.565533"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 10:01:25.299000"], ["updated_at", "2021-03-06 10:01:25.299000"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306100122)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306100122"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 10:10:43.746775"], ["updated_at", "2021-03-06 10:10:43.746775"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (0.1ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.1ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:10:43.759961"], ["updated_at", "2021-03-06 10:10:43.759961"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.778612"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.803936"]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "{\"foo\":\"bar\"}"], ["created_at", "2021-03-06 10:10:43.850428"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.859615"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.866944"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
ActiveSnapshotTest: test_snapshot_lifecycle
-------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:10:43.918250"], ["updated_at", "2021-03-06 10:10:43.918250"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "{}"], ["created_at", "2021-03-06 10:10:43.923148"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:10:43.929789"], ["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:10:43.930638"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:10:43.932687"], ["updated_at", "2021-03-06 10:10:43.932687"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:10:43.934350"], ["updated_at", "2021-03-06 10:10:43.934350"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["created_at", "2021-03-06 10:10:43.759000"], ["updated_at", "2021-03-06 10:10:43.759000"], ["id", 1]]
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.386301"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:29:11.390035"], ["id", 1]]
+ [1m[36mPost Update (0.0ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:29:11.390390"], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391260"], ["updated_at", "2021-08-19 23:29:11.391260"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.0ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391968"], ["updated_at", "2021-08-19 23:29:11.391968"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
+ [1m[36mPost Update (0.0ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-19 23:29:11.308109"], ["id", 1]]
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
[1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
ActiveSnapshotTest: test_exposes_version
----------------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+--------------------------------------------
+ActiveSnapshotTest: test_exposes_main_module
+--------------------------------------------
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:10:43.759000"], ["updated_at", "2021-03-06 10:10:43.759000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------
SnapshotItemTest: test_relationships
------------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------
SnapshotItemTest: test_restore_item!
------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ?, "created_at" = ?, "updated_at" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:10:43.759000"], ["updated_at", "2021-03-06 10:10:43.759000"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------
SnapshotItemTest: test_validations
----------------------------------
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.0ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
[1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.5ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (3.8ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
- [1m[35m (2.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
-Migrating to SetUpTestTables (20210128155312)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.6ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.5ms)[0m [1m[35mCREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210128155312"]]
- [1m[36mTRANSACTION (2.6ms)[0m [1m[36mcommit transaction[0m
-Migrating to CreateSnapshotsTables (20210306100122)
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[35m (0.4ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")[0m
- [1m[35m (0.2ms)[0m [1m[35mCREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE 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)[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")[0m
- [1m[35m (0.3ms)[0m [1m[35mCREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")[0m
- [1m[36mActiveRecord::SchemaMigration Create (0.3ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20210306100122"]]
- [1m[36mTRANSACTION (2.7ms)[0m [1m[36mcommit transaction[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.4ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", "2021-03-06 10:31:20.311300"], ["updated_at", "2021-03-06 10:31:20.311300"]]
- [1m[36mTRANSACTION (2.9ms)[0m [1m[36mcommit transaction[0m
- [1m[35m (1.9ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (0.2ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (2.0ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (0.2ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (2.0ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (0.2ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.4ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:31:20.340449"], ["updated_at", "2021-03-06 10:31:20.340449"]]
- [1m[36mTRANSACTION (1.8ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.4ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.369355"]]
- [1m[36mTRANSACTION (2.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (2.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (2.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.4ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.409875"]]
- [1m[36mTRANSACTION (2.7ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.4ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (2.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+-----------------------------
+SnapshotItemTest: test_object
+-----------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
SnapshotsConcernTest: test_create_snapshot!
-------------------------------------------
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.4ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-03-06 10:31:20.467125"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:29:11.411538"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.479635"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.415146"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.490712"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.418345"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["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)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
SnapshotsConcernTest: test_has_snapshot_children
------------------------------------------------
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
SnapshotsConcernTest: test_relationships
----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.3ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.4ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (8.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------------
InstallGeneratorTest: test_should_add_migration
-----------------------------------------------
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (1.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
+ [1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
+ [1m[35m (1.8ms)[0m [1m[31mDELETE FROM posts;[0m
+ [1m[35m (1.2ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
+ [1m[35m (1.1ms)[0m [1m[31mDELETE FROM snapshots;[0m
+ [1m[35m (0.9ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
+ [1m[35m (0.9ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
+ [1m[35m (0.9ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mPost Create (0.3ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:21.079132"], ["updated_at", "2021-08-19 23:29:21.079132"]]
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.092194"]]
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (1.0ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Update (1.0ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.4ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.113375"]]
+ [1m[36mTRANSACTION (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
+ [1m[36mTRANSACTION (0.6ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
ActiveSnapshotTest: test_exposes_version
----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
ActiveSnapshotTest: test_snapshot_lifecycle
-------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.3ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:31:20.630104"], ["updated_at", "2021-03-06 10:31:20.630104"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:31:20.637564"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.151063"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:31:20.648882"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:31:20.650234"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:31:20.653698"], ["updated_at", "2021-03-06 10:31:20.653698"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:31:20.656699"], ["updated_at", "2021-03-06 10:31:20.656699"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ time: 2021-08-19 23:29:21.148886000 Z
+','2021-08-19 23:29:21.153591','comments')[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:29:21.154558"], ["id", 1]]
+ [1m[36mPost Update (0.0ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-20 23:29:21.154916"], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.155758"], ["updated_at", "2021-08-19 23:29:21.155758"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mComment Create (0.0ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.156425"], ["updated_at", "2021-08-19 23:29:21.156425"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-06 10:31:20.340449"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
+ [1m[36mComment Destroy (0.0ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
+ [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-08-19 23:29:21.079132"], ["id", 1]]
+ [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
+ [1m[35m (0.0ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[35m (6.2ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (2.1ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (2.3ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (2.2ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (19.5ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (32.0ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.2ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:32:12.899281"], ["updated_at", "2021-03-06 10:32:12.899281"]]
- [1m[36mTRANSACTION (6.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:12.926653"]]
- [1m[36mTRANSACTION (42.3ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (15.4ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (35.6ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:13.058367"]]
- [1m[36mTRANSACTION (15.5ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.4ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (14.7ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+--------------------------------------------
+ActiveSnapshotTest: test_exposes_main_module
+--------------------------------------------
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
SnapshotsConcernTest: test_has_snapshot_children
------------------------------------------------
[1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------
SnapshotsConcernTest: test_create_snapshot!
-------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-03-06 10:32:13.167264"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:29:21.176506"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ time: 2021-08-19 23:29:21.079132000 Z
+','2021-08-19 23:29:21.179444',NULL)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:13.175016"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.182276"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ time: 2021-08-19 23:29:21.079132000 Z
+','2021-08-19 23:29:21.185087',NULL)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:13.181700"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Create (0.1ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.186765"]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.0ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::SnapshotItem Create Many (0.1ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_relationships
-------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------
-SnapshotItemTest: test_restore_item!
-------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ time: 2021-08-19 23:29:21.079132000 Z
+','2021-08-19 23:29:21.189732',NULL)[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:32:13.231204"], ["updated_at", "2021-03-06 10:32:13.231204"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:32:13.235818"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:32:13.243008"], ["id", 1]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:32:13.243839"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:32:13.245866"], ["updated_at", "2021-03-06 10:32:13.245866"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:32:13.247615"], ["updated_at", "2021-03-06 10:32:13.247615"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.1ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-06 10:32:12.899281"], ["id", 1]]
- [1m[36mComment Create (0.1ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
----------------------------------------
-ActiveSnapshotTest: test_exposes_version
+SnapshotsConcernTest: test_relationships
----------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------------
InstallGeneratorTest: test_should_add_migration
-----------------------------------------------
[1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
SnapshotTest: test_fetch_reified_items
--------------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
--------------------------------
SnapshotTest: test_relationships
--------------------------------
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+--------------------------------------
+SnapshotTest: test_build_snapshot_item
+--------------------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+--------------------------
+SnapshotTest: test_restore
+--------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[36mComment Load (0.0ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mNote Load (0.1ms)[0m [1m[34mSELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ?[0m [["post_id", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
+ [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+------------------------------
+SnapshotTest: test_validations
+------------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.2ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
---------------------------
SnapshotTest: test_metadata
---------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[35m (1.4ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
- [1m[36mActiveRecord::InternalMetadata Load (0.3ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
- [1m[35m (5.6ms)[0m [1m[31mDELETE FROM posts;[0m
- [1m[35m (2.4ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';[0m
- [1m[35m (3.3ms)[0m [1m[31mDELETE FROM snapshots;[0m
- [1m[35m (2.2ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';[0m
- [1m[35m (2.8ms)[0m [1m[31mDELETE FROM snapshot_items;[0m
- [1m[35m (2.7ms)[0m [1m[33mUPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';[0m
- [1m[36mPost Load (0.5ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ?[0m [["a", 1], ["b", 3], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mPost Create (0.3ms)[0m [1m[32mINSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["a", 1], ["b", 3], ["created_at", "2021-03-06 10:35:09.036765"], ["updated_at", "2021-03-06 10:35:09.036765"]]
- [1m[36mTRANSACTION (2.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.059827"]]
- [1m[36mTRANSACTION (2.1ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (2.2ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Update (2.1ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 2], ["b", 4], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.093521"]]
- [1m[36mTRANSACTION (1.9ms)[0m [1m[36mcommit transaction[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.2ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.4ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (2.0ms)[0m [1m[36mcommit transaction[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[36mbegin transaction[0m
------------------------------------------------
-InstallGeneratorTest: test_should_add_migration
------------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+-----------------------------
+SnapshotItemTest: test_object
+-----------------------------
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
+----------------------------------
+SnapshotItemTest: test_validations
+----------------------------------
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Exists? (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------
SnapshotItemTest: test_relationships
------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
------------------------------------
SnapshotItemTest: test_restore_item!
------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.3ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.2ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Update (0.3ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------
-SnapshotItemTest: test_validations
-----------------------------------
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 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 ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Load (0.4ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ?[0m [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ?[0m [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
------------------------------
-SnapshotItemTest: test_object
------------------------------
[1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_fetch_reified_items
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
----------------------------
-SnapshotTest: test_metadata
----------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------
-SnapshotTest: test_validations
-------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------
-SnapshotTest: test_build_snapshot_item
---------------------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------
-SnapshotTest: test_restore
---------------------------
- [1m[36mActiveSnapshot::Snapshot Load (0.1ms)[0m [1m[34mSELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mActiveSnapshot::SnapshotItem Load (0.0ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
+ [1m[36mPost Load (0.0ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
[1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 1]]
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mPost Update (0.5ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.3ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------
-SnapshotTest: test_relationships
---------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-ActiveSnapshotTest: test_snapshot_lifecycle
--------------------------------------------
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.4ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:35:09.241866"], ["updated_at", "2021-03-06 10:35:09.241866"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.3ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.249216"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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')[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:35:09.259949"], ["id", 1]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-07 10:35:09.261156"], ["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Destroy (0.1ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "foo"], ["post_id", 1], ["created_at", "2021-03-06 10:35:09.264365"], ["updated_at", "2021-03-06 10:35:09.264365"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "bar"], ["post_id", 1], ["created_at", "2021-03-06 10:35:09.266944"], ["updated_at", "2021-03-06 10:35:09.266944"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mActiveSnapshot::SnapshotItem Load (0.1ms)[0m [1m[34mSELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ?[0m [["snapshot_id", 3]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
- [1m[36mComment Load (0.3ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."id" = ?[0m [["id", 1]]
- [1m[36mComment Destroy (0.2ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 2]]
- [1m[36mComment Destroy (0.3ms)[0m [1m[31mDELETE FROM "comments" WHERE "comments"."id" = ?[0m [["id", 3]]
- [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ?[0m [["updated_at", "2021-03-06 10:35:09.036765"], ["id", 1]]
- [1m[36mComment Create (0.2ms)[0m [1m[32mINSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["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"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshot_items"[0m
- [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots"[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ?[0m [["identifier", "snapshot-1"]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
---------------------------------------------
-ActiveSnapshotTest: test_exposes_main_module
---------------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-ActiveSnapshotTest: test_exposes_version
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
-------------------------------------------------
-SnapshotsConcernTest: test_has_snapshot_children
-------------------------------------------------
- [1m[36mPost Load (0.3ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.2ms)[0m [1m[36mbegin transaction[0m
-----------------------------------------
-SnapshotsConcernTest: test_relationships
-----------------------------------------
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mrollback transaction[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
--------------------------------------------
-SnapshotsConcernTest: test_create_snapshot!
--------------------------------------------
- [1m[36mPost Load (0.2ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.4ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-03-06 10:35:09.320756"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT INTO "snapshot_items" ("id","snapshot_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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.331757"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.2ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mActiveSnapshot::Snapshot Create (0.2ms)[0m [1m[32mINSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?)[0m [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-03-06 10:35:09.346573"]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mPost Load (0.1ms)[0m [1m[34mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
- [1m[36mComment Load (0.1ms)[0m [1m[34mSELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ?[0m [["post_id", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::SnapshotItem Create Many (0.3ms)[0m [1m[32mINSERT 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)[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mTRANSACTION (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mActiveSnapshot::Snapshot Exists? (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ?[0m [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
- [1m[36mTRANSACTION (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mPost Update (0.2ms)[0m [1m[33mUPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ?[0m [["a", 1], ["b", 3], ["id", 1]]
+ [1m[36mTRANSACTION (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mTRANSACTION (0.2ms)[0m [1m[31mrollback transaction[0m