active_snapshot 0.2.1 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,46 +1,88 @@
1
-  (1.8ms) SELECT sqlite_version(*)
2
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
1
+  (1.7ms) SELECT sqlite_version(*)
2
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3
3
   (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
4
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
4
+ ActiveRecord::SchemaMigration Pluck (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
5
5
  Migrating to SetUpTestTables (20210128155312)
6
6
  TRANSACTION (0.0ms) begin transaction
7
-  (0.3ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "a" integer, "b" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
7
+  (0.4ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "a" integer, "b" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
8
8
   (0.1ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "post_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
9
9
   (0.1ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
10
10
   (0.1ms) CREATE TABLE "notes" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "post_id" integer, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
11
11
   (0.1ms) CREATE INDEX "index_notes_on_post_id" ON "notes" ("post_id")
12
- ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]]
13
- TRANSACTION (0.7ms) commit transaction
12
+ ActiveRecord::SchemaMigration Create (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210128155312"]]
13
+ TRANSACTION (0.8ms) commit transaction
14
14
  Migrating to CreateSnapshotsTables (20210306100122)
15
- TRANSACTION (0.1ms) begin transaction
16
-  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" text, "created_at" datetime NOT NULL)
15
+ TRANSACTION (0.0ms) begin transaction
16
+  (0.3ms) CREATE TABLE "snapshots" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "identifier" varchar NOT NULL, "user_type" varchar, "user_id" integer, "metadata" text, "created_at" datetime(6) NOT NULL)
17
17
   (0.1ms) CREATE INDEX "index_snapshots_on_item" ON "snapshots" ("item_type", "item_id")
18
18
   (0.1ms) CREATE INDEX "index_snapshots_on_identifier" ON "snapshots" ("identifier")
19
19
   (0.1ms) CREATE INDEX "index_snapshots_on_user" ON "snapshots" ("user_type", "user_id")
20
-  (0.1ms) CREATE TABLE "snapshot_items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "snapshot_id" integer NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "object" text NOT NULL, "created_at" datetime NOT NULL, "child_group_name" varchar)
20
+  (0.1ms) CREATE TABLE "snapshot_items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "snapshot_id" integer NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "object" text NOT NULL, "created_at" datetime(6) NOT NULL, "child_group_name" varchar)
21
21
   (0.1ms) CREATE INDEX "index_snapshot_items_on_snapshot_id" ON "snapshot_items" ("snapshot_id")
22
22
   (0.1ms) CREATE INDEX "index_snapshot_items_on_item" ON "snapshot_items" ("item_type", "item_id")
23
23
  ActiveRecord::SchemaMigration Create (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20210306100122"]]
24
- TRANSACTION (0.6ms) commit transaction
25
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
24
+ TRANSACTION (0.8ms) commit transaction
25
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
26
26
  TRANSACTION (0.0ms) begin transaction
27
- ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-19 23:28:07.589659"], ["updated_at", "2021-08-19 23:28:07.589659"]]
27
+ ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2022-02-25 19:12:04.897521"], ["updated_at", "2022-02-25 19:12:04.897521"]]
28
28
  TRANSACTION (0.6ms) commit transaction
29
-  (0.7ms) DELETE FROM posts;
29
+  (1.0ms) DELETE FROM posts;
30
30
   (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
31
-  (0.7ms) DELETE FROM snapshots;
31
+  (0.8ms) DELETE FROM snapshots;
32
32
   (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
33
-  (0.7ms) DELETE FROM snapshot_items;
33
+  (0.9ms) DELETE FROM snapshot_items;
34
34
   (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
35
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
35
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
36
+ TRANSACTION (0.0ms) begin transaction
37
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:12:04.909679"], ["updated_at", "2022-02-25 19:12:04.909679"]]
38
+ TRANSACTION (0.6ms) commit transaction
36
39
  TRANSACTION (0.1ms) begin transaction
37
- Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:07.601363"], ["updated_at", "2021-08-19 23:28:07.601363"]]
40
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
41
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:12:04.928557"]]
42
+ TRANSACTION (0.6ms) commit transaction
43
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
44
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
45
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
46
+  (1.1ms) SELECT sqlite_version(*)
47
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
48
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
49
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
50
+  (6.6ms) DELETE FROM posts;
51
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
52
+  (0.9ms) DELETE FROM snapshots;
53
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
54
+  (0.9ms) DELETE FROM snapshot_items;
55
+  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
56
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
57
+ TRANSACTION (0.0ms) begin transaction
58
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:12:12.893690"], ["updated_at", "2022-02-25 19:12:12.893690"]]
59
+ TRANSACTION (0.8ms) commit transaction
60
+ TRANSACTION (0.0ms) begin transaction
61
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
62
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:12:12.908543"]]
38
63
  TRANSACTION (0.7ms) commit transaction
64
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
66
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
67
+  (1.0ms) SELECT sqlite_version(*)
68
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
69
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
70
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
71
+  (6.5ms) DELETE FROM posts;
72
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
73
+  (0.9ms) DELETE FROM snapshots;
74
+  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
75
+  (0.8ms) DELETE FROM snapshot_items;
76
+  (0.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
77
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
39
78
  TRANSACTION (0.0ms) begin transaction
79
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:13:03.860645"], ["updated_at", "2022-02-25 19:13:03.860645"]]
80
+ TRANSACTION (0.7ms) commit transaction
81
+ TRANSACTION (0.1ms) begin transaction
40
82
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
41
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.616280"]]
42
- TRANSACTION (1.2ms) commit transaction
43
- Post Load (0.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
83
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:03.875638"]]
84
+ TRANSACTION (0.8ms) commit transaction
85
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
44
86
  Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
45
87
  Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
46
88
   (0.0ms) SELECT sqlite_version(*)
@@ -50,21 +92,21 @@ id: 1
50
92
  a: 1
51
93
  b: 3
52
94
  created_at: !ruby/object:ActiveSupport::TimeWithZone
53
- utc: &1 2021-08-19 23:28:07.601363000 Z
95
+ utc: &1 2022-02-25 19:13:03.860645000 Z
54
96
  zone: &2 !ruby/object:ActiveSupport::TimeZone
55
97
  name: Etc/UTC
56
- time: 2021-08-19 23:28:07.601363000 Z
98
+ time: 2022-02-25 19:13:03.860645000 Z
57
99
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
58
100
  utc: *1
59
101
  zone: *2
60
- time: 2021-08-19 23:28:07.601363000 Z
61
- ','2021-08-19 23:28:07.639023',NULL)
62
- TRANSACTION (0.8ms) commit transaction
102
+ time: 2022-02-25 19:13:03.860645000 Z
103
+ ','2022-02-25 19:13:03.893865',NULL)
104
+ TRANSACTION (0.7ms) commit transaction
63
105
  Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
64
106
  TRANSACTION (0.0ms) begin transaction
65
107
  ActiveSnapshot::Snapshot Exists? (0.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
66
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.643299"]]
67
- TRANSACTION (0.5ms) commit transaction
108
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:03.898486"]]
109
+ TRANSACTION (0.7ms) commit transaction
68
110
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
69
111
  Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
70
112
  Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
@@ -74,17 +116,52 @@ id: 1
74
116
  a: 2
75
117
  b: 4
76
118
  created_at: !ruby/object:ActiveSupport::TimeWithZone
77
- utc: &1 2021-08-19 23:28:07.601363000 Z
119
+ utc: &1 2022-02-25 19:13:03.860645000 Z
78
120
  zone: &2 !ruby/object:ActiveSupport::TimeZone
79
121
  name: Etc/UTC
80
- time: 2021-08-19 23:28:07.601363000 Z
122
+ time: 2022-02-25 19:13:03.860645000 Z
81
123
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
82
124
  utc: *1
83
125
  zone: *2
84
- time: 2021-08-19 23:28:07.601363000 Z
85
- ','2021-08-19 23:28:07.646425',NULL)
86
- TRANSACTION (0.8ms) commit transaction
126
+ time: 2022-02-25 19:13:03.860645000 Z
127
+ ','2022-02-25 19:13:03.902588',NULL)
128
+ TRANSACTION (0.6ms) commit transaction
87
129
  TRANSACTION (0.1ms) begin transaction
130
+ -----------------------------
131
+ SnapshotItemTest: test_object
132
+ -----------------------------
133
+ ActiveSnapshot::Snapshot Load (0.3ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
134
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
135
+ TRANSACTION (0.1ms) rollback transaction
136
+ TRANSACTION (0.0ms) begin transaction
137
+ ------------------------------------
138
+ SnapshotItemTest: test_restore_item!
139
+ ------------------------------------
140
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
141
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
142
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
143
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
144
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
145
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
146
+ TRANSACTION (0.3ms) rollback transaction
147
+ TRANSACTION (0.0ms) begin transaction
148
+ ----------------------------------
149
+ SnapshotItemTest: test_validations
150
+ ----------------------------------
151
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
152
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
153
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
154
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
155
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
156
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
157
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
158
+ TRANSACTION (0.0ms) rollback transaction
159
+ TRANSACTION (0.0ms) begin transaction
160
+ ------------------------------------
161
+ SnapshotItemTest: test_relationships
162
+ ------------------------------------
163
+ TRANSACTION (0.0ms) rollback transaction
164
+ TRANSACTION (0.0ms) begin transaction
88
165
  --------------------------------------------
89
166
  ActiveSnapshotTest: test_exposes_main_module
90
167
  --------------------------------------------
@@ -93,122 +170,194 @@ ActiveSnapshotTest: test_exposes_main_module
93
170
  ----------------------------------------
94
171
  ActiveSnapshotTest: test_exposes_version
95
172
  ----------------------------------------
96
- TRANSACTION (0.0ms) rollback transaction
173
+ TRANSACTION (0.1ms) rollback transaction
97
174
  TRANSACTION (0.0ms) begin transaction
98
175
  -------------------------------------------
99
176
  ActiveSnapshotTest: test_snapshot_lifecycle
100
177
  -------------------------------------------
101
178
  Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
102
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
103
- Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]]
179
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
180
+ Comment Create (0.4ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:13:03.964212"], ["updated_at", "2022-02-25 19:13:03.964212"]]
104
181
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
105
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
106
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
107
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
182
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
183
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
184
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
108
185
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
109
- ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.691182"]]
186
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:03.968271"]]
110
187
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
111
188
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
112
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
189
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
113
190
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
114
191
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
115
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
192
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
116
193
  id: 1
117
194
  a: 2
118
195
  b: 4
119
196
  created_at: !ruby/object:ActiveSupport::TimeWithZone
120
- utc: 2021-08-19 23:28:07.601363000 Z
197
+ utc: 2022-02-25 19:13:03.860645000 Z
121
198
  zone: &1 !ruby/object:ActiveSupport::TimeZone
122
199
  name: Etc/UTC
123
- time: 2021-08-19 23:28:07.601363000 Z
200
+ time: 2022-02-25 19:13:03.860645000 Z
124
201
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
125
- utc: 2021-08-19 23:28:07.601363000 Z
202
+ utc: 2022-02-25 19:13:03.860645000 Z
126
203
  zone: *1
127
- time: 2021-08-19 23:28:07.601363000 Z
128
- ','2021-08-19 23:28:07.694320',NULL),(NULL,3,'Comment',1,'---
204
+ time: 2022-02-25 19:13:03.860645000 Z
205
+ ','2022-02-25 19:13:03.972211',NULL),(NULL,3,'Comment',1,'---
129
206
  id: 1
130
207
  content: foo
131
208
  post_id: 1
132
209
  created_at: !ruby/object:ActiveSupport::TimeWithZone
133
- utc: 2021-08-19 23:28:07.688491000 Z
210
+ utc: 2022-02-25 19:13:03.964212000 Z
134
211
  zone: &1 !ruby/object:ActiveSupport::TimeZone
135
212
  name: Etc/UTC
136
- time: 2021-08-19 23:28:07.688491000 Z
213
+ time: 2022-02-25 19:13:03.964212000 Z
137
214
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
138
- utc: 2021-08-19 23:28:07.688491000 Z
215
+ utc: 2022-02-25 19:13:03.964212000 Z
139
216
  zone: *1
140
- time: 2021-08-19 23:28:07.688491000 Z
141
- ','2021-08-19 23:28:07.694320','comments')
217
+ time: 2022-02-25 19:13:03.964212000 Z
218
+ ','2022-02-25 19:13:03.972211','comments')
142
219
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
143
-  (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
144
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
145
- Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:07.695499"], ["id", 1]]
146
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:07.695924"], ["id", 1]]
220
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
221
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
222
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:13:03.973406"], ["id", 1]]
223
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:13:03.973883"], ["id", 1]]
147
224
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
148
225
  Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
149
226
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
150
227
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
151
- Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.696917"], ["updated_at", "2021-08-19 23:28:07.696917"]]
152
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
228
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:13:03.975029"], ["updated_at", "2022-02-25 19:13:03.975029"]]
229
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
153
230
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
154
- Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.697739"], ["updated_at", "2021-08-19 23:28:07.697739"]]
231
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:13:03.975912"], ["updated_at", "2022-02-25 19:13:03.975912"]]
155
232
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
156
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
157
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
233
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
234
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
158
235
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
159
236
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
160
237
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
161
238
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
162
- ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
239
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
163
240
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
164
241
  Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
165
242
  Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
166
243
  Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
167
- Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:28:07.601363"], ["id", 1]]
168
- Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:07.688491"], ["updated_at", "2021-08-19 23:28:07.688491"]]
244
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:13:03.860645"], ["id", 1]]
245
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:13:03.964212"], ["updated_at", "2022-02-25 19:13:03.964212"]]
169
246
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
170
-  (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
171
-  (0.1ms) SELECT COUNT(*) FROM "snapshots"
172
-  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
247
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
248
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
249
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
173
250
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
174
251
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
175
252
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
176
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
177
-  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
253
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
254
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
178
255
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
179
256
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
180
257
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
181
- TRANSACTION (0.3ms) rollback transaction
258
+ TRANSACTION (0.4ms) rollback transaction
259
+ TRANSACTION (0.0ms) begin transaction
260
+ --------------------------------
261
+ SnapshotTest: test_relationships
262
+ --------------------------------
263
+ TRANSACTION (0.0ms) rollback transaction
264
+ TRANSACTION (0.0ms) begin transaction
265
+ --------------------------------------
266
+ SnapshotTest: test_fetch_reified_items
267
+ --------------------------------------
268
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
269
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
270
+ TRANSACTION (0.0ms) rollback transaction
271
+ TRANSACTION (0.0ms) begin transaction
272
+ -----------------------------------------------------
273
+ SnapshotTest: test_fetch_reified_items_with_sti_class
274
+ -----------------------------------------------------
275
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
276
+ SubPost Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:13:03.995905"], ["updated_at", "2022-02-25 19:13:03.995905"]]
277
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
278
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
279
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:13:03.998326"], ["updated_at", "2022-02-25 19:13:03.998326"]]
280
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
281
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
282
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
283
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:04.000765"]]
284
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
285
+ SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
286
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
287
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
288
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
289
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
290
+ id: 2
291
+ a: 1
292
+ b: 2
293
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
294
+ utc: &1 2022-02-25 19:13:03.995905000 Z
295
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
296
+ name: Etc/UTC
297
+ time: 2022-02-25 19:13:03.995905000 Z
298
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
299
+ utc: *1
300
+ zone: *2
301
+ time: 2022-02-25 19:13:03.995905000 Z
302
+ ','2022-02-25 19:13:04.004888',NULL),(NULL,3,'Comment',1,'---
303
+ id: 1
304
+ content: Example comment
305
+ post_id: 2
306
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
307
+ utc: 2022-02-25 19:13:03.998326000 Z
308
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
309
+ name: Etc/UTC
310
+ time: 2022-02-25 19:13:03.998326000 Z
311
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
312
+ utc: 2022-02-25 19:13:03.998326000 Z
313
+ zone: *1
314
+ time: 2022-02-25 19:13:03.998326000 Z
315
+ ','2022-02-25 19:13:04.004888','comments')
316
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
317
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
318
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
319
+ TRANSACTION (0.4ms) rollback transaction
320
+ TRANSACTION (0.0ms) begin transaction
321
+ ---------------------------
322
+ SnapshotTest: test_metadata
323
+ ---------------------------
324
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
325
+ TRANSACTION (0.0ms) rollback transaction
326
+ TRANSACTION (0.0ms) begin transaction
327
+ --------------------------------------
328
+ SnapshotTest: test_build_snapshot_item
329
+ --------------------------------------
330
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
331
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
332
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
333
+ TRANSACTION (0.1ms) rollback transaction
182
334
  TRANSACTION (0.0ms) begin transaction
183
335
  --------------------------
184
336
  SnapshotTest: test_restore
185
337
  --------------------------
186
338
  ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
187
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
339
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
188
340
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
189
341
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
190
342
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
191
343
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
192
344
  ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
193
345
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
194
- Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
346
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
195
347
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
196
- TRANSACTION (0.3ms) rollback transaction
348
+ TRANSACTION (0.4ms) rollback transaction
197
349
  TRANSACTION (0.0ms) begin transaction
198
- --------------------------------------
199
- SnapshotTest: test_build_snapshot_item
200
- --------------------------------------
201
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
202
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
203
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
204
- TRANSACTION (0.0ms) rollback transaction
205
- TRANSACTION (0.1ms) begin transaction
206
- --------------------------------------
207
- SnapshotTest: test_fetch_reified_items
208
- --------------------------------------
209
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
210
- ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
211
- TRANSACTION (0.0ms) rollback transaction
350
+ ----------------------------------------------------------
351
+ SnapshotTest: test_single_model_snapshots_without_children
352
+ ----------------------------------------------------------
353
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
354
+ ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:13:04.021808"], ["updated_at", "2022-02-25 19:13:04.021808"]]
355
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
356
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
357
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
358
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:04.024515"]]
359
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
360
+ TRANSACTION (0.4ms) rollback transaction
212
361
  TRANSACTION (0.0ms) begin transaction
213
362
  ------------------------------
214
363
  SnapshotTest: test_validations
@@ -219,56 +368,12 @@ SnapshotTest: test_validations
219
368
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
220
369
  TRANSACTION (0.0ms) rollback transaction
221
370
  TRANSACTION (0.0ms) begin transaction
222
- ---------------------------
223
- SnapshotTest: test_metadata
224
- ---------------------------
225
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
226
- TRANSACTION (0.0ms) rollback transaction
227
- TRANSACTION (0.0ms) begin transaction
228
- --------------------------------
229
- SnapshotTest: test_relationships
230
- --------------------------------
231
- TRANSACTION (0.0ms) rollback transaction
232
- TRANSACTION (0.0ms) begin transaction
233
- ------------------------------------
234
- SnapshotItemTest: test_relationships
235
- ------------------------------------
236
- TRANSACTION (0.0ms) rollback transaction
237
- TRANSACTION (0.0ms) begin transaction
238
- ----------------------------------
239
- SnapshotItemTest: test_validations
240
- ----------------------------------
241
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
242
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
243
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
244
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
245
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
246
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
247
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
248
- TRANSACTION (0.0ms) rollback transaction
249
- TRANSACTION (0.0ms) begin transaction
250
- -----------------------------
251
- SnapshotItemTest: test_object
252
- -----------------------------
253
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
254
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
255
- TRANSACTION (0.0ms) rollback transaction
256
- TRANSACTION (0.0ms) begin transaction
257
- ------------------------------------
258
- SnapshotItemTest: test_restore_item!
259
- ------------------------------------
260
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
261
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
262
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
263
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
264
- Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
265
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
266
- TRANSACTION (0.6ms) rollback transaction
267
- TRANSACTION (0.0ms) begin transaction
268
371
  ------------------------------------------------
269
372
  SnapshotsConcernTest: test_has_snapshot_children
270
373
  ------------------------------------------------
271
- TRANSACTION (0.1ms) rollback transaction
374
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
375
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
376
+ TRANSACTION (0.0ms) rollback transaction
272
377
  TRANSACTION (0.0ms) begin transaction
273
378
  ----------------------------------------
274
379
  SnapshotsConcernTest: test_relationships
@@ -279,9 +384,9 @@ SnapshotsConcernTest: test_relationships
279
384
  SnapshotsConcernTest: test_create_snapshot!
280
385
  -------------------------------------------
281
386
  Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
282
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
387
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
283
388
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
284
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:28:07.754325"]]
389
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:13:04.040908"]]
285
390
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
286
391
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
287
392
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
@@ -292,21 +397,21 @@ id: 1
292
397
  a: 2
293
398
  b: 4
294
399
  created_at: !ruby/object:ActiveSupport::TimeWithZone
295
- utc: 2021-08-19 23:28:07.601363000 Z
400
+ utc: 2022-02-25 19:13:03.860645000 Z
296
401
  zone: &1 !ruby/object:ActiveSupport::TimeZone
297
402
  name: Etc/UTC
298
- time: 2021-08-19 23:28:07.601363000 Z
403
+ time: 2022-02-25 19:13:03.860645000 Z
299
404
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
300
- utc: 2021-08-19 23:28:07.601363000 Z
405
+ utc: 2022-02-25 19:13:03.860645000 Z
301
406
  zone: *1
302
- time: 2021-08-19 23:28:07.601363000 Z
303
- ','2021-08-19 23:28:07.757455',NULL)
407
+ time: 2022-02-25 19:13:03.860645000 Z
408
+ ','2022-02-25 19:13:04.043969',NULL)
304
409
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
305
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
410
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
306
411
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
307
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.759398"]]
412
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:04.057459"]]
308
413
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
309
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
414
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
310
415
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
311
416
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
312
417
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
@@ -315,21 +420,21 @@ id: 1
315
420
  a: 2
316
421
  b: 4
317
422
  created_at: !ruby/object:ActiveSupport::TimeWithZone
318
- utc: 2021-08-19 23:28:07.601363000 Z
423
+ utc: 2022-02-25 19:13:03.860645000 Z
319
424
  zone: &1 !ruby/object:ActiveSupport::TimeZone
320
425
  name: Etc/UTC
321
- time: 2021-08-19 23:28:07.601363000 Z
426
+ time: 2022-02-25 19:13:03.860645000 Z
322
427
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
323
- utc: 2021-08-19 23:28:07.601363000 Z
428
+ utc: 2022-02-25 19:13:03.860645000 Z
324
429
  zone: *1
325
- time: 2021-08-19 23:28:07.601363000 Z
326
- ','2021-08-19 23:28:07.762080',NULL)
327
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
328
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
430
+ time: 2022-02-25 19:13:03.860645000 Z
431
+ ','2022-02-25 19:13:04.060607',NULL)
432
+ TRANSACTION (0.4ms) RELEASE SAVEPOINT active_record_1
433
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
329
434
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
330
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:07.764341"]]
435
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:13:04.063001"]]
331
436
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
332
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
437
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
333
438
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
334
439
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
335
440
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
@@ -338,233 +443,2414 @@ id: 1
338
443
  a: 2
339
444
  b: 4
340
445
  created_at: !ruby/object:ActiveSupport::TimeWithZone
341
- utc: 2021-08-19 23:28:07.601363000 Z
446
+ utc: 2022-02-25 19:13:03.860645000 Z
342
447
  zone: &1 !ruby/object:ActiveSupport::TimeZone
343
448
  name: Etc/UTC
344
- time: 2021-08-19 23:28:07.601363000 Z
449
+ time: 2022-02-25 19:13:03.860645000 Z
345
450
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
346
- utc: 2021-08-19 23:28:07.601363000 Z
451
+ utc: 2022-02-25 19:13:03.860645000 Z
347
452
  zone: *1
348
- time: 2021-08-19 23:28:07.601363000 Z
349
- ','2021-08-19 23:28:07.767417',NULL)
453
+ time: 2022-02-25 19:13:03.860645000 Z
454
+ ','2022-02-25 19:13:04.066440',NULL)
350
455
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
351
456
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
352
457
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
353
458
  TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
354
- TRANSACTION (0.3ms) rollback transaction
459
+ TRANSACTION (0.5ms) rollback transaction
355
460
  TRANSACTION (0.0ms) begin transaction
356
461
  -----------------------------------------------
357
462
  InstallGeneratorTest: test_should_add_migration
358
463
  -----------------------------------------------
359
- TRANSACTION (0.0ms) rollback transaction
360
-  (1.5ms) SELECT sqlite_version(*)
361
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
362
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
464
+ TRANSACTION (0.1ms) rollback transaction
465
+  (1.1ms) SELECT sqlite_version(*)
466
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
467
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
363
468
  ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
364
-  (1.9ms) DELETE FROM posts;
365
-  (1.4ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
366
-  (1.2ms) DELETE FROM snapshots;
367
-  (1.1ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
368
-  (1.0ms) DELETE FROM snapshot_items;
369
-  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
469
+  (6.6ms) DELETE FROM posts;
470
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
471
+  (0.8ms) DELETE FROM snapshots;
472
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
473
+  (0.9ms) DELETE FROM snapshot_items;
474
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
370
475
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
371
476
  TRANSACTION (0.0ms) begin transaction
372
- Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:28:46.603059"], ["updated_at", "2021-08-19 23:28:46.603059"]]
373
- TRANSACTION (0.8ms) commit transaction
477
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:15:25.078053"], ["updated_at", "2022-02-25 19:15:25.078053"]]
478
+ TRANSACTION (0.7ms) commit transaction
374
479
  TRANSACTION (0.0ms) begin transaction
375
480
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
376
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.616208"]]
377
- TRANSACTION (0.8ms) commit transaction
481
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.092481"]]
482
+ TRANSACTION (0.7ms) commit transaction
378
483
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
379
484
  Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
380
485
  Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
381
486
   (0.0ms) SELECT sqlite_version(*)
382
487
  TRANSACTION (0.0ms) begin transaction
383
- ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
488
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
384
489
  id: 1
385
490
  a: 1
386
491
  b: 3
387
492
  created_at: !ruby/object:ActiveSupport::TimeWithZone
388
- utc: &1 2021-08-19 23:28:46.603059000 Z
493
+ utc: &1 2022-02-25 19:15:25.078053000 Z
389
494
  zone: &2 !ruby/object:ActiveSupport::TimeZone
390
495
  name: Etc/UTC
391
- time: 2021-08-19 23:28:46.603059000 Z
496
+ time: 2022-02-25 19:15:25.078053000 Z
392
497
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
393
498
  utc: *1
394
499
  zone: *2
395
- time: 2021-08-19 23:28:46.603059000 Z
396
- ','2021-08-19 23:28:46.631882',NULL)
397
- TRANSACTION (0.6ms) commit transaction
398
- Post Update (0.7ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
500
+ time: 2022-02-25 19:15:25.078053000 Z
501
+ ','2022-02-25 19:15:25.111188',NULL)
502
+ TRANSACTION (0.7ms) commit transaction
503
+ Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
399
504
  TRANSACTION (0.0ms) begin transaction
400
505
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
401
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.635496"]]
402
- TRANSACTION (0.6ms) commit transaction
506
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.115568"]]
507
+ TRANSACTION (0.7ms) commit transaction
403
508
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
404
509
  Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
405
- Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
510
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
406
511
  TRANSACTION (0.0ms) begin transaction
407
512
  ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
408
513
  id: 1
409
514
  a: 2
410
515
  b: 4
411
516
  created_at: !ruby/object:ActiveSupport::TimeWithZone
412
- utc: &1 2021-08-19 23:28:46.603059000 Z
517
+ utc: &1 2022-02-25 19:15:25.078053000 Z
413
518
  zone: &2 !ruby/object:ActiveSupport::TimeZone
414
519
  name: Etc/UTC
415
- time: 2021-08-19 23:28:46.603059000 Z
520
+ time: 2022-02-25 19:15:25.078053000 Z
416
521
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
417
522
  utc: *1
418
523
  zone: *2
419
- time: 2021-08-19 23:28:46.603059000 Z
420
- ','2021-08-19 23:28:46.638687',NULL)
421
- TRANSACTION (0.5ms) commit transaction
422
- TRANSACTION (0.0ms) begin transaction
423
- ----------------------------------------
424
- ActiveSnapshotTest: test_exposes_version
425
- ----------------------------------------
426
- TRANSACTION (0.0ms) rollback transaction
427
- TRANSACTION (0.0ms) begin transaction
524
+ time: 2022-02-25 19:15:25.078053000 Z
525
+ ','2022-02-25 19:15:25.119373',NULL)
526
+ TRANSACTION (0.6ms) commit transaction
527
+ TRANSACTION (0.1ms) begin transaction
428
528
  -------------------------------------------
429
- ActiveSnapshotTest: test_snapshot_lifecycle
529
+ SnapshotsConcernTest: test_create_snapshot!
430
530
  -------------------------------------------
431
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
432
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
433
- Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]]
531
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
532
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
533
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
534
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:15:25.153158"]]
434
535
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
435
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
436
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
536
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
537
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
538
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
539
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
540
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
541
+ id: 1
542
+ a: 2
543
+ b: 4
544
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
545
+ utc: 2022-02-25 19:15:25.078053000 Z
546
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
547
+ name: Etc/UTC
548
+ time: 2022-02-25 19:15:25.078053000 Z
549
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
550
+ utc: 2022-02-25 19:15:25.078053000 Z
551
+ zone: *1
552
+ time: 2022-02-25 19:15:25.078053000 Z
553
+ ','2022-02-25 19:15:25.156246',NULL)
554
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
555
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
556
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
557
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.157969"]]
558
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
559
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
560
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
561
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
562
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
563
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
564
+ id: 1
565
+ a: 2
566
+ b: 4
567
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
568
+ utc: 2022-02-25 19:15:25.078053000 Z
569
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
570
+ name: Etc/UTC
571
+ time: 2022-02-25 19:15:25.078053000 Z
572
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
573
+ utc: 2022-02-25 19:15:25.078053000 Z
574
+ zone: *1
575
+ time: 2022-02-25 19:15:25.078053000 Z
576
+ ','2022-02-25 19:15:25.160211',NULL)
577
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
578
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
579
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
580
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.161627"]]
581
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
582
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
583
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
584
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
585
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
586
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
587
+ id: 1
588
+ a: 2
589
+ b: 4
590
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
591
+ utc: 2022-02-25 19:15:25.078053000 Z
592
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
593
+ name: Etc/UTC
594
+ time: 2022-02-25 19:15:25.078053000 Z
595
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
596
+ utc: 2022-02-25 19:15:25.078053000 Z
597
+ zone: *1
598
+ time: 2022-02-25 19:15:25.078053000 Z
599
+ ','2022-02-25 19:15:25.163956',NULL)
600
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
601
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
602
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
603
+ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
604
+ TRANSACTION (0.4ms) rollback transaction
605
+ TRANSACTION (0.0ms) begin transaction
606
+ ----------------------------------------
607
+ SnapshotsConcernTest: test_relationships
608
+ ----------------------------------------
609
+ TRANSACTION (0.1ms) rollback transaction
610
+ TRANSACTION (0.0ms) begin transaction
611
+ ------------------------------------------------
612
+ SnapshotsConcernTest: test_has_snapshot_children
613
+ ------------------------------------------------
614
+ TRANSACTION (0.1ms) rollback transaction
615
+ TRANSACTION (0.0ms) begin transaction
616
+ -----------------------------
617
+ SnapshotItemTest: test_object
618
+ -----------------------------
619
+ ActiveSnapshot::Snapshot Load (0.3ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
620
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
621
+ TRANSACTION (0.0ms) rollback transaction
622
+ TRANSACTION (0.0ms) begin transaction
623
+ ------------------------------------
624
+ SnapshotItemTest: test_relationships
625
+ ------------------------------------
626
+ TRANSACTION (0.0ms) rollback transaction
627
+ TRANSACTION (0.0ms) begin transaction
628
+ ----------------------------------
629
+ SnapshotItemTest: test_validations
630
+ ----------------------------------
631
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
632
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
633
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
634
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
635
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
636
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
637
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
638
+ TRANSACTION (0.0ms) rollback transaction
639
+ TRANSACTION (0.0ms) begin transaction
640
+ ------------------------------------
641
+ SnapshotItemTest: test_restore_item!
642
+ ------------------------------------
643
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
644
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
645
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
646
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
647
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
648
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
649
+ TRANSACTION (0.4ms) rollback transaction
650
+ TRANSACTION (0.0ms) begin transaction
651
+ -----------------------------------------------------
652
+ SnapshotTest: test_fetch_reified_items_with_sti_class
653
+ -----------------------------------------------------
654
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
655
+ SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:15:25.194468"], ["updated_at", "2022-02-25 19:15:25.194468"]]
656
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
657
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
658
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:15:25.198294"], ["updated_at", "2022-02-25 19:15:25.198294"]]
659
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
660
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
661
+ ActiveSnapshot::Snapshot Exists? (0.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
662
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.200794"]]
663
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
664
+ SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
665
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
666
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
667
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
668
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
669
+ id: 2
670
+ a: 1
671
+ b: 2
672
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
673
+ utc: &1 2022-02-25 19:15:25.194468000 Z
674
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
675
+ name: Etc/UTC
676
+ time: 2022-02-25 19:15:25.194468000 Z
677
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
678
+ utc: *1
679
+ zone: *2
680
+ time: 2022-02-25 19:15:25.194468000 Z
681
+ ','2022-02-25 19:15:25.205518',NULL),(NULL,3,'Comment',1,'---
682
+ id: 1
683
+ content: Example comment
684
+ post_id: 2
685
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
686
+ utc: 2022-02-25 19:15:25.198294000 Z
687
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
688
+ name: Etc/UTC
689
+ time: 2022-02-25 19:15:25.198294000 Z
690
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
691
+ utc: 2022-02-25 19:15:25.198294000 Z
692
+ zone: *1
693
+ time: 2022-02-25 19:15:25.198294000 Z
694
+ ','2022-02-25 19:15:25.205518','comments')
695
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
696
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
697
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
698
+ TRANSACTION (0.5ms) rollback transaction
699
+ TRANSACTION (0.1ms) begin transaction
700
+ ----------------------------------------------------------
701
+ SnapshotTest: test_single_model_snapshots_without_children
702
+ ----------------------------------------------------------
703
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
704
+ ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:15:25.213227"], ["updated_at", "2022-02-25 19:15:25.213227"]]
705
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
706
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
707
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
708
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.216071"]]
709
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
710
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
711
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'ParentWithoutChildren',2,'---
712
+ id: 2
713
+ a: 1
714
+ b: 2
715
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
716
+ utc: &1 2022-02-25 19:15:25.213227000 Z
717
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
718
+ name: Etc/UTC
719
+ time: 2022-02-25 19:15:25.213227000 Z
720
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
721
+ utc: *1
722
+ zone: *2
723
+ time: 2022-02-25 19:15:25.213227000 Z
724
+ ','2022-02-25 19:15:25.217553',NULL)
725
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
726
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
727
+ ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:15:25.218410"], ["id", 2]]
728
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
729
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
730
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
731
+ TRANSACTION (0.4ms) rollback transaction
732
+ TRANSACTION (0.0ms) begin transaction
733
+ --------------------------------------
734
+ SnapshotTest: test_build_snapshot_item
735
+ --------------------------------------
736
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
737
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
738
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
739
+ TRANSACTION (0.0ms) rollback transaction
740
+ TRANSACTION (0.0ms) begin transaction
741
+ ---------------------------
742
+ SnapshotTest: test_metadata
743
+ ---------------------------
744
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
745
+ TRANSACTION (0.1ms) rollback transaction
746
+ TRANSACTION (0.0ms) begin transaction
747
+ --------------------------
748
+ SnapshotTest: test_restore
749
+ --------------------------
750
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
751
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
752
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
753
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
754
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
755
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
756
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
757
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
758
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
759
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
760
+ TRANSACTION (0.3ms) rollback transaction
761
+ TRANSACTION (0.0ms) begin transaction
762
+ ------------------------------
763
+ SnapshotTest: test_validations
764
+ ------------------------------
765
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
766
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
767
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
768
+ ActiveSnapshot::Snapshot Exists? (0.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
769
+ TRANSACTION (0.0ms) rollback transaction
770
+ TRANSACTION (0.0ms) begin transaction
771
+ --------------------------------------
772
+ SnapshotTest: test_fetch_reified_items
773
+ --------------------------------------
774
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
775
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
776
+ TRANSACTION (0.0ms) rollback transaction
777
+ TRANSACTION (0.0ms) begin transaction
778
+ --------------------------------
779
+ SnapshotTest: test_relationships
780
+ --------------------------------
781
+ TRANSACTION (0.0ms) rollback transaction
782
+ TRANSACTION (0.0ms) begin transaction
783
+ -----------------------------------------------
784
+ InstallGeneratorTest: test_should_add_migration
785
+ -----------------------------------------------
786
+ TRANSACTION (0.1ms) rollback transaction
787
+ TRANSACTION (0.0ms) begin transaction
788
+ --------------------------------------------
789
+ ActiveSnapshotTest: test_exposes_main_module
790
+ --------------------------------------------
791
+ TRANSACTION (0.0ms) rollback transaction
792
+ TRANSACTION (0.0ms) begin transaction
793
+ -------------------------------------------
794
+ ActiveSnapshotTest: test_snapshot_lifecycle
795
+ -------------------------------------------
796
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
797
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
798
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:15:25.250285"], ["updated_at", "2022-02-25 19:15:25.250285"]]
799
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
800
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
801
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
802
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
803
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
804
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:15:25.254114"]]
805
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
806
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
807
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
808
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
809
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
810
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
811
+ id: 1
812
+ a: 2
813
+ b: 4
814
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
815
+ utc: 2022-02-25 19:15:25.078053000 Z
816
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
817
+ name: Etc/UTC
818
+ time: 2022-02-25 19:15:25.078053000 Z
819
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
820
+ utc: 2022-02-25 19:15:25.078053000 Z
821
+ zone: *1
822
+ time: 2022-02-25 19:15:25.078053000 Z
823
+ ','2022-02-25 19:15:25.258085',NULL),(NULL,3,'Comment',1,'---
824
+ id: 1
825
+ content: foo
826
+ post_id: 1
827
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
828
+ utc: 2022-02-25 19:15:25.250285000 Z
829
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
830
+ name: Etc/UTC
831
+ time: 2022-02-25 19:15:25.250285000 Z
832
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
833
+ utc: 2022-02-25 19:15:25.250285000 Z
834
+ zone: *1
835
+ time: 2022-02-25 19:15:25.250285000 Z
836
+ ','2022-02-25 19:15:25.258085','comments')
837
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
838
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
839
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
840
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:15:25.269725"], ["id", 1]]
841
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:15:25.270370"], ["id", 1]]
842
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
843
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
844
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
845
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
846
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:15:25.271722"], ["updated_at", "2022-02-25 19:15:25.271722"]]
847
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
848
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
849
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:15:25.273014"], ["updated_at", "2022-02-25 19:15:25.273014"]]
850
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
851
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
852
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
853
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
854
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
855
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
856
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
857
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
858
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
859
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
860
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
861
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
862
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:15:25.078053"], ["id", 1]]
863
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:15:25.250285"], ["updated_at", "2022-02-25 19:15:25.250285"]]
864
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
865
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
866
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
867
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
868
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
869
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
870
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
871
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
872
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
873
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
874
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
875
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
876
+ TRANSACTION (108.7ms) rollback transaction
877
+ TRANSACTION (0.1ms) begin transaction
878
+ ----------------------------------------
879
+ ActiveSnapshotTest: test_exposes_version
880
+ ----------------------------------------
881
+ TRANSACTION (0.0ms) rollback transaction
882
+  (1.0ms) SELECT sqlite_version(*)
883
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
884
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
885
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
886
+  (6.5ms) DELETE FROM posts;
887
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
888
+  (0.8ms) DELETE FROM snapshots;
889
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
890
+  (0.9ms) DELETE FROM snapshot_items;
891
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
892
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
893
+ TRANSACTION (0.3ms) begin transaction
894
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:16:53.817957"], ["updated_at", "2022-02-25 19:16:53.817957"]]
895
+ TRANSACTION (0.6ms) commit transaction
896
+ TRANSACTION (0.0ms) begin transaction
897
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
898
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.832548"]]
899
+ TRANSACTION (0.7ms) commit transaction
900
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
901
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
902
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
903
+  (0.0ms) SELECT sqlite_version(*)
904
+ TRANSACTION (0.0ms) begin transaction
905
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
906
+ id: 1
907
+ a: 1
908
+ b: 3
909
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
910
+ utc: &1 2022-02-25 19:16:53.817957000 Z
911
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
912
+ name: Etc/UTC
913
+ time: 2022-02-25 19:16:53.817957000 Z
914
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
915
+ utc: *1
916
+ zone: *2
917
+ time: 2022-02-25 19:16:53.817957000 Z
918
+ ','2022-02-25 19:16:53.851096',NULL)
919
+ TRANSACTION (0.7ms) commit transaction
920
+ Post Update (0.7ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
921
+ TRANSACTION (0.0ms) begin transaction
922
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
923
+ ActiveSnapshot::Snapshot Create (0.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.855336"]]
924
+ TRANSACTION (0.7ms) commit transaction
925
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
926
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
927
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
928
+ TRANSACTION (0.0ms) begin transaction
929
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
930
+ id: 1
931
+ a: 2
932
+ b: 4
933
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
934
+ utc: &1 2022-02-25 19:16:53.817957000 Z
935
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
936
+ name: Etc/UTC
937
+ time: 2022-02-25 19:16:53.817957000 Z
938
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
939
+ utc: *1
940
+ zone: *2
941
+ time: 2022-02-25 19:16:53.817957000 Z
942
+ ','2022-02-25 19:16:53.859488',NULL)
943
+ TRANSACTION (0.7ms) commit transaction
944
+ TRANSACTION (0.1ms) begin transaction
945
+ --------------------------------
946
+ SnapshotTest: test_relationships
947
+ --------------------------------
948
+ TRANSACTION (0.1ms) rollback transaction
949
+ TRANSACTION (0.1ms) begin transaction
950
+ --------------------------------------
951
+ SnapshotTest: test_fetch_reified_items
952
+ --------------------------------------
953
+ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
954
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
955
+ TRANSACTION (0.0ms) rollback transaction
956
+ TRANSACTION (0.0ms) begin transaction
957
+ -----------------------------------------------------
958
+ SnapshotTest: test_fetch_reified_items_with_sti_class
959
+ -----------------------------------------------------
960
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
961
+ SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:16:53.899474"], ["updated_at", "2022-02-25 19:16:53.899474"]]
962
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
963
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
964
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:16:53.902868"], ["updated_at", "2022-02-25 19:16:53.902868"]]
965
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
966
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
967
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
968
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.904842"]]
969
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
970
+ SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
971
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
972
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
973
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
974
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
975
+ id: 2
976
+ a: 1
977
+ b: 2
978
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
979
+ utc: &1 2022-02-25 19:16:53.899474000 Z
980
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
981
+ name: Etc/UTC
982
+ time: 2022-02-25 19:16:53.899474000 Z
983
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
984
+ utc: *1
985
+ zone: *2
986
+ time: 2022-02-25 19:16:53.899474000 Z
987
+ ','2022-02-25 19:16:53.908424',NULL),(NULL,3,'Comment',1,'---
988
+ id: 1
989
+ content: Example comment
990
+ post_id: 2
991
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
992
+ utc: 2022-02-25 19:16:53.902868000 Z
993
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
994
+ name: Etc/UTC
995
+ time: 2022-02-25 19:16:53.902868000 Z
996
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
997
+ utc: 2022-02-25 19:16:53.902868000 Z
998
+ zone: *1
999
+ time: 2022-02-25 19:16:53.902868000 Z
1000
+ ','2022-02-25 19:16:53.908424','comments')
1001
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1002
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
1003
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1004
+ TRANSACTION (0.5ms) rollback transaction
1005
+ TRANSACTION (0.0ms) begin transaction
1006
+ ----------------------------------------------------------
1007
+ SnapshotTest: test_single_model_snapshots_without_children
1008
+ ----------------------------------------------------------
1009
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1010
+ ParentWithoutChildren Create (0.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:16:53.915861"], ["updated_at", "2022-02-25 19:16:53.915861"]]
1011
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1012
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1013
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
1014
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:16:53.919313"]]
1015
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1016
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1017
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'ParentWithoutChildren',2,'---
1018
+ id: 2
1019
+ a: 1
1020
+ b: 2
1021
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1022
+ utc: &1 2022-02-25 19:16:53.915861000 Z
1023
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1024
+ name: Etc/UTC
1025
+ time: 2022-02-25 19:16:53.915861000 Z
1026
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1027
+ utc: *1
1028
+ zone: *2
1029
+ time: 2022-02-25 19:16:53.915861000 Z
1030
+ ','2022-02-25 19:16:53.920892',NULL)
1031
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1032
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1033
+ ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:16:53.921931"], ["id", 2]]
1034
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1035
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
1036
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1037
+ TRANSACTION (0.4ms) rollback transaction
1038
+ TRANSACTION (0.1ms) begin transaction
1039
+ --------------------------------------
1040
+ SnapshotTest: test_build_snapshot_item
1041
+ --------------------------------------
1042
+ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1043
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1044
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1045
+ TRANSACTION (0.0ms) rollback transaction
1046
+ TRANSACTION (0.0ms) begin transaction
1047
+ --------------------------
1048
+ SnapshotTest: test_restore
1049
+ --------------------------
1050
+ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1051
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1052
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1053
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1054
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1055
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1056
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1057
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1058
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1059
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1060
+ TRANSACTION (0.3ms) rollback transaction
1061
+ TRANSACTION (0.1ms) begin transaction
1062
+ ------------------------------
1063
+ SnapshotTest: test_validations
1064
+ ------------------------------
1065
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1066
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1067
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1068
+ ActiveSnapshot::Snapshot Exists? (0.2ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1069
+ TRANSACTION (0.0ms) rollback transaction
1070
+ TRANSACTION (0.0ms) begin transaction
1071
+ ---------------------------
1072
+ SnapshotTest: test_metadata
1073
+ ---------------------------
1074
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1075
+ TRANSACTION (0.0ms) rollback transaction
1076
+ TRANSACTION (0.0ms) begin transaction
1077
+ ------------------------------------------------
1078
+ SnapshotsConcernTest: test_has_snapshot_children
1079
+ ------------------------------------------------
1080
+ TRANSACTION (0.0ms) rollback transaction
1081
+ TRANSACTION (0.0ms) begin transaction
1082
+ -------------------------------------------
1083
+ SnapshotsConcernTest: test_create_snapshot!
1084
+ -------------------------------------------
1085
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1086
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1087
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1088
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:17:11.237904"]]
1089
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1090
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1091
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1092
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1093
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1094
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1095
+ id: 1
1096
+ a: 2
1097
+ b: 4
1098
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1099
+ utc: 2022-02-25 19:16:53.817957000 Z
1100
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1101
+ name: Etc/UTC
1102
+ time: 2022-02-25 19:16:53.817957000 Z
1103
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1104
+ utc: 2022-02-25 19:16:53.817957000 Z
1105
+ zone: *1
1106
+ time: 2022-02-25 19:16:53.817957000 Z
1107
+ ','2022-02-25 19:17:11.241539',NULL)
1108
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1109
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1110
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1111
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:17:11.244057"]]
1112
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1113
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1114
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1115
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1116
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1117
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
1118
+ id: 1
1119
+ a: 2
1120
+ b: 4
1121
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1122
+ utc: 2022-02-25 19:16:53.817957000 Z
1123
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1124
+ name: Etc/UTC
1125
+ time: 2022-02-25 19:16:53.817957000 Z
1126
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1127
+ utc: 2022-02-25 19:16:53.817957000 Z
1128
+ zone: *1
1129
+ time: 2022-02-25 19:16:53.817957000 Z
1130
+ ','2022-02-25 19:17:11.247382',NULL)
1131
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
1132
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1133
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1134
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:17:11.250501"]]
1135
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1136
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1137
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1138
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1139
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1140
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
1141
+ id: 1
1142
+ a: 2
1143
+ b: 4
1144
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1145
+ utc: 2022-02-25 19:16:53.817957000 Z
1146
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1147
+ name: Etc/UTC
1148
+ time: 2022-02-25 19:16:53.817957000 Z
1149
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1150
+ utc: 2022-02-25 19:16:53.817957000 Z
1151
+ zone: *1
1152
+ time: 2022-02-25 19:16:53.817957000 Z
1153
+ ','2022-02-25 19:17:11.254169',NULL)
1154
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1155
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1156
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1157
+ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1158
+ TRANSACTION (0.3ms) rollback transaction
1159
+ TRANSACTION (0.0ms) begin transaction
1160
+ ----------------------------------------
1161
+ SnapshotsConcernTest: test_relationships
1162
+ ----------------------------------------
1163
+ TRANSACTION (0.0ms) rollback transaction
1164
+ TRANSACTION (0.0ms) begin transaction
1165
+ ------------------------------------
1166
+ SnapshotItemTest: test_restore_item!
1167
+ ------------------------------------
1168
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1169
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1170
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1171
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1172
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1173
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1174
+ TRANSACTION (0.4ms) rollback transaction
1175
+ TRANSACTION (0.1ms) begin transaction
1176
+ -----------------------------
1177
+ SnapshotItemTest: test_object
1178
+ -----------------------------
1179
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1180
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1181
+ TRANSACTION (0.0ms) rollback transaction
1182
+ TRANSACTION (0.1ms) begin transaction
1183
+ ------------------------------------
1184
+ SnapshotItemTest: test_relationships
1185
+ ------------------------------------
1186
+ TRANSACTION (0.0ms) rollback transaction
1187
+ TRANSACTION (0.0ms) begin transaction
1188
+ ----------------------------------
1189
+ SnapshotItemTest: test_validations
1190
+ ----------------------------------
1191
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1192
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
1193
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1194
+ ActiveSnapshot::SnapshotItem Exists? (0.2ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1195
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1196
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
1197
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1198
+ TRANSACTION (0.0ms) rollback transaction
1199
+ TRANSACTION (0.0ms) begin transaction
1200
+ -----------------------------------------------
1201
+ InstallGeneratorTest: test_should_add_migration
1202
+ -----------------------------------------------
1203
+ TRANSACTION (0.1ms) rollback transaction
1204
+ TRANSACTION (0.0ms) begin transaction
1205
+ --------------------------------------------
1206
+ ActiveSnapshotTest: test_exposes_main_module
1207
+ --------------------------------------------
1208
+ TRANSACTION (0.0ms) rollback transaction
1209
+ TRANSACTION (0.0ms) begin transaction
1210
+ ----------------------------------------
1211
+ ActiveSnapshotTest: test_exposes_version
1212
+ ----------------------------------------
1213
+ TRANSACTION (0.0ms) rollback transaction
1214
+ TRANSACTION (0.0ms) begin transaction
1215
+ -------------------------------------------
1216
+ ActiveSnapshotTest: test_snapshot_lifecycle
1217
+ -------------------------------------------
1218
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1219
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1220
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:17:11.285298"], ["updated_at", "2022-02-25 19:17:11.285298"]]
1221
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1222
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
1223
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1224
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1225
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1226
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:17:11.288619"]]
1227
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1228
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1229
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1230
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1231
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1232
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1233
+ id: 1
1234
+ a: 2
1235
+ b: 4
1236
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1237
+ utc: 2022-02-25 19:16:53.817957000 Z
1238
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1239
+ name: Etc/UTC
1240
+ time: 2022-02-25 19:16:53.817957000 Z
1241
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1242
+ utc: 2022-02-25 19:16:53.817957000 Z
1243
+ zone: *1
1244
+ time: 2022-02-25 19:16:53.817957000 Z
1245
+ ','2022-02-25 19:17:11.291952',NULL),(NULL,3,'Comment',1,'---
1246
+ id: 1
1247
+ content: foo
1248
+ post_id: 1
1249
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1250
+ utc: 2022-02-25 19:17:11.285298000 Z
1251
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1252
+ name: Etc/UTC
1253
+ time: 2022-02-25 19:17:11.285298000 Z
1254
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1255
+ utc: 2022-02-25 19:17:11.285298000 Z
1256
+ zone: *1
1257
+ time: 2022-02-25 19:17:11.285298000 Z
1258
+ ','2022-02-25 19:17:11.291952','comments')
1259
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1260
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1261
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
1262
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:17:11.293152"], ["id", 1]]
1263
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:17:11.293750"], ["id", 1]]
1264
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1265
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1266
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1267
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1268
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:17:11.295547"], ["updated_at", "2022-02-25 19:17:11.295547"]]
1269
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1270
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1271
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:17:11.296717"], ["updated_at", "2022-02-25 19:17:11.296717"]]
1272
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1273
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
1274
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1275
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1276
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1277
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1278
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1279
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1280
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1281
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1282
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
1283
+ Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
1284
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:16:53.817957"], ["id", 1]]
1285
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:17:11.285298"], ["updated_at", "2022-02-25 19:17:11.285298"]]
1286
+ TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1
1287
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1288
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
1289
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
1290
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1291
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1292
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1293
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1294
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1295
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1296
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1297
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1298
+ TRANSACTION (0.4ms) rollback transaction
1299
+  (1.0ms) SELECT sqlite_version(*)
1300
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1301
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1302
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
1303
+  (6.5ms) DELETE FROM posts;
1304
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
1305
+  (0.8ms) DELETE FROM snapshots;
1306
+  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
1307
+  (1.0ms) DELETE FROM snapshot_items;
1308
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
1309
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
1310
+ TRANSACTION (0.0ms) begin transaction
1311
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:18:38.895863"], ["updated_at", "2022-02-25 19:18:38.895863"]]
1312
+ TRANSACTION (0.6ms) commit transaction
1313
+ TRANSACTION (0.1ms) begin transaction
1314
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1315
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:38.910682"]]
1316
+ TRANSACTION (0.8ms) commit transaction
1317
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1318
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1319
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1320
+  (0.0ms) SELECT sqlite_version(*)
1321
+ TRANSACTION (0.0ms) begin transaction
1322
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
1323
+ id: 1
1324
+ a: 1
1325
+ b: 3
1326
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1327
+ utc: &1 2022-02-25 19:18:38.895863000 Z
1328
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1329
+ name: Etc/UTC
1330
+ time: 2022-02-25 19:18:38.895863000 Z
1331
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1332
+ utc: *1
1333
+ zone: *2
1334
+ time: 2022-02-25 19:18:38.895863000 Z
1335
+ ','2022-02-25 19:18:38.929364',NULL)
1336
+ TRANSACTION (0.7ms) commit transaction
1337
+ Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
1338
+ TRANSACTION (0.0ms) begin transaction
1339
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1340
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:38.933744"]]
1341
+ TRANSACTION (0.7ms) commit transaction
1342
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1343
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1344
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1345
+ TRANSACTION (0.0ms) begin transaction
1346
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
1347
+ id: 1
1348
+ a: 2
1349
+ b: 4
1350
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1351
+ utc: &1 2022-02-25 19:18:38.895863000 Z
1352
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1353
+ name: Etc/UTC
1354
+ time: 2022-02-25 19:18:38.895863000 Z
1355
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1356
+ utc: *1
1357
+ zone: *2
1358
+ time: 2022-02-25 19:18:38.895863000 Z
1359
+ ','2022-02-25 19:18:38.937428',NULL)
1360
+ TRANSACTION (0.7ms) commit transaction
1361
+ TRANSACTION (0.1ms) begin transaction
1362
+ -----------------------------------------------
1363
+ InstallGeneratorTest: test_should_add_migration
1364
+ -----------------------------------------------
1365
+ TRANSACTION (0.1ms) rollback transaction
1366
+ TRANSACTION (0.0ms) begin transaction
1367
+ --------------------------
1368
+ SnapshotTest: test_restore
1369
+ --------------------------
1370
+ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1371
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1372
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1373
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1374
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1375
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1376
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1377
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1378
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1379
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1380
+ TRANSACTION (0.3ms) rollback transaction
1381
+ TRANSACTION (0.0ms) begin transaction
1382
+ ---------------------------
1383
+ SnapshotTest: test_metadata
1384
+ ---------------------------
1385
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1386
+ TRANSACTION (0.0ms) rollback transaction
1387
+ TRANSACTION (0.0ms) begin transaction
1388
+ ----------------------------------------------------------
1389
+ SnapshotTest: test_single_model_snapshots_without_children
1390
+ ----------------------------------------------------------
1391
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1392
+ ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:18:38.986638"], ["updated_at", "2022-02-25 19:18:38.986638"]]
1393
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1394
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1395
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
1396
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:38.990142"]]
1397
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1398
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1399
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'ParentWithoutChildren',2,'---
1400
+ id: 2
1401
+ a: 1
1402
+ b: 2
1403
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1404
+ utc: &1 2022-02-25 19:18:38.986638000 Z
1405
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1406
+ name: Etc/UTC
1407
+ time: 2022-02-25 19:18:38.986638000 Z
1408
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1409
+ utc: *1
1410
+ zone: *2
1411
+ time: 2022-02-25 19:18:38.986638000 Z
1412
+ ','2022-02-25 19:18:38.992515',NULL)
1413
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1414
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1415
+ ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:18:38.993451"], ["id", 2]]
1416
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1417
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
1418
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1419
+ TRANSACTION (222.6ms) rollback transaction
1420
+ TRANSACTION (0.1ms) begin transaction
1421
+ --------------------------------
1422
+ SnapshotTest: test_relationships
1423
+ --------------------------------
1424
+ TRANSACTION (0.0ms) rollback transaction
1425
+ TRANSACTION (0.0ms) begin transaction
1426
+ --------------------------------------
1427
+ SnapshotTest: test_fetch_reified_items
1428
+ --------------------------------------
1429
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1430
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1431
+ TRANSACTION (0.0ms) rollback transaction
1432
+ TRANSACTION (0.0ms) begin transaction
1433
+ ------------------------------
1434
+ SnapshotTest: test_validations
1435
+ ------------------------------
1436
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1437
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1438
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1439
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1440
+ TRANSACTION (0.0ms) rollback transaction
1441
+ TRANSACTION (0.0ms) begin transaction
1442
+ --------------------------------------
1443
+ SnapshotTest: test_build_snapshot_item
1444
+ --------------------------------------
1445
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1446
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1447
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1448
+ TRANSACTION (0.0ms) rollback transaction
1449
+ TRANSACTION (0.0ms) begin transaction
1450
+ -----------------------------------------------------
1451
+ SnapshotTest: test_fetch_reified_items_with_sti_class
1452
+ -----------------------------------------------------
1453
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1454
+ SubPost Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:18:39.254042"], ["updated_at", "2022-02-25 19:18:39.254042"]]
1455
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1456
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1457
+ Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:18:39.258961"], ["updated_at", "2022-02-25 19:18:39.258961"]]
1458
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1459
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1460
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
1461
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:39.261360"]]
1462
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1463
+ SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1464
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
1465
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
1466
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1467
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
1468
+ id: 2
1469
+ a: 1
1470
+ b: 2
1471
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1472
+ utc: &1 2022-02-25 19:18:39.254042000 Z
1473
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1474
+ name: Etc/UTC
1475
+ time: 2022-02-25 19:18:39.254042000 Z
1476
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1477
+ utc: *1
1478
+ zone: *2
1479
+ time: 2022-02-25 19:18:39.254042000 Z
1480
+ ','2022-02-25 19:18:39.265432',NULL),(NULL,3,'Comment',1,'---
1481
+ id: 1
1482
+ content: Example comment
1483
+ post_id: 2
1484
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1485
+ utc: 2022-02-25 19:18:39.258961000 Z
1486
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1487
+ name: Etc/UTC
1488
+ time: 2022-02-25 19:18:39.258961000 Z
1489
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1490
+ utc: 2022-02-25 19:18:39.258961000 Z
1491
+ zone: *1
1492
+ time: 2022-02-25 19:18:39.258961000 Z
1493
+ ','2022-02-25 19:18:39.265432','comments')
1494
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1495
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
1496
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1497
+ TRANSACTION (0.5ms) rollback transaction
1498
+ TRANSACTION (0.0ms) begin transaction
1499
+ -------------------------------------------
1500
+ SnapshotsConcernTest: test_create_snapshot!
1501
+ -------------------------------------------
1502
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1503
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1504
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1505
+ ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:18:39.272765"]]
1506
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1507
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1508
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1509
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1510
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1511
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1512
+ id: 1
1513
+ a: 2
1514
+ b: 4
1515
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1516
+ utc: 2022-02-25 19:18:38.895863000 Z
1517
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1518
+ name: Etc/UTC
1519
+ time: 2022-02-25 19:18:38.895863000 Z
1520
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1521
+ utc: 2022-02-25 19:18:38.895863000 Z
1522
+ zone: *1
1523
+ time: 2022-02-25 19:18:38.895863000 Z
1524
+ ','2022-02-25 19:18:39.276423',NULL)
1525
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1526
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1527
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1528
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:39.278218"]]
1529
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1530
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1531
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1532
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1533
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1534
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
1535
+ id: 1
1536
+ a: 2
1537
+ b: 4
1538
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1539
+ utc: 2022-02-25 19:18:38.895863000 Z
1540
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1541
+ name: Etc/UTC
1542
+ time: 2022-02-25 19:18:38.895863000 Z
1543
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1544
+ utc: 2022-02-25 19:18:38.895863000 Z
1545
+ zone: *1
1546
+ time: 2022-02-25 19:18:38.895863000 Z
1547
+ ','2022-02-25 19:18:39.280872',NULL)
1548
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1549
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1550
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1551
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:39.282819"]]
1552
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1553
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1554
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1555
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1556
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1557
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
1558
+ id: 1
1559
+ a: 2
1560
+ b: 4
1561
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1562
+ utc: 2022-02-25 19:18:38.895863000 Z
1563
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1564
+ name: Etc/UTC
1565
+ time: 2022-02-25 19:18:38.895863000 Z
1566
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1567
+ utc: 2022-02-25 19:18:38.895863000 Z
1568
+ zone: *1
1569
+ time: 2022-02-25 19:18:38.895863000 Z
1570
+ ','2022-02-25 19:18:39.285362',NULL)
1571
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1572
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1573
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1574
+ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1575
+ TRANSACTION (0.4ms) rollback transaction
1576
+ TRANSACTION (0.0ms) begin transaction
1577
+ ------------------------------------------------
1578
+ SnapshotsConcernTest: test_has_snapshot_children
1579
+ ------------------------------------------------
1580
+ TRANSACTION (0.0ms) rollback transaction
1581
+ TRANSACTION (0.0ms) begin transaction
1582
+ ----------------------------------------
1583
+ SnapshotsConcernTest: test_relationships
1584
+ ----------------------------------------
1585
+ TRANSACTION (0.0ms) rollback transaction
1586
+ TRANSACTION (0.0ms) begin transaction
1587
+ --------------------------------------------
1588
+ ActiveSnapshotTest: test_exposes_main_module
1589
+ --------------------------------------------
1590
+ TRANSACTION (0.0ms) rollback transaction
1591
+ TRANSACTION (0.0ms) begin transaction
1592
+ ----------------------------------------
1593
+ ActiveSnapshotTest: test_exposes_version
1594
+ ----------------------------------------
1595
+ TRANSACTION (0.0ms) rollback transaction
1596
+ TRANSACTION (0.0ms) begin transaction
1597
+ -------------------------------------------
1598
+ ActiveSnapshotTest: test_snapshot_lifecycle
1599
+ -------------------------------------------
1600
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1601
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1602
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:18:39.294715"], ["updated_at", "2022-02-25 19:18:39.294715"]]
1603
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1604
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
1605
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1606
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1607
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1608
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:18:39.297819"]]
1609
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1610
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1611
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1612
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1613
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1614
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1615
+ id: 1
1616
+ a: 2
1617
+ b: 4
1618
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1619
+ utc: 2022-02-25 19:18:38.895863000 Z
1620
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1621
+ name: Etc/UTC
1622
+ time: 2022-02-25 19:18:38.895863000 Z
1623
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1624
+ utc: 2022-02-25 19:18:38.895863000 Z
1625
+ zone: *1
1626
+ time: 2022-02-25 19:18:38.895863000 Z
1627
+ ','2022-02-25 19:18:39.301421',NULL),(NULL,3,'Comment',1,'---
1628
+ id: 1
1629
+ content: foo
1630
+ post_id: 1
1631
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1632
+ utc: 2022-02-25 19:18:39.294715000 Z
1633
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1634
+ name: Etc/UTC
1635
+ time: 2022-02-25 19:18:39.294715000 Z
1636
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1637
+ utc: 2022-02-25 19:18:39.294715000 Z
1638
+ zone: *1
1639
+ time: 2022-02-25 19:18:39.294715000 Z
1640
+ ','2022-02-25 19:18:39.301421','comments')
1641
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1642
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1643
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
1644
+ Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:18:39.302761"], ["id", 1]]
1645
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:18:39.303707"], ["id", 1]]
1646
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1647
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1648
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1649
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1650
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:18:39.305622"], ["updated_at", "2022-02-25 19:18:39.305622"]]
1651
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1652
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1653
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:18:39.306646"], ["updated_at", "2022-02-25 19:18:39.306646"]]
1654
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1655
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
1656
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1657
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1658
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1659
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1660
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1661
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1662
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1663
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1664
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
1665
+ Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
1666
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:18:38.895863"], ["id", 1]]
1667
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:18:39.294715"], ["updated_at", "2022-02-25 19:18:39.294715"]]
1668
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1669
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1670
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
1671
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
1672
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1673
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1674
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1675
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1676
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1677
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1678
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1679
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1680
+ TRANSACTION (0.5ms) rollback transaction
1681
+ TRANSACTION (0.0ms) begin transaction
1682
+ -----------------------------
1683
+ SnapshotItemTest: test_object
1684
+ -----------------------------
1685
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1686
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1687
+ TRANSACTION (0.0ms) rollback transaction
1688
+ TRANSACTION (0.0ms) begin transaction
1689
+ ------------------------------------
1690
+ SnapshotItemTest: test_restore_item!
1691
+ ------------------------------------
1692
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1693
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1694
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1695
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1696
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1697
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1698
+ TRANSACTION (0.4ms) rollback transaction
1699
+ TRANSACTION (0.0ms) begin transaction
1700
+ ------------------------------------
1701
+ SnapshotItemTest: test_relationships
1702
+ ------------------------------------
1703
+ TRANSACTION (0.0ms) rollback transaction
1704
+ TRANSACTION (0.0ms) begin transaction
1705
+ ----------------------------------
1706
+ SnapshotItemTest: test_validations
1707
+ ----------------------------------
1708
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1709
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
1710
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1711
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1712
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1713
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
1714
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1715
+ TRANSACTION (0.0ms) rollback transaction
1716
+  (1.0ms) SELECT sqlite_version(*)
1717
+ ActiveRecord::SchemaMigration Pluck (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1718
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1719
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
1720
+  (6.7ms) DELETE FROM posts;
1721
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
1722
+  (0.9ms) DELETE FROM snapshots;
1723
+  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
1724
+  (0.8ms) DELETE FROM snapshot_items;
1725
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
1726
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
1727
+ TRANSACTION (0.0ms) begin transaction
1728
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:19:22.963999"], ["updated_at", "2022-02-25 19:19:22.963999"]]
1729
+ TRANSACTION (0.7ms) commit transaction
1730
+ TRANSACTION (0.0ms) begin transaction
1731
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1732
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:22.978887"]]
1733
+ TRANSACTION (0.7ms) commit transaction
1734
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1735
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1736
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1737
+  (0.0ms) SELECT sqlite_version(*)
1738
+ TRANSACTION (0.0ms) begin transaction
1739
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
1740
+ id: 1
1741
+ a: 1
1742
+ b: 3
1743
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1744
+ utc: &1 2022-02-25 19:19:22.963999000 Z
1745
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1746
+ name: Etc/UTC
1747
+ time: 2022-02-25 19:19:22.963999000 Z
1748
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1749
+ utc: *1
1750
+ zone: *2
1751
+ time: 2022-02-25 19:19:22.963999000 Z
1752
+ ','2022-02-25 19:19:22.997867',NULL)
1753
+ TRANSACTION (0.9ms) commit transaction
1754
+ Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
1755
+ TRANSACTION (0.0ms) begin transaction
1756
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1757
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.002578"]]
1758
+ TRANSACTION (0.7ms) commit transaction
1759
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1760
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1761
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1762
+ TRANSACTION (0.0ms) begin transaction
1763
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
1764
+ id: 1
1765
+ a: 2
1766
+ b: 4
1767
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1768
+ utc: &1 2022-02-25 19:19:22.963999000 Z
1769
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1770
+ name: Etc/UTC
1771
+ time: 2022-02-25 19:19:22.963999000 Z
1772
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1773
+ utc: *1
1774
+ zone: *2
1775
+ time: 2022-02-25 19:19:22.963999000 Z
1776
+ ','2022-02-25 19:19:23.006416',NULL)
1777
+ TRANSACTION (0.7ms) commit transaction
1778
+ TRANSACTION (0.1ms) begin transaction
1779
+ --------------------------------------------
1780
+ ActiveSnapshotTest: test_exposes_main_module
1781
+ --------------------------------------------
1782
+ TRANSACTION (0.0ms) rollback transaction
1783
+ TRANSACTION (0.0ms) begin transaction
1784
+ ----------------------------------------
1785
+ ActiveSnapshotTest: test_exposes_version
1786
+ ----------------------------------------
1787
+ TRANSACTION (0.0ms) rollback transaction
1788
+ TRANSACTION (0.0ms) begin transaction
1789
+ -------------------------------------------
1790
+ ActiveSnapshotTest: test_snapshot_lifecycle
1791
+ -------------------------------------------
1792
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1793
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1794
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:19:23.043351"], ["updated_at", "2022-02-25 19:19:23.043351"]]
1795
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1796
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
1797
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1798
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1799
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1800
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.046474"]]
1801
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1802
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1803
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1804
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1805
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1806
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1807
+ id: 1
1808
+ a: 2
1809
+ b: 4
1810
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1811
+ utc: 2022-02-25 19:19:22.963999000 Z
1812
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1813
+ name: Etc/UTC
1814
+ time: 2022-02-25 19:19:22.963999000 Z
1815
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1816
+ utc: 2022-02-25 19:19:22.963999000 Z
1817
+ zone: *1
1818
+ time: 2022-02-25 19:19:22.963999000 Z
1819
+ ','2022-02-25 19:19:23.049655',NULL),(NULL,3,'Comment',1,'---
1820
+ id: 1
1821
+ content: foo
1822
+ post_id: 1
1823
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1824
+ utc: 2022-02-25 19:19:23.043351000 Z
1825
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1826
+ name: Etc/UTC
1827
+ time: 2022-02-25 19:19:23.043351000 Z
1828
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1829
+ utc: 2022-02-25 19:19:23.043351000 Z
1830
+ zone: *1
1831
+ time: 2022-02-25 19:19:23.043351000 Z
1832
+ ','2022-02-25 19:19:23.049655','comments')
1833
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1834
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1835
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
1836
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:19:23.050847"], ["id", 1]]
1837
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:19:23.051327"], ["id", 1]]
1838
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1839
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1840
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1841
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1842
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:19:23.052418"], ["updated_at", "2022-02-25 19:19:23.052418"]]
1843
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1844
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1845
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:19:23.053323"], ["updated_at", "2022-02-25 19:19:23.053323"]]
1846
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1847
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
1848
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1849
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1850
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1851
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1852
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1853
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1854
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1855
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1856
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
1857
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
1858
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:19:22.963999"], ["id", 1]]
1859
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:19:23.043351"], ["updated_at", "2022-02-25 19:19:23.043351"]]
1860
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1861
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1862
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
1863
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
1864
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1865
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1866
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1867
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1868
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1869
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1870
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1871
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1872
+ TRANSACTION (0.4ms) rollback transaction
1873
+ TRANSACTION (0.0ms) begin transaction
1874
+ -----------------------------------------------------
1875
+ SnapshotTest: test_fetch_reified_items_with_sti_class
1876
+ -----------------------------------------------------
1877
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1878
+ SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:19:23.069046"], ["updated_at", "2022-02-25 19:19:23.069046"]]
1879
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1880
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1881
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:19:23.070836"], ["updated_at", "2022-02-25 19:19:23.070836"]]
1882
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1883
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1884
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
1885
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.073031"]]
1886
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1887
+ SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1888
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
1889
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
1890
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1891
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
1892
+ id: 2
1893
+ a: 1
1894
+ b: 2
1895
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1896
+ utc: &1 2022-02-25 19:19:23.069046000 Z
1897
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1898
+ name: Etc/UTC
1899
+ time: 2022-02-25 19:19:23.069046000 Z
1900
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1901
+ utc: *1
1902
+ zone: *2
1903
+ time: 2022-02-25 19:19:23.069046000 Z
1904
+ ','2022-02-25 19:19:23.078150',NULL),(NULL,3,'Comment',1,'---
1905
+ id: 1
1906
+ content: Example comment
1907
+ post_id: 2
1908
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1909
+ utc: 2022-02-25 19:19:23.070836000 Z
1910
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1911
+ name: Etc/UTC
1912
+ time: 2022-02-25 19:19:23.070836000 Z
1913
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1914
+ utc: 2022-02-25 19:19:23.070836000 Z
1915
+ zone: *1
1916
+ time: 2022-02-25 19:19:23.070836000 Z
1917
+ ','2022-02-25 19:19:23.078150','comments')
1918
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1919
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
1920
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1921
+ TRANSACTION (0.5ms) rollback transaction
1922
+ TRANSACTION (0.1ms) begin transaction
1923
+ ------------------------------
1924
+ SnapshotTest: test_validations
1925
+ ------------------------------
1926
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1927
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1928
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1929
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1930
+ TRANSACTION (0.0ms) rollback transaction
1931
+ TRANSACTION (0.1ms) begin transaction
1932
+ ----------------------------------------------------------
1933
+ SnapshotTest: test_single_model_snapshots_without_children
1934
+ ----------------------------------------------------------
1935
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1936
+ ParentWithoutChildren Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:19:23.094599"], ["updated_at", "2022-02-25 19:19:23.094599"]]
1937
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1938
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1939
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
1940
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.097768"]]
1941
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1942
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1943
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'ParentWithoutChildren',2,'---
1944
+ id: 2
1945
+ a: 1
1946
+ b: 2
1947
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
1948
+ utc: &1 2022-02-25 19:19:23.094599000 Z
1949
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
1950
+ name: Etc/UTC
1951
+ time: 2022-02-25 19:19:23.094599000 Z
1952
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
1953
+ utc: *1
1954
+ zone: *2
1955
+ time: 2022-02-25 19:19:23.094599000 Z
1956
+ ','2022-02-25 19:19:23.100095',NULL)
1957
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1958
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1959
+ ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:19:23.101221"], ["id", 2]]
1960
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1961
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
1962
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1963
+ TRANSACTION (0.4ms) rollback transaction
1964
+ TRANSACTION (0.0ms) begin transaction
1965
+ --------------------------
1966
+ SnapshotTest: test_restore
1967
+ --------------------------
1968
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1969
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1970
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1971
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1972
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1973
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1974
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1975
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1976
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1977
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1978
+ TRANSACTION (0.3ms) rollback transaction
1979
+ TRANSACTION (0.0ms) begin transaction
1980
+ --------------------------------
1981
+ SnapshotTest: test_relationships
1982
+ --------------------------------
1983
+ TRANSACTION (0.0ms) rollback transaction
1984
+ TRANSACTION (0.0ms) begin transaction
1985
+ --------------------------------------
1986
+ SnapshotTest: test_fetch_reified_items
1987
+ --------------------------------------
1988
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1989
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1990
+ TRANSACTION (0.0ms) rollback transaction
1991
+ TRANSACTION (0.0ms) begin transaction
1992
+ --------------------------------------
1993
+ SnapshotTest: test_build_snapshot_item
1994
+ --------------------------------------
1995
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1996
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1997
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1998
+ TRANSACTION (0.0ms) rollback transaction
1999
+ TRANSACTION (0.0ms) begin transaction
2000
+ ---------------------------
2001
+ SnapshotTest: test_metadata
2002
+ ---------------------------
2003
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2004
+ TRANSACTION (0.0ms) rollback transaction
2005
+ TRANSACTION (0.0ms) begin transaction
2006
+ ------------------------------------------------
2007
+ SnapshotsConcernTest: test_has_snapshot_children
2008
+ ------------------------------------------------
2009
+ TRANSACTION (0.0ms) rollback transaction
2010
+ TRANSACTION (0.0ms) begin transaction
2011
+ -------------------------------------------
2012
+ SnapshotsConcernTest: test_create_snapshot!
2013
+ -------------------------------------------
2014
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2015
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2016
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2017
+ ActiveSnapshot::Snapshot Create (0.5ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:19:23.125570"]]
2018
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
2019
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2020
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2021
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2022
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2023
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
2024
+ id: 1
2025
+ a: 2
2026
+ b: 4
2027
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2028
+ utc: 2022-02-25 19:19:22.963999000 Z
2029
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2030
+ name: Etc/UTC
2031
+ time: 2022-02-25 19:19:22.963999000 Z
2032
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2033
+ utc: 2022-02-25 19:19:22.963999000 Z
2034
+ zone: *1
2035
+ time: 2022-02-25 19:19:22.963999000 Z
2036
+ ','2022-02-25 19:19:23.130331',NULL)
2037
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2038
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2039
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2040
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.132665"]]
2041
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2042
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2043
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2044
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2045
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2046
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
2047
+ id: 1
2048
+ a: 2
2049
+ b: 4
2050
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2051
+ utc: 2022-02-25 19:19:22.963999000 Z
2052
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2053
+ name: Etc/UTC
2054
+ time: 2022-02-25 19:19:22.963999000 Z
2055
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2056
+ utc: 2022-02-25 19:19:22.963999000 Z
2057
+ zone: *1
2058
+ time: 2022-02-25 19:19:22.963999000 Z
2059
+ ','2022-02-25 19:19:23.136079',NULL)
2060
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2061
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2062
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2063
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:19:23.138146"]]
2064
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2065
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2066
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2067
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2068
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2069
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
2070
+ id: 1
2071
+ a: 2
2072
+ b: 4
2073
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2074
+ utc: 2022-02-25 19:19:22.963999000 Z
2075
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2076
+ name: Etc/UTC
2077
+ time: 2022-02-25 19:19:22.963999000 Z
2078
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2079
+ utc: 2022-02-25 19:19:22.963999000 Z
2080
+ zone: *1
2081
+ time: 2022-02-25 19:19:22.963999000 Z
2082
+ ','2022-02-25 19:19:23.141546',NULL)
2083
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2084
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2085
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2086
+ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2087
+ TRANSACTION (0.4ms) rollback transaction
2088
+ TRANSACTION (0.0ms) begin transaction
2089
+ ----------------------------------------
2090
+ SnapshotsConcernTest: test_relationships
2091
+ ----------------------------------------
2092
+ TRANSACTION (0.0ms) rollback transaction
2093
+ TRANSACTION (0.0ms) begin transaction
2094
+ ------------------------------------
2095
+ SnapshotItemTest: test_restore_item!
2096
+ ------------------------------------
2097
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2098
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2099
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2100
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2101
+ Post Update (0.4ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
2102
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2103
+ TRANSACTION (0.5ms) rollback transaction
2104
+ TRANSACTION (0.0ms) begin transaction
2105
+ ----------------------------------
2106
+ SnapshotItemTest: test_validations
2107
+ ----------------------------------
2108
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
2109
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
2110
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2111
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2112
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
2113
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
2114
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
2115
+ TRANSACTION (0.0ms) rollback transaction
2116
+ TRANSACTION (0.0ms) begin transaction
2117
+ -----------------------------
2118
+ SnapshotItemTest: test_object
2119
+ -----------------------------
2120
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2121
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2122
+ TRANSACTION (0.0ms) rollback transaction
2123
+ TRANSACTION (0.0ms) begin transaction
2124
+ ------------------------------------
2125
+ SnapshotItemTest: test_relationships
2126
+ ------------------------------------
2127
+ TRANSACTION (0.0ms) rollback transaction
2128
+ TRANSACTION (0.0ms) begin transaction
2129
+ -----------------------------------------------
2130
+ InstallGeneratorTest: test_should_add_migration
2131
+ -----------------------------------------------
2132
+ TRANSACTION (0.1ms) rollback transaction
2133
+  (1.0ms) SELECT sqlite_version(*)
2134
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2135
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2136
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
2137
+  (6.6ms) DELETE FROM posts;
2138
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
2139
+  (0.8ms) DELETE FROM snapshots;
2140
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
2141
+  (1.0ms) DELETE FROM snapshot_items;
2142
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
2143
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
2144
+ TRANSACTION (0.0ms) begin transaction
2145
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:20:35.789310"], ["updated_at", "2022-02-25 19:20:35.789310"]]
2146
+ TRANSACTION (0.5ms) commit transaction
2147
+ TRANSACTION (0.0ms) begin transaction
2148
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2149
+ ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.803837"]]
2150
+ TRANSACTION (0.7ms) commit transaction
2151
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2152
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2153
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2154
+  (0.0ms) SELECT sqlite_version(*)
2155
+ TRANSACTION (0.0ms) begin transaction
2156
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
2157
+ id: 1
2158
+ a: 1
2159
+ b: 3
2160
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2161
+ utc: &1 2022-02-25 19:20:35.789310000 Z
2162
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2163
+ name: Etc/UTC
2164
+ time: 2022-02-25 19:20:35.789310000 Z
2165
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2166
+ utc: *1
2167
+ zone: *2
2168
+ time: 2022-02-25 19:20:35.789310000 Z
2169
+ ','2022-02-25 19:20:35.822170',NULL)
2170
+ TRANSACTION (0.6ms) commit transaction
2171
+ Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
2172
+ TRANSACTION (0.0ms) begin transaction
2173
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2174
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.826497"]]
2175
+ TRANSACTION (0.7ms) commit transaction
2176
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2177
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2178
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2179
+ TRANSACTION (0.0ms) begin transaction
2180
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
2181
+ id: 1
2182
+ a: 2
2183
+ b: 4
2184
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2185
+ utc: &1 2022-02-25 19:20:35.789310000 Z
2186
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2187
+ name: Etc/UTC
2188
+ time: 2022-02-25 19:20:35.789310000 Z
2189
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2190
+ utc: *1
2191
+ zone: *2
2192
+ time: 2022-02-25 19:20:35.789310000 Z
2193
+ ','2022-02-25 19:20:35.830224',NULL)
2194
+ TRANSACTION (0.6ms) commit transaction
2195
+ TRANSACTION (0.1ms) begin transaction
2196
+ -----------------------------------------------
2197
+ InstallGeneratorTest: test_should_add_migration
2198
+ -----------------------------------------------
2199
+ TRANSACTION (0.1ms) rollback transaction
2200
+ TRANSACTION (0.0ms) begin transaction
2201
+ -------------------------------------------
2202
+ SnapshotsConcernTest: test_create_snapshot!
2203
+ -------------------------------------------
2204
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2205
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2206
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2207
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:20:35.871008"]]
2208
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2209
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2210
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2211
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2212
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2213
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
2214
+ id: 1
2215
+ a: 2
2216
+ b: 4
2217
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2218
+ utc: 2022-02-25 19:20:35.789310000 Z
2219
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2220
+ name: Etc/UTC
2221
+ time: 2022-02-25 19:20:35.789310000 Z
2222
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2223
+ utc: 2022-02-25 19:20:35.789310000 Z
2224
+ zone: *1
2225
+ time: 2022-02-25 19:20:35.789310000 Z
2226
+ ','2022-02-25 19:20:35.874056',NULL)
2227
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2228
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2229
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2230
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.875642"]]
2231
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2232
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2233
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2234
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2235
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2236
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
2237
+ id: 1
2238
+ a: 2
2239
+ b: 4
2240
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2241
+ utc: 2022-02-25 19:20:35.789310000 Z
2242
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2243
+ name: Etc/UTC
2244
+ time: 2022-02-25 19:20:35.789310000 Z
2245
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2246
+ utc: 2022-02-25 19:20:35.789310000 Z
2247
+ zone: *1
2248
+ time: 2022-02-25 19:20:35.789310000 Z
2249
+ ','2022-02-25 19:20:35.877986',NULL)
2250
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2251
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2252
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2253
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.879416"]]
2254
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2255
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2256
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2257
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2258
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2259
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
2260
+ id: 1
2261
+ a: 2
2262
+ b: 4
2263
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2264
+ utc: 2022-02-25 19:20:35.789310000 Z
2265
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2266
+ name: Etc/UTC
2267
+ time: 2022-02-25 19:20:35.789310000 Z
2268
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2269
+ utc: 2022-02-25 19:20:35.789310000 Z
2270
+ zone: *1
2271
+ time: 2022-02-25 19:20:35.789310000 Z
2272
+ ','2022-02-25 19:20:35.883477',NULL)
2273
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2274
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2275
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2276
+ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2277
+ TRANSACTION (0.3ms) rollback transaction
2278
+ TRANSACTION (0.0ms) begin transaction
2279
+ ----------------------------------------
2280
+ SnapshotsConcernTest: test_relationships
2281
+ ----------------------------------------
2282
+ TRANSACTION (0.0ms) rollback transaction
2283
+ TRANSACTION (0.0ms) begin transaction
2284
+ ------------------------------------------------
2285
+ SnapshotsConcernTest: test_has_snapshot_children
2286
+ ------------------------------------------------
2287
+ TRANSACTION (0.0ms) rollback transaction
2288
+ TRANSACTION (0.0ms) begin transaction
2289
+ -----------------------------
2290
+ SnapshotItemTest: test_object
2291
+ -----------------------------
2292
+ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2293
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2294
+ TRANSACTION (0.0ms) rollback transaction
2295
+ TRANSACTION (0.0ms) begin transaction
2296
+ ------------------------------------
2297
+ SnapshotItemTest: test_relationships
2298
+ ------------------------------------
2299
+ TRANSACTION (0.0ms) rollback transaction
2300
+ TRANSACTION (0.0ms) begin transaction
2301
+ ------------------------------------
2302
+ SnapshotItemTest: test_restore_item!
2303
+ ------------------------------------
2304
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2305
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2306
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2307
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2308
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
2309
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2310
+ TRANSACTION (0.3ms) rollback transaction
2311
+ TRANSACTION (0.0ms) begin transaction
2312
+ ----------------------------------
2313
+ SnapshotItemTest: test_validations
2314
+ ----------------------------------
2315
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
2316
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
2317
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2318
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2319
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
2320
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
2321
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
2322
+ TRANSACTION (0.0ms) rollback transaction
2323
+ TRANSACTION (0.0ms) begin transaction
2324
+ ---------------------------
2325
+ SnapshotTest: test_metadata
2326
+ ---------------------------
2327
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2328
+ TRANSACTION (0.0ms) rollback transaction
2329
+ TRANSACTION (0.0ms) begin transaction
2330
+ --------------------------------------
2331
+ SnapshotTest: test_fetch_reified_items
2332
+ --------------------------------------
2333
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2334
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2335
+ TRANSACTION (0.1ms) rollback transaction
2336
+ TRANSACTION (0.1ms) begin transaction
2337
+ --------------------------------------
2338
+ SnapshotTest: test_build_snapshot_item
2339
+ --------------------------------------
2340
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2341
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2342
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2343
+ TRANSACTION (0.0ms) rollback transaction
2344
+ TRANSACTION (0.0ms) begin transaction
2345
+ ------------------------------
2346
+ SnapshotTest: test_validations
2347
+ ------------------------------
2348
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2349
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
2350
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2351
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2352
+ TRANSACTION (0.0ms) rollback transaction
2353
+ TRANSACTION (0.0ms) begin transaction
2354
+ --------------------------------
2355
+ SnapshotTest: test_relationships
2356
+ --------------------------------
2357
+ TRANSACTION (0.0ms) rollback transaction
2358
+ TRANSACTION (0.0ms) begin transaction
2359
+ ----------------------------------------------------------
2360
+ SnapshotTest: test_single_model_snapshots_without_children
2361
+ ----------------------------------------------------------
2362
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2363
+ ParentWithoutChildren Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:20:35.931214"], ["updated_at", "2022-02-25 19:20:35.931214"]]
2364
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2365
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2366
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
2367
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.934708"]]
2368
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2369
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2370
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'ParentWithoutChildren',2,'---
2371
+ id: 2
2372
+ a: 1
2373
+ b: 2
2374
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2375
+ utc: &1 2022-02-25 19:20:35.931214000 Z
2376
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2377
+ name: Etc/UTC
2378
+ time: 2022-02-25 19:20:35.931214000 Z
2379
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2380
+ utc: *1
2381
+ zone: *2
2382
+ time: 2022-02-25 19:20:35.931214000 Z
2383
+ ','2022-02-25 19:20:35.936688',NULL)
2384
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2385
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2386
+ ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:20:35.937620"], ["id", 2]]
2387
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2388
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
2389
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
2390
+ TRANSACTION (0.4ms) rollback transaction
2391
+ TRANSACTION (0.0ms) begin transaction
2392
+ --------------------------
2393
+ SnapshotTest: test_restore
2394
+ --------------------------
2395
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2396
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2397
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2398
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2399
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2400
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2401
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2402
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
2403
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
2404
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2405
+ TRANSACTION (0.4ms) rollback transaction
2406
+ TRANSACTION (0.1ms) begin transaction
2407
+ -----------------------------------------------------
2408
+ SnapshotTest: test_fetch_reified_items_with_sti_class
2409
+ -----------------------------------------------------
2410
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2411
+ SubPost Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:20:35.950273"], ["updated_at", "2022-02-25 19:20:35.950273"]]
2412
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2413
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2414
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:20:35.954355"], ["updated_at", "2022-02-25 19:20:35.954355"]]
2415
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2416
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2417
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
2418
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.956695"]]
2419
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2420
+ SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2421
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
2422
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
2423
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2424
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
2425
+ id: 2
2426
+ a: 1
2427
+ b: 2
2428
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2429
+ utc: &1 2022-02-25 19:20:35.950273000 Z
2430
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2431
+ name: Etc/UTC
2432
+ time: 2022-02-25 19:20:35.950273000 Z
2433
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2434
+ utc: *1
2435
+ zone: *2
2436
+ time: 2022-02-25 19:20:35.950273000 Z
2437
+ ','2022-02-25 19:20:35.961347',NULL),(NULL,3,'Comment',1,'---
2438
+ id: 1
2439
+ content: Example comment
2440
+ post_id: 2
2441
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2442
+ utc: 2022-02-25 19:20:35.954355000 Z
2443
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2444
+ name: Etc/UTC
2445
+ time: 2022-02-25 19:20:35.954355000 Z
2446
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2447
+ utc: 2022-02-25 19:20:35.954355000 Z
2448
+ zone: *1
2449
+ time: 2022-02-25 19:20:35.954355000 Z
2450
+ ','2022-02-25 19:20:35.961347','comments')
2451
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2452
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
2453
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
2454
+ TRANSACTION (0.4ms) rollback transaction
2455
+ TRANSACTION (0.0ms) begin transaction
2456
+ -------------------------------------------
2457
+ ActiveSnapshotTest: test_snapshot_lifecycle
2458
+ -------------------------------------------
2459
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2460
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2461
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:20:35.967145"], ["updated_at", "2022-02-25 19:20:35.967145"]]
2462
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2463
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2464
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
437
2465
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
438
2466
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
439
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.670427"]]
2467
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:20:35.970506"]]
440
2468
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
441
2469
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
442
2470
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
443
2471
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
444
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
445
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
2472
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2473
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
446
2474
  id: 1
447
2475
  a: 2
448
2476
  b: 4
449
2477
  created_at: !ruby/object:ActiveSupport::TimeWithZone
450
- utc: 2021-08-19 23:28:46.603059000 Z
2478
+ utc: 2022-02-25 19:20:35.789310000 Z
451
2479
  zone: &1 !ruby/object:ActiveSupport::TimeZone
452
2480
  name: Etc/UTC
453
- time: 2021-08-19 23:28:46.603059000 Z
2481
+ time: 2022-02-25 19:20:35.789310000 Z
454
2482
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
455
- utc: 2021-08-19 23:28:46.603059000 Z
2483
+ utc: 2022-02-25 19:20:35.789310000 Z
456
2484
  zone: *1
457
- time: 2021-08-19 23:28:46.603059000 Z
458
- ','2021-08-19 23:28:46.672991',NULL),(NULL,3,'Comment',1,'---
2485
+ time: 2022-02-25 19:20:35.789310000 Z
2486
+ ','2022-02-25 19:20:35.974518',NULL),(NULL,3,'Comment',1,'---
459
2487
  id: 1
460
2488
  content: foo
461
2489
  post_id: 1
462
2490
  created_at: !ruby/object:ActiveSupport::TimeWithZone
463
- utc: 2021-08-19 23:28:46.668148000 Z
2491
+ utc: 2022-02-25 19:20:35.967145000 Z
464
2492
  zone: &1 !ruby/object:ActiveSupport::TimeZone
465
2493
  name: Etc/UTC
466
- time: 2021-08-19 23:28:46.668148000 Z
2494
+ time: 2022-02-25 19:20:35.967145000 Z
467
2495
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
468
- utc: 2021-08-19 23:28:46.668148000 Z
2496
+ utc: 2022-02-25 19:20:35.967145000 Z
469
2497
  zone: *1
470
- time: 2021-08-19 23:28:46.668148000 Z
471
- ','2021-08-19 23:28:46.672991','comments')
2498
+ time: 2022-02-25 19:20:35.967145000 Z
2499
+ ','2022-02-25 19:20:35.974518','comments')
472
2500
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
473
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
474
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
475
- Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:46.673978"], ["id", 1]]
476
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:28:46.674338"], ["id", 1]]
2501
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
2502
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2503
+ Post Update (0.2ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:20:35.976249"], ["id", 1]]
2504
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:20:35.987493"], ["id", 1]]
477
2505
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
478
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
2506
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
479
2507
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
480
2508
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
481
- Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.675175"], ["updated_at", "2021-08-19 23:28:46.675175"]]
2509
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:20:35.989308"], ["updated_at", "2022-02-25 19:20:35.989308"]]
482
2510
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
483
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
484
- Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.675840"], ["updated_at", "2021-08-19 23:28:46.675840"]]
2511
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2512
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:20:35.990552"], ["updated_at", "2022-02-25 19:20:35.990552"]]
485
2513
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
486
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
487
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
2514
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2515
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
488
2516
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
489
2517
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
490
2518
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
491
2519
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
492
- ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
493
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
494
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
495
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
496
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
497
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:28:46.603059"], ["id", 1]]
498
- Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:28:46.668148"], ["updated_at", "2021-08-19 23:28:46.668148"]]
2520
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
2521
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
2522
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
2523
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
2524
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
2525
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:20:35.789310"], ["id", 1]]
2526
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:20:35.967145"], ["updated_at", "2022-02-25 19:20:35.967145"]]
499
2527
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
500
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
501
-  (0.1ms) SELECT COUNT(*) FROM "snapshots"
502
-  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
2528
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
2529
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
2530
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
503
2531
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
504
2532
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
505
2533
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
506
2534
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
507
-  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2535
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
508
2536
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
509
2537
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
510
2538
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
511
- TRANSACTION (0.2ms) rollback transaction
2539
+ TRANSACTION (0.5ms) rollback transaction
512
2540
  TRANSACTION (0.0ms) begin transaction
513
2541
  --------------------------------------------
514
2542
  ActiveSnapshotTest: test_exposes_main_module
515
2543
  --------------------------------------------
516
2544
  TRANSACTION (0.0ms) rollback transaction
517
2545
  TRANSACTION (0.0ms) begin transaction
518
- --------------------------------------
519
- SnapshotTest: test_fetch_reified_items
520
- --------------------------------------
2546
+ ----------------------------------------
2547
+ ActiveSnapshotTest: test_exposes_version
2548
+ ----------------------------------------
2549
+ TRANSACTION (0.0ms) rollback transaction
2550
+  (1.0ms) SELECT sqlite_version(*)
2551
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2552
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2553
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
2554
+  (6.6ms) DELETE FROM posts;
2555
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
2556
+  (0.8ms) DELETE FROM snapshots;
2557
+  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
2558
+  (0.9ms) DELETE FROM snapshot_items;
2559
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
2560
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
2561
+ TRANSACTION (0.0ms) begin transaction
2562
+ Post Create (0.4ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:21:38.597166"], ["updated_at", "2022-02-25 19:21:38.597166"]]
2563
+ TRANSACTION (0.7ms) commit transaction
2564
+ TRANSACTION (0.0ms) begin transaction
2565
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2566
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.612142"]]
2567
+ TRANSACTION (0.7ms) commit transaction
2568
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2569
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2570
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2571
+  (0.0ms) SELECT sqlite_version(*)
2572
+ TRANSACTION (0.1ms) begin transaction
2573
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
2574
+ id: 1
2575
+ a: 1
2576
+ b: 3
2577
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2578
+ utc: &1 2022-02-25 19:21:38.597166000 Z
2579
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2580
+ name: Etc/UTC
2581
+ time: 2022-02-25 19:21:38.597166000 Z
2582
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2583
+ utc: *1
2584
+ zone: *2
2585
+ time: 2022-02-25 19:21:38.597166000 Z
2586
+ ','2022-02-25 19:21:38.630816',NULL)
2587
+ TRANSACTION (0.7ms) commit transaction
2588
+ Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
2589
+ TRANSACTION (0.0ms) begin transaction
2590
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2591
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.635374"]]
2592
+ TRANSACTION (0.6ms) commit transaction
2593
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2594
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2595
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2596
+ TRANSACTION (0.0ms) begin transaction
2597
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
2598
+ id: 1
2599
+ a: 2
2600
+ b: 4
2601
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2602
+ utc: &1 2022-02-25 19:21:38.597166000 Z
2603
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2604
+ name: Etc/UTC
2605
+ time: 2022-02-25 19:21:38.597166000 Z
2606
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2607
+ utc: *1
2608
+ zone: *2
2609
+ time: 2022-02-25 19:21:38.597166000 Z
2610
+ ','2022-02-25 19:21:38.639020',NULL)
2611
+ TRANSACTION (0.6ms) commit transaction
2612
+ TRANSACTION (0.1ms) begin transaction
2613
+ -----------------------------
2614
+ SnapshotItemTest: test_object
2615
+ -----------------------------
521
2616
  ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
522
2617
  ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
523
- TRANSACTION (0.0ms) rollback transaction
2618
+ TRANSACTION (0.1ms) rollback transaction
524
2619
  TRANSACTION (0.0ms) begin transaction
525
- --------------------------------
526
- SnapshotTest: test_relationships
527
- --------------------------------
2620
+ ------------------------------------
2621
+ SnapshotItemTest: test_relationships
2622
+ ------------------------------------
528
2623
  TRANSACTION (0.0ms) rollback transaction
529
2624
  TRANSACTION (0.0ms) begin transaction
530
- ------------------------------
531
- SnapshotTest: test_validations
532
- ------------------------------
533
- ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
534
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
535
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
536
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2625
+ ------------------------------------
2626
+ SnapshotItemTest: test_restore_item!
2627
+ ------------------------------------
2628
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2629
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
2630
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2631
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2632
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
2633
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2634
+ TRANSACTION (0.3ms) rollback transaction
2635
+ TRANSACTION (0.0ms) begin transaction
2636
+ ----------------------------------
2637
+ SnapshotItemTest: test_validations
2638
+ ----------------------------------
2639
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
2640
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
2641
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2642
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2643
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
2644
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
2645
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
537
2646
  TRANSACTION (0.0ms) rollback transaction
538
2647
  TRANSACTION (0.0ms) begin transaction
539
- ---------------------------
540
- SnapshotTest: test_metadata
541
- ---------------------------
2648
+ --------------------------------------
2649
+ SnapshotTest: test_fetch_reified_items
2650
+ --------------------------------------
542
2651
  ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2652
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
543
2653
  TRANSACTION (0.0ms) rollback transaction
544
2654
  TRANSACTION (0.0ms) begin transaction
545
2655
  --------------------------
546
2656
  SnapshotTest: test_restore
547
2657
  --------------------------
548
2658
  ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
549
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
550
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2659
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2660
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
551
2661
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
552
2662
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
553
2663
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
554
2664
  ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
555
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
2665
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
556
2666
  Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
557
2667
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
558
2668
  TRANSACTION (0.3ms) rollback transaction
2669
+ TRANSACTION (0.1ms) begin transaction
2670
+ -----------------------------------------------------
2671
+ SnapshotTest: test_fetch_reified_items_with_sti_class
2672
+ -----------------------------------------------------
2673
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2674
+ SubPost Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:21:38.700920"], ["updated_at", "2022-02-25 19:21:38.700920"]]
2675
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2676
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2677
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:21:38.704492"], ["updated_at", "2022-02-25 19:21:38.704492"]]
2678
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2679
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2680
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
2681
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.706644"]]
2682
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
2683
+ SubPost Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2684
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
2685
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
2686
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2687
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
2688
+ id: 2
2689
+ a: 1
2690
+ b: 2
2691
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2692
+ utc: &1 2022-02-25 19:21:38.700920000 Z
2693
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
2694
+ name: Etc/UTC
2695
+ time: 2022-02-25 19:21:38.700920000 Z
2696
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2697
+ utc: *1
2698
+ zone: *2
2699
+ time: 2022-02-25 19:21:38.700920000 Z
2700
+ ','2022-02-25 19:21:38.712301',NULL),(NULL,3,'Comment',1,'---
2701
+ id: 1
2702
+ content: Example comment
2703
+ post_id: 2
2704
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2705
+ utc: 2022-02-25 19:21:38.704492000 Z
2706
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2707
+ name: Etc/UTC
2708
+ time: 2022-02-25 19:21:38.704492000 Z
2709
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2710
+ utc: 2022-02-25 19:21:38.704492000 Z
2711
+ zone: *1
2712
+ time: 2022-02-25 19:21:38.704492000 Z
2713
+ ','2022-02-25 19:21:38.712301','comments')
2714
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2715
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
2716
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
2717
+ TRANSACTION (0.5ms) rollback transaction
2718
+ TRANSACTION (0.0ms) begin transaction
2719
+ ------------------------------
2720
+ SnapshotTest: test_validations
2721
+ ------------------------------
2722
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2723
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
2724
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2725
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2726
+ TRANSACTION (0.0ms) rollback transaction
559
2727
  TRANSACTION (0.0ms) begin transaction
560
2728
  --------------------------------------
561
2729
  SnapshotTest: test_build_snapshot_item
562
2730
  --------------------------------------
563
2731
  ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2732
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
564
2733
  Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
565
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2734
+ TRANSACTION (0.1ms) rollback transaction
2735
+ TRANSACTION (0.1ms) begin transaction
2736
+ ----------------------------------------------------------
2737
+ SnapshotTest: test_single_model_snapshots_without_children
2738
+ ----------------------------------------------------------
2739
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2740
+ ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:21:38.727758"], ["updated_at", "2022-02-25 19:21:38.727758"]]
2741
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2742
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2743
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
2744
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.730675"]]
2745
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2746
+ TRANSACTION (0.3ms) rollback transaction
2747
+ TRANSACTION (0.0ms) begin transaction
2748
+ --------------------------------
2749
+ SnapshotTest: test_relationships
2750
+ --------------------------------
566
2751
  TRANSACTION (0.0ms) rollback transaction
567
2752
  TRANSACTION (0.0ms) begin transaction
2753
+ ---------------------------
2754
+ SnapshotTest: test_metadata
2755
+ ---------------------------
2756
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
2757
+ TRANSACTION (0.0ms) rollback transaction
2758
+ TRANSACTION (0.0ms) begin transaction
2759
+ --------------------------------------------
2760
+ ActiveSnapshotTest: test_exposes_main_module
2761
+ --------------------------------------------
2762
+ TRANSACTION (0.0ms) rollback transaction
2763
+ TRANSACTION (0.0ms) begin transaction
2764
+ ----------------------------------------
2765
+ ActiveSnapshotTest: test_exposes_version
2766
+ ----------------------------------------
2767
+ TRANSACTION (0.0ms) rollback transaction
2768
+ TRANSACTION (0.0ms) begin transaction
2769
+ -------------------------------------------
2770
+ ActiveSnapshotTest: test_snapshot_lifecycle
2771
+ -------------------------------------------
2772
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
2773
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2774
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:21:38.738636"], ["updated_at", "2022-02-25 19:21:38.738636"]]
2775
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2776
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2777
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
2778
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
2779
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
2780
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.742989"]]
2781
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2782
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2783
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2784
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2785
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2786
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
2787
+ id: 1
2788
+ a: 2
2789
+ b: 4
2790
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2791
+ utc: 2022-02-25 19:21:38.597166000 Z
2792
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2793
+ name: Etc/UTC
2794
+ time: 2022-02-25 19:21:38.597166000 Z
2795
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2796
+ utc: 2022-02-25 19:21:38.597166000 Z
2797
+ zone: *1
2798
+ time: 2022-02-25 19:21:38.597166000 Z
2799
+ ','2022-02-25 19:21:38.746771',NULL),(NULL,3,'Comment',1,'---
2800
+ id: 1
2801
+ content: foo
2802
+ post_id: 1
2803
+ created_at: !ruby/object:ActiveSupport::TimeWithZone
2804
+ utc: 2022-02-25 19:21:38.738636000 Z
2805
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
2806
+ name: Etc/UTC
2807
+ time: 2022-02-25 19:21:38.738636000 Z
2808
+ updated_at: !ruby/object:ActiveSupport::TimeWithZone
2809
+ utc: 2022-02-25 19:21:38.738636000 Z
2810
+ zone: *1
2811
+ time: 2022-02-25 19:21:38.738636000 Z
2812
+ ','2022-02-25 19:21:38.746771','comments')
2813
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2814
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
2815
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2816
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:21:38.748173"], ["id", 1]]
2817
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:21:38.748703"], ["id", 1]]
2818
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2819
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
2820
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2821
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2822
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:21:38.749982"], ["updated_at", "2022-02-25 19:21:38.749982"]]
2823
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2824
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2825
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:21:38.750934"], ["updated_at", "2022-02-25 19:21:38.750934"]]
2826
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2827
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2828
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
2829
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2830
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2831
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2832
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2833
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
2834
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
2835
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
2836
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
2837
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
2838
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:21:38.597166"], ["id", 1]]
2839
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:21:38.738636"], ["updated_at", "2022-02-25 19:21:38.738636"]]
2840
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2841
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
2842
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
2843
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
2844
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2845
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2846
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2847
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2848
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2849
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2850
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2851
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2852
+ TRANSACTION (0.5ms) rollback transaction
2853
+ TRANSACTION (0.0ms) begin transaction
568
2854
  -----------------------------------------------
569
2855
  InstallGeneratorTest: test_should_add_migration
570
2856
  -----------------------------------------------
@@ -573,6 +2859,8 @@ InstallGeneratorTest: test_should_add_migration
573
2859
  ------------------------------------------------
574
2860
  SnapshotsConcernTest: test_has_snapshot_children
575
2861
  ------------------------------------------------
2862
+ Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
2863
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
576
2864
  TRANSACTION (0.1ms) rollback transaction
577
2865
  TRANSACTION (0.0ms) begin transaction
578
2866
  ----------------------------------------
@@ -584,12 +2872,12 @@ SnapshotsConcernTest: test_relationships
584
2872
  SnapshotsConcernTest: test_create_snapshot!
585
2873
  -------------------------------------------
586
2874
  Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
587
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
2875
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
588
2876
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
589
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:28:46.720422"]]
590
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
591
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
592
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2877
+ ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:21:38.788191"]]
2878
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
2879
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2880
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
593
2881
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
594
2882
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
595
2883
  ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
@@ -597,21 +2885,21 @@ id: 1
597
2885
  a: 2
598
2886
  b: 4
599
2887
  created_at: !ruby/object:ActiveSupport::TimeWithZone
600
- utc: 2021-08-19 23:28:46.603059000 Z
2888
+ utc: 2022-02-25 19:21:38.597166000 Z
601
2889
  zone: &1 !ruby/object:ActiveSupport::TimeZone
602
2890
  name: Etc/UTC
603
- time: 2021-08-19 23:28:46.603059000 Z
2891
+ time: 2022-02-25 19:21:38.597166000 Z
604
2892
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
605
- utc: 2021-08-19 23:28:46.603059000 Z
2893
+ utc: 2022-02-25 19:21:38.597166000 Z
606
2894
  zone: *1
607
- time: 2021-08-19 23:28:46.603059000 Z
608
- ','2021-08-19 23:28:46.723268',NULL)
2895
+ time: 2022-02-25 19:21:38.597166000 Z
2896
+ ','2022-02-25 19:21:38.792986',NULL)
609
2897
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
610
2898
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
611
2899
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
612
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.725154"]]
613
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
614
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2900
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.795333"]]
2901
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
2902
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
615
2903
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
616
2904
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
617
2905
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
@@ -620,21 +2908,21 @@ id: 1
620
2908
  a: 2
621
2909
  b: 4
622
2910
  created_at: !ruby/object:ActiveSupport::TimeWithZone
623
- utc: 2021-08-19 23:28:46.603059000 Z
2911
+ utc: 2022-02-25 19:21:38.597166000 Z
624
2912
  zone: &1 !ruby/object:ActiveSupport::TimeZone
625
2913
  name: Etc/UTC
626
- time: 2021-08-19 23:28:46.603059000 Z
2914
+ time: 2022-02-25 19:21:38.597166000 Z
627
2915
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
628
- utc: 2021-08-19 23:28:46.603059000 Z
2916
+ utc: 2022-02-25 19:21:38.597166000 Z
629
2917
  zone: *1
630
- time: 2021-08-19 23:28:46.603059000 Z
631
- ','2021-08-19 23:28:46.727906',NULL)
2918
+ time: 2022-02-25 19:21:38.597166000 Z
2919
+ ','2022-02-25 19:21:38.798731',NULL)
632
2920
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
633
2921
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
634
2922
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
635
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:28:46.729775"]]
2923
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:21:38.800642"]]
636
2924
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
637
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2925
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
638
2926
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
639
2927
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
640
2928
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
@@ -643,131 +2931,94 @@ id: 1
643
2931
  a: 2
644
2932
  b: 4
645
2933
  created_at: !ruby/object:ActiveSupport::TimeWithZone
646
- utc: 2021-08-19 23:28:46.603059000 Z
2934
+ utc: 2022-02-25 19:21:38.597166000 Z
647
2935
  zone: &1 !ruby/object:ActiveSupport::TimeZone
648
2936
  name: Etc/UTC
649
- time: 2021-08-19 23:28:46.603059000 Z
2937
+ time: 2022-02-25 19:21:38.597166000 Z
650
2938
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
651
- utc: 2021-08-19 23:28:46.603059000 Z
2939
+ utc: 2022-02-25 19:21:38.597166000 Z
652
2940
  zone: *1
653
- time: 2021-08-19 23:28:46.603059000 Z
654
- ','2021-08-19 23:28:46.732939',NULL)
2941
+ time: 2022-02-25 19:21:38.597166000 Z
2942
+ ','2022-02-25 19:21:38.803548',NULL)
655
2943
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
656
2944
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
657
2945
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
658
- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
659
- TRANSACTION (0.4ms) rollback transaction
660
- TRANSACTION (0.0ms) begin transaction
661
- -----------------------------
662
- SnapshotItemTest: test_object
663
- -----------------------------
664
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
665
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
666
- TRANSACTION (0.0ms) rollback transaction
667
- TRANSACTION (0.0ms) begin transaction
668
- ----------------------------------
669
- SnapshotItemTest: test_validations
670
- ----------------------------------
671
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
672
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
673
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
674
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
675
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
676
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
677
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
678
- TRANSACTION (0.0ms) rollback transaction
679
- TRANSACTION (0.0ms) begin transaction
680
- ------------------------------------
681
- SnapshotItemTest: test_restore_item!
682
- ------------------------------------
683
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
684
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
685
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
686
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
687
- Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
688
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2946
+ TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
689
2947
  TRANSACTION (0.3ms) rollback transaction
690
- TRANSACTION (0.0ms) begin transaction
691
- ------------------------------------
692
- SnapshotItemTest: test_relationships
693
- ------------------------------------
694
- TRANSACTION (0.0ms) rollback transaction
695
-  (1.5ms) SELECT sqlite_version(*)
696
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
697
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2948
+  (1.0ms) SELECT sqlite_version(*)
2949
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2950
+ ActiveRecord::SchemaMigration Pluck (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
698
2951
  ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
699
-  (1.9ms) DELETE FROM posts;
700
-  (1.3ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
701
-  (1.2ms) DELETE FROM snapshots;
702
-  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
703
-  (1.1ms) DELETE FROM snapshot_items;
704
-  (1.0ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
2952
+  (6.5ms) DELETE FROM posts;
2953
+  (0.8ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
2954
+  (0.8ms) DELETE FROM snapshots;
2955
+  (0.7ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
2956
+  (0.8ms) DELETE FROM snapshot_items;
2957
+  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
705
2958
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
706
2959
  TRANSACTION (0.0ms) begin transaction
707
- Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:11.308109"], ["updated_at", "2021-08-19 23:29:11.308109"]]
708
- TRANSACTION (0.6ms) commit transaction
2960
+ Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2022-02-25 19:22:05.476133"], ["updated_at", "2022-02-25 19:22:05.476133"]]
2961
+ TRANSACTION (0.7ms) commit transaction
709
2962
  TRANSACTION (0.0ms) begin transaction
710
2963
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
711
- ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.320795"]]
712
- TRANSACTION (0.6ms) commit transaction
2964
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.490924"]]
2965
+ TRANSACTION (0.7ms) commit transaction
713
2966
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
714
2967
  Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
715
2968
  Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
716
2969
   (0.0ms) SELECT sqlite_version(*)
717
2970
  TRANSACTION (0.0ms) begin transaction
718
- ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
2971
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
719
2972
  id: 1
720
2973
  a: 1
721
2974
  b: 3
722
2975
  created_at: !ruby/object:ActiveSupport::TimeWithZone
723
- utc: &1 2021-08-19 23:29:11.308109000 Z
2976
+ utc: &1 2022-02-25 19:22:05.476133000 Z
724
2977
  zone: &2 !ruby/object:ActiveSupport::TimeZone
725
2978
  name: Etc/UTC
726
- time: 2021-08-19 23:29:11.308109000 Z
2979
+ time: 2022-02-25 19:22:05.476133000 Z
727
2980
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
728
2981
  utc: *1
729
2982
  zone: *2
730
- time: 2021-08-19 23:29:11.308109000 Z
731
- ','2021-08-19 23:29:11.336271',NULL)
732
- TRANSACTION (0.6ms) commit transaction
733
- Post Update (0.6ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
2983
+ time: 2022-02-25 19:22:05.476133000 Z
2984
+ ','2022-02-25 19:22:05.509251',NULL)
2985
+ TRANSACTION (0.7ms) commit transaction
2986
+ Post Update (0.8ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
734
2987
  TRANSACTION (0.0ms) begin transaction
735
2988
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
736
- ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.339527"]]
737
- TRANSACTION (0.5ms) commit transaction
2989
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.513970"]]
2990
+ TRANSACTION (0.6ms) commit transaction
738
2991
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
739
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
740
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
2992
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
2993
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
741
2994
  TRANSACTION (0.0ms) begin transaction
742
- ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
2995
+ ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
743
2996
  id: 1
744
2997
  a: 2
745
2998
  b: 4
746
2999
  created_at: !ruby/object:ActiveSupport::TimeWithZone
747
- utc: &1 2021-08-19 23:29:11.308109000 Z
3000
+ utc: &1 2022-02-25 19:22:05.476133000 Z
748
3001
  zone: &2 !ruby/object:ActiveSupport::TimeZone
749
3002
  name: Etc/UTC
750
- time: 2021-08-19 23:29:11.308109000 Z
3003
+ time: 2022-02-25 19:22:05.476133000 Z
751
3004
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
752
3005
  utc: *1
753
3006
  zone: *2
754
- time: 2021-08-19 23:29:11.308109000 Z
755
- ','2021-08-19 23:29:11.342050',NULL)
756
- TRANSACTION (0.4ms) commit transaction
757
- TRANSACTION (0.0ms) begin transaction
758
- ------------------------------
759
- SnapshotTest: test_validations
760
- ------------------------------
761
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
762
- ActiveSnapshot::Snapshot Exists? (0.0ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
763
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
764
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
765
- TRANSACTION (0.0ms) rollback transaction
766
- TRANSACTION (0.0ms) begin transaction
3007
+ time: 2022-02-25 19:22:05.476133000 Z
3008
+ ','2022-02-25 19:22:05.517708',NULL)
3009
+ TRANSACTION (0.6ms) commit transaction
3010
+ TRANSACTION (0.1ms) begin transaction
767
3011
  ---------------------------
768
3012
  SnapshotTest: test_metadata
769
3013
  ---------------------------
3014
+ ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
3015
+ TRANSACTION (0.1ms) rollback transaction
3016
+ TRANSACTION (0.0ms) begin transaction
3017
+ --------------------------------------
3018
+ SnapshotTest: test_fetch_reified_items
3019
+ --------------------------------------
770
3020
  ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
3021
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
771
3022
  TRANSACTION (0.0ms) rollback transaction
772
3023
  TRANSACTION (0.0ms) begin transaction
773
3024
  --------------------------------
@@ -775,480 +3026,310 @@ SnapshotTest: test_relationships
775
3026
  --------------------------------
776
3027
  TRANSACTION (0.0ms) rollback transaction
777
3028
  TRANSACTION (0.0ms) begin transaction
778
- --------------------------
779
- SnapshotTest: test_restore
780
- --------------------------
781
- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
782
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
783
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
784
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
785
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
786
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
787
- ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
788
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
789
- Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
790
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
791
- TRANSACTION (0.2ms) rollback transaction
792
- TRANSACTION (0.0ms) begin transaction
793
- --------------------------------------
794
- SnapshotTest: test_fetch_reified_items
795
- --------------------------------------
796
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
797
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
798
- TRANSACTION (0.0ms) rollback transaction
799
- TRANSACTION (0.0ms) begin transaction
800
- --------------------------------------
801
- SnapshotTest: test_build_snapshot_item
802
- --------------------------------------
803
- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
804
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
805
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
3029
+ ------------------------------
3030
+ SnapshotTest: test_validations
3031
+ ------------------------------
3032
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
3033
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
3034
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
3035
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
806
3036
  TRANSACTION (0.0ms) rollback transaction
807
3037
  TRANSACTION (0.0ms) begin transaction
808
- -------------------------------------------
809
- ActiveSnapshotTest: test_snapshot_lifecycle
810
- -------------------------------------------
811
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
3038
+ ----------------------------------------------------------
3039
+ SnapshotTest: test_single_model_snapshots_without_children
3040
+ ----------------------------------------------------------
812
3041
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
813
- Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]]
3042
+ ParentWithoutChildren Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:22:05.566200"], ["updated_at", "2022-02-25 19:22:05.566200"]]
814
3043
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
815
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
816
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
817
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
818
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
819
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.386301"]]
3044
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3045
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
3046
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "ParentWithoutChildren"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.569864"]]
820
3047
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
821
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
822
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
823
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
824
3048
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
825
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
826
- id: 1
827
- a: 2
828
- b: 4
829
- created_at: !ruby/object:ActiveSupport::TimeWithZone
830
- utc: 2021-08-19 23:29:11.308109000 Z
831
- zone: &1 !ruby/object:ActiveSupport::TimeZone
832
- name: Etc/UTC
833
- time: 2021-08-19 23:29:11.308109000 Z
834
- updated_at: !ruby/object:ActiveSupport::TimeWithZone
835
- utc: 2021-08-19 23:29:11.308109000 Z
836
- zone: *1
837
- time: 2021-08-19 23:29:11.308109000 Z
838
- ','2021-08-19 23:29:11.389012',NULL),(NULL,3,'Comment',1,'---
839
- id: 1
840
- content: foo
841
- post_id: 1
3049
+ ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'ParentWithoutChildren',2,'---
3050
+ id: 2
3051
+ a: 1
3052
+ b: 2
842
3053
  created_at: !ruby/object:ActiveSupport::TimeWithZone
843
- utc: 2021-08-19 23:29:11.384159000 Z
844
- zone: &1 !ruby/object:ActiveSupport::TimeZone
3054
+ utc: &1 2022-02-25 19:22:05.566200000 Z
3055
+ zone: &2 !ruby/object:ActiveSupport::TimeZone
845
3056
  name: Etc/UTC
846
- time: 2021-08-19 23:29:11.384159000 Z
3057
+ time: 2022-02-25 19:22:05.566200000 Z
847
3058
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
848
- utc: 2021-08-19 23:29:11.384159000 Z
849
- zone: *1
850
- time: 2021-08-19 23:29:11.384159000 Z
851
- ','2021-08-19 23:29:11.389012','comments')
852
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
853
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
854
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
855
- Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:11.390035"], ["id", 1]]
856
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:11.390390"], ["id", 1]]
857
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
858
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
859
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
860
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
861
- Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391260"], ["updated_at", "2021-08-19 23:29:11.391260"]]
3059
+ utc: *1
3060
+ zone: *2
3061
+ time: 2022-02-25 19:22:05.566200000 Z
3062
+ ','2022-02-25 19:22:05.572027',NULL)
862
3063
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
863
3064
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
864
- Comment Create (0.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.391968"], ["updated_at", "2021-08-19 23:29:11.391968"]]
3065
+ ParentWithoutChildren Update (0.1ms) UPDATE "posts" SET "a" = ?, "b" = ?, "updated_at" = ? WHERE "posts"."id" = ? [["a", 9], ["b", 9], ["updated_at", "2022-02-25 19:22:05.572967"], ["id", 2]]
865
3066
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
866
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
867
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
868
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
869
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
870
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
871
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
3067
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "ParentWithoutChildren"], ["LIMIT", 1]]
872
3068
  ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
873
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
874
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
875
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
876
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
877
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:29:11.308109"], ["id", 1]]
878
- Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:11.384159"], ["updated_at", "2021-08-19 23:29:11.384159"]]
879
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
880
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
881
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
882
-  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
883
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
884
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
885
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
886
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
887
-  (0.0ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
888
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
889
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
890
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
891
- TRANSACTION (0.3ms) rollback transaction
892
- TRANSACTION (0.0ms) begin transaction
893
- ----------------------------------------
894
- ActiveSnapshotTest: test_exposes_version
895
- ----------------------------------------
896
- TRANSACTION (0.0ms) rollback transaction
897
- TRANSACTION (0.0ms) begin transaction
898
- --------------------------------------------
899
- ActiveSnapshotTest: test_exposes_main_module
900
- --------------------------------------------
901
- TRANSACTION (0.0ms) rollback transaction
902
- TRANSACTION (0.0ms) begin transaction
903
- ------------------------------------
904
- SnapshotItemTest: test_relationships
905
- ------------------------------------
906
- TRANSACTION (0.0ms) rollback transaction
907
- TRANSACTION (0.0ms) begin transaction
908
- ------------------------------------
909
- SnapshotItemTest: test_restore_item!
910
- ------------------------------------
911
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
912
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
913
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
914
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
915
- Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
916
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
917
- TRANSACTION (0.2ms) rollback transaction
918
- TRANSACTION (0.0ms) begin transaction
919
- ----------------------------------
920
- SnapshotItemTest: test_validations
921
- ----------------------------------
922
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
923
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
924
- ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
925
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
926
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
927
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
928
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
929
- TRANSACTION (0.0ms) rollback transaction
3069
+ TRANSACTION (0.4ms) rollback transaction
930
3070
  TRANSACTION (0.0ms) begin transaction
931
- -----------------------------
932
- SnapshotItemTest: test_object
933
- -----------------------------
3071
+ --------------------------
3072
+ SnapshotTest: test_restore
3073
+ --------------------------
934
3074
  ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
935
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
936
- TRANSACTION (0.0ms) rollback transaction
937
- TRANSACTION (0.0ms) begin transaction
938
- -------------------------------------------
939
- SnapshotsConcernTest: test_create_snapshot!
940
- -------------------------------------------
941
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
942
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
943
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
944
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:29:11.411538"]]
945
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
946
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
947
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
948
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
949
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
950
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
951
- id: 1
952
- a: 2
953
- b: 4
954
- created_at: !ruby/object:ActiveSupport::TimeWithZone
955
- utc: 2021-08-19 23:29:11.308109000 Z
956
- zone: &1 !ruby/object:ActiveSupport::TimeZone
957
- name: Etc/UTC
958
- time: 2021-08-19 23:29:11.308109000 Z
959
- updated_at: !ruby/object:ActiveSupport::TimeWithZone
960
- utc: 2021-08-19 23:29:11.308109000 Z
961
- zone: *1
962
- time: 2021-08-19 23:29:11.308109000 Z
963
- ','2021-08-19 23:29:11.413742',NULL)
964
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
965
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
966
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
967
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.415146"]]
968
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
969
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
970
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
971
- Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
972
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
973
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
974
- id: 1
975
- a: 2
976
- b: 4
977
- created_at: !ruby/object:ActiveSupport::TimeWithZone
978
- utc: 2021-08-19 23:29:11.308109000 Z
979
- zone: &1 !ruby/object:ActiveSupport::TimeZone
980
- name: Etc/UTC
981
- time: 2021-08-19 23:29:11.308109000 Z
982
- updated_at: !ruby/object:ActiveSupport::TimeWithZone
983
- utc: 2021-08-19 23:29:11.308109000 Z
984
- zone: *1
985
- time: 2021-08-19 23:29:11.308109000 Z
986
- ','2021-08-19 23:29:11.417040',NULL)
987
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
988
3075
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
989
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
990
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:11.418345"]]
991
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
3076
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
992
3077
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
993
3078
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
994
3079
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
995
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
996
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,5,'Post',1,'---
997
- id: 1
998
- a: 2
999
- b: 4
1000
- created_at: !ruby/object:ActiveSupport::TimeWithZone
1001
- utc: 2021-08-19 23:29:11.308109000 Z
1002
- zone: &1 !ruby/object:ActiveSupport::TimeZone
1003
- name: Etc/UTC
1004
- time: 2021-08-19 23:29:11.308109000 Z
1005
- updated_at: !ruby/object:ActiveSupport::TimeWithZone
1006
- utc: 2021-08-19 23:29:11.308109000 Z
1007
- zone: *1
1008
- time: 2021-08-19 23:29:11.308109000 Z
1009
- ','2021-08-19 23:29:11.420235',NULL)
3080
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
3081
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
3082
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1010
3083
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1011
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
1012
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1013
- TRANSACTION (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1014
3084
  TRANSACTION (0.3ms) rollback transaction
1015
3085
  TRANSACTION (0.0ms) begin transaction
1016
- ------------------------------------------------
1017
- SnapshotsConcernTest: test_has_snapshot_children
1018
- ------------------------------------------------
1019
- Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
1020
- Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
1021
- TRANSACTION (0.0ms) rollback transaction
1022
- TRANSACTION (0.0ms) begin transaction
1023
- ----------------------------------------
1024
- SnapshotsConcernTest: test_relationships
1025
- ----------------------------------------
3086
+ --------------------------------------
3087
+ SnapshotTest: test_build_snapshot_item
3088
+ --------------------------------------
3089
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
3090
+ Post Load (0.3ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
3091
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1026
3092
  TRANSACTION (0.0ms) rollback transaction
1027
3093
  TRANSACTION (0.0ms) begin transaction
1028
- -----------------------------------------------
1029
- InstallGeneratorTest: test_should_add_migration
1030
- -----------------------------------------------
1031
- TRANSACTION (0.1ms) rollback transaction
1032
-  (1.4ms) SELECT sqlite_version(*)
1033
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1034
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1035
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
1036
-  (1.8ms) DELETE FROM posts;
1037
-  (1.2ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'posts';
1038
-  (1.1ms) DELETE FROM snapshots;
1039
-  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshots';
1040
-  (0.9ms) DELETE FROM snapshot_items;
1041
-  (0.9ms) UPDATE `sqlite_sequence` SET `seq` = 0 WHERE `name` = 'snapshot_items';
1042
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."a" = ? AND "posts"."b" = ? LIMIT ? [["a", 1], ["b", 3], ["LIMIT", 1]]
1043
- TRANSACTION (0.0ms) begin transaction
1044
- Post Create (0.3ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 3], ["created_at", "2021-08-19 23:29:21.079132"], ["updated_at", "2021-08-19 23:29:21.079132"]]
1045
- TRANSACTION (0.8ms) commit transaction
1046
- TRANSACTION (0.0ms) begin transaction
1047
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1048
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.092194"]]
1049
- TRANSACTION (0.8ms) commit transaction
1050
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1051
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1052
- Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1053
-  (0.0ms) SELECT sqlite_version(*)
1054
- TRANSACTION (0.0ms) begin transaction
1055
- ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,1,'Post',1,'---
1056
- id: 1
3094
+ -----------------------------------------------------
3095
+ SnapshotTest: test_fetch_reified_items_with_sti_class
3096
+ -----------------------------------------------------
3097
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3098
+ SubPost Create (0.5ms) INSERT INTO "posts" ("a", "b", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["a", 1], ["b", 2], ["created_at", "2022-02-25 19:22:05.589975"], ["updated_at", "2022-02-25 19:22:05.589975"]]
3099
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
3100
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3101
+ Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "Example comment"], ["post_id", 2], ["created_at", "2022-02-25 19:22:05.594950"], ["updated_at", "2022-02-25 19:22:05.594950"]]
3102
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
3103
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
3104
+ ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
3105
+ ActiveSnapshot::Snapshot Create (0.2ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 2], ["identifier", "v1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.597775"]]
3106
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
3107
+ SubPost Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
3108
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 2]]
3109
+ Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 2]]
3110
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3111
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'SubPost',2,'---
3112
+ id: 2
1057
3113
  a: 1
1058
- b: 3
3114
+ b: 2
1059
3115
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1060
- utc: &1 2021-08-19 23:29:21.079132000 Z
3116
+ utc: &1 2022-02-25 19:22:05.589975000 Z
1061
3117
  zone: &2 !ruby/object:ActiveSupport::TimeZone
1062
3118
  name: Etc/UTC
1063
- time: 2021-08-19 23:29:21.079132000 Z
3119
+ time: 2022-02-25 19:22:05.589975000 Z
1064
3120
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1065
3121
  utc: *1
1066
3122
  zone: *2
1067
- time: 2021-08-19 23:29:21.079132000 Z
1068
- ','2021-08-19 23:29:21.107905',NULL)
1069
- TRANSACTION (1.0ms) commit transaction
1070
- Post Update (1.0ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 2], ["b", 4], ["id", 1]]
1071
- TRANSACTION (0.0ms) begin transaction
1072
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1073
- ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "v2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.113375"]]
1074
- TRANSACTION (0.8ms) commit transaction
1075
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1076
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1077
- Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1078
- TRANSACTION (0.0ms) begin transaction
1079
- ActiveSnapshot::SnapshotItem Create Many (0.3ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,2,'Post',1,'---
3123
+ time: 2022-02-25 19:22:05.589975000 Z
3124
+ ','2022-02-25 19:22:05.602664',NULL),(NULL,3,'Comment',1,'---
1080
3125
  id: 1
1081
- a: 2
1082
- b: 4
3126
+ content: Example comment
3127
+ post_id: 2
1083
3128
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1084
- utc: &1 2021-08-19 23:29:21.079132000 Z
1085
- zone: &2 !ruby/object:ActiveSupport::TimeZone
3129
+ utc: 2022-02-25 19:22:05.594950000 Z
3130
+ zone: &1 !ruby/object:ActiveSupport::TimeZone
1086
3131
  name: Etc/UTC
1087
- time: 2021-08-19 23:29:21.079132000 Z
3132
+ time: 2022-02-25 19:22:05.594950000 Z
1088
3133
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1089
- utc: *1
1090
- zone: *2
1091
- time: 2021-08-19 23:29:21.079132000 Z
1092
- ','2021-08-19 23:29:21.117615',NULL)
1093
- TRANSACTION (0.6ms) commit transaction
1094
- TRANSACTION (0.0ms) begin transaction
1095
- ----------------------------------------
1096
- ActiveSnapshotTest: test_exposes_version
1097
- ----------------------------------------
1098
- TRANSACTION (0.0ms) rollback transaction
3134
+ utc: 2022-02-25 19:22:05.594950000 Z
3135
+ zone: *1
3136
+ time: 2022-02-25 19:22:05.594950000 Z
3137
+ ','2022-02-25 19:22:05.602664','comments')
3138
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
3139
+ ActiveSnapshot::Snapshot Load (0.0ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 2], ["item_type", "Post"], ["LIMIT", 1]]
3140
+ ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
3141
+ TRANSACTION (0.5ms) rollback transaction
1099
3142
  TRANSACTION (0.0ms) begin transaction
1100
3143
  -------------------------------------------
1101
3144
  ActiveSnapshotTest: test_snapshot_lifecycle
1102
3145
  -------------------------------------------
1103
3146
  Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1104
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
1105
- Comment Create (0.2ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]]
3147
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3148
+ Comment Create (0.3ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:22:05.609561"], ["updated_at", "2022-02-25 19:22:05.609561"]]
1106
3149
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1107
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
1108
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
3150
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
3151
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1109
3152
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
1110
3153
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "snapshot-1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1111
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.151063"]]
3154
+ ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "snapshot-1"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.612792"]]
1112
3155
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1113
3156
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1114
3157
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1115
3158
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1116
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
1117
- ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
3159
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3160
+ ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1118
3161
  id: 1
1119
3162
  a: 2
1120
3163
  b: 4
1121
3164
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1122
- utc: 2021-08-19 23:29:21.079132000 Z
3165
+ utc: 2022-02-25 19:22:05.476133000 Z
1123
3166
  zone: &1 !ruby/object:ActiveSupport::TimeZone
1124
3167
  name: Etc/UTC
1125
- time: 2021-08-19 23:29:21.079132000 Z
3168
+ time: 2022-02-25 19:22:05.476133000 Z
1126
3169
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1127
- utc: 2021-08-19 23:29:21.079132000 Z
3170
+ utc: 2022-02-25 19:22:05.476133000 Z
1128
3171
  zone: *1
1129
- time: 2021-08-19 23:29:21.079132000 Z
1130
- ','2021-08-19 23:29:21.153591',NULL),(NULL,3,'Comment',1,'---
3172
+ time: 2022-02-25 19:22:05.476133000 Z
3173
+ ','2022-02-25 19:22:05.616971',NULL),(NULL,3,'Comment',1,'---
1131
3174
  id: 1
1132
3175
  content: foo
1133
3176
  post_id: 1
1134
3177
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1135
- utc: 2021-08-19 23:29:21.148886000 Z
3178
+ utc: 2022-02-25 19:22:05.609561000 Z
1136
3179
  zone: &1 !ruby/object:ActiveSupport::TimeZone
1137
3180
  name: Etc/UTC
1138
- time: 2021-08-19 23:29:21.148886000 Z
3181
+ time: 2022-02-25 19:22:05.609561000 Z
1139
3182
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1140
- utc: 2021-08-19 23:29:21.148886000 Z
3183
+ utc: 2022-02-25 19:22:05.609561000 Z
1141
3184
  zone: *1
1142
- time: 2021-08-19 23:29:21.148886000 Z
1143
- ','2021-08-19 23:29:21.153591','comments')
3185
+ time: 2022-02-25 19:22:05.609561000 Z
3186
+ ','2022-02-25 19:22:05.616971','comments')
1144
3187
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1145
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1146
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
1147
- Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:21.154558"], ["id", 1]]
1148
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-20 23:29:21.154916"], ["id", 1]]
1149
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
1150
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
3188
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
3189
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
3190
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:22:05.618983"], ["id", 1]]
3191
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-26 19:22:05.620010"], ["id", 1]]
3192
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3193
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1151
3194
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1152
3195
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
1153
- Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.155758"], ["updated_at", "2021-08-19 23:29:21.155758"]]
3196
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:22:05.621430"], ["updated_at", "2022-02-25 19:22:05.621430"]]
1154
3197
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1155
3198
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
1156
- Comment Create (0.0ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.156425"], ["updated_at", "2021-08-19 23:29:21.156425"]]
3199
+ Comment Create (0.1ms) INSERT INTO "comments" ("content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["content", "bar"], ["post_id", 1], ["created_at", "2022-02-25 19:22:05.622705"], ["updated_at", "2022-02-25 19:22:05.622705"]]
1157
3200
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1158
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
1159
-  (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
3201
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots"
3202
+ ActiveSnapshot::SnapshotItem Count (0.0ms) SELECT COUNT(*) FROM "snapshot_items"
1160
3203
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
1161
3204
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1162
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
3205
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1163
3206
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1164
- ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
1165
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1166
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
1167
- Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
3207
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 3]]
3208
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
3209
+ Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = ? [["id", 1]]
3210
+ Comment Destroy (0.1ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 2]]
1168
3211
  Comment Destroy (0.0ms) DELETE FROM "comments" WHERE "comments"."id" = ? [["id", 3]]
1169
- Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2021-08-19 23:29:21.079132"], ["id", 1]]
1170
- Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2021-08-19 23:29:21.148886"], ["updated_at", "2021-08-19 23:29:21.148886"]]
1171
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
1172
-  (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
1173
-  (0.0ms) SELECT COUNT(*) FROM "snapshots"
1174
-  (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
1175
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1176
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1177
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
3212
+ Post Update (0.1ms) UPDATE "posts" SET "updated_at" = ? WHERE "posts"."id" = ? [["updated_at", "2022-02-25 19:22:05.476133"], ["id", 1]]
3213
+ Comment Create (0.1ms) INSERT INTO "comments" ("id", "content", "post_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 1], ["content", "foo"], ["post_id", 1], ["created_at", "2022-02-25 19:22:05.609561"], ["updated_at", "2022-02-25 19:22:05.609561"]]
3214
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
3215
+ ActiveSnapshot::SnapshotItem Count (0.1ms) SELECT COUNT(*) FROM "snapshot_items"
3216
+ ActiveSnapshot::Snapshot Count (0.0ms) SELECT COUNT(*) FROM "snapshots"
3217
+ ActiveSnapshot::Snapshot Count (0.1ms) SELECT COUNT(*) FROM "snapshots" WHERE "snapshots"."identifier" = ? [["identifier", "snapshot-1"]]
3218
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
3219
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
3220
+ Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1178
3221
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1179
-  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
3222
+ Comment Count (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1180
3223
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1181
3224
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1182
3225
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1183
- TRANSACTION (0.3ms) rollback transaction
3226
+ TRANSACTION (0.4ms) rollback transaction
1184
3227
  TRANSACTION (0.0ms) begin transaction
1185
3228
  --------------------------------------------
1186
3229
  ActiveSnapshotTest: test_exposes_main_module
1187
3230
  --------------------------------------------
1188
3231
  TRANSACTION (0.0ms) rollback transaction
1189
3232
  TRANSACTION (0.0ms) begin transaction
1190
- ------------------------------------------------
1191
- SnapshotsConcernTest: test_has_snapshot_children
1192
- ------------------------------------------------
1193
- Post Load (0.2ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
1194
- Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
3233
+ ----------------------------------------
3234
+ ActiveSnapshotTest: test_exposes_version
3235
+ ----------------------------------------
3236
+ TRANSACTION (0.0ms) rollback transaction
3237
+ TRANSACTION (0.0ms) begin transaction
3238
+ ------------------------------------
3239
+ SnapshotItemTest: test_relationships
3240
+ ------------------------------------
3241
+ TRANSACTION (0.0ms) rollback transaction
3242
+ TRANSACTION (0.0ms) begin transaction
3243
+ -----------------------------
3244
+ SnapshotItemTest: test_object
3245
+ -----------------------------
3246
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
3247
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
3248
+ TRANSACTION (0.0ms) rollback transaction
3249
+ TRANSACTION (0.1ms) begin transaction
3250
+ ----------------------------------
3251
+ SnapshotItemTest: test_validations
3252
+ ----------------------------------
3253
+ ActiveSnapshot::SnapshotItem Exists? (0.2ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
3254
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
3255
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
3256
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
3257
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
3258
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
3259
+ ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1195
3260
  TRANSACTION (0.0ms) rollback transaction
1196
3261
  TRANSACTION (0.0ms) begin transaction
3262
+ ------------------------------------
3263
+ SnapshotItemTest: test_restore_item!
3264
+ ------------------------------------
3265
+ ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
3266
+ ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
3267
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
3268
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
3269
+ Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
3270
+ TRANSACTION (0.2ms) RELEASE SAVEPOINT active_record_1
3271
+ TRANSACTION (0.5ms) rollback transaction
3272
+ TRANSACTION (0.0ms) begin transaction
3273
+ ----------------------------------------
3274
+ SnapshotsConcernTest: test_relationships
3275
+ ----------------------------------------
3276
+ TRANSACTION (0.1ms) rollback transaction
3277
+ TRANSACTION (0.0ms) begin transaction
1197
3278
  -------------------------------------------
1198
3279
  SnapshotsConcernTest: test_create_snapshot!
1199
3280
  -------------------------------------------
1200
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1201
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
3281
+ Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
3282
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1202
3283
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1203
- ActiveSnapshot::Snapshot Create (0.3ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2021-08-19 23:29:21.176506"]]
1204
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
3284
+ ActiveSnapshot::Snapshot Create (0.4ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 1"], ["metadata", "---\n:foo: :bar\n"], ["created_at", "2022-02-25 19:22:05.657495"]]
3285
+ TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
1205
3286
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1206
3287
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1207
- Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1208
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
3288
+ Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
3289
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1209
3290
  ActiveSnapshot::SnapshotItem Create Many (0.2ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,3,'Post',1,'---
1210
3291
  id: 1
1211
3292
  a: 2
1212
3293
  b: 4
1213
3294
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1214
- utc: 2021-08-19 23:29:21.079132000 Z
3295
+ utc: 2022-02-25 19:22:05.476133000 Z
1215
3296
  zone: &1 !ruby/object:ActiveSupport::TimeZone
1216
3297
  name: Etc/UTC
1217
- time: 2021-08-19 23:29:21.079132000 Z
3298
+ time: 2022-02-25 19:22:05.476133000 Z
1218
3299
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1219
- utc: 2021-08-19 23:29:21.079132000 Z
3300
+ utc: 2022-02-25 19:22:05.476133000 Z
1220
3301
  zone: *1
1221
- time: 2021-08-19 23:29:21.079132000 Z
1222
- ','2021-08-19 23:29:21.179444',NULL)
3302
+ time: 2022-02-25 19:22:05.476133000 Z
3303
+ ','2022-02-25 19:22:05.661726',NULL)
1223
3304
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1224
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
3305
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1225
3306
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 2"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1226
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.182276"]]
3307
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 2"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.663723"]]
1227
3308
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1228
3309
  Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1229
3310
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1230
3311
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1231
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
3312
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
1232
3313
  ActiveSnapshot::SnapshotItem Create Many (0.1ms) INSERT INTO "snapshot_items" ("id","snapshot_id","item_type","item_id","object","created_at","child_group_name") VALUES (NULL,4,'Post',1,'---
1233
3314
  id: 1
1234
3315
  a: 2
1235
3316
  b: 4
1236
3317
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1237
- utc: 2021-08-19 23:29:21.079132000 Z
3318
+ utc: 2022-02-25 19:22:05.476133000 Z
1238
3319
  zone: &1 !ruby/object:ActiveSupport::TimeZone
1239
3320
  name: Etc/UTC
1240
- time: 2021-08-19 23:29:21.079132000 Z
3321
+ time: 2022-02-25 19:22:05.476133000 Z
1241
3322
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1242
- utc: 2021-08-19 23:29:21.079132000 Z
3323
+ utc: 2022-02-25 19:22:05.476133000 Z
1243
3324
  zone: *1
1244
- time: 2021-08-19 23:29:21.079132000 Z
1245
- ','2021-08-19 23:29:21.185087',NULL)
3325
+ time: 2022-02-25 19:22:05.476133000 Z
3326
+ ','2022-02-25 19:22:05.666294',NULL)
1246
3327
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1247
3328
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
1248
3329
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1249
- ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2021-08-19 23:29:21.186765"]]
3330
+ ActiveSnapshot::Snapshot Create (0.1ms) INSERT INTO "snapshots" ("item_type", "item_id", "identifier", "metadata", "created_at") VALUES (?, ?, ?, ?, ?) [["item_type", "Post"], ["item_id", 1], ["identifier", "foobar 3"], ["metadata", "--- {}\n"], ["created_at", "2022-02-25 19:22:05.679118"]]
1250
3331
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1251
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
3332
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1252
3333
  Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1253
3334
  Note Load (0.0ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1254
3335
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
@@ -1257,112 +3338,29 @@ id: 1
1257
3338
  a: 2
1258
3339
  b: 4
1259
3340
  created_at: !ruby/object:ActiveSupport::TimeWithZone
1260
- utc: 2021-08-19 23:29:21.079132000 Z
3341
+ utc: 2022-02-25 19:22:05.476133000 Z
1261
3342
  zone: &1 !ruby/object:ActiveSupport::TimeZone
1262
3343
  name: Etc/UTC
1263
- time: 2021-08-19 23:29:21.079132000 Z
3344
+ time: 2022-02-25 19:22:05.476133000 Z
1264
3345
  updated_at: !ruby/object:ActiveSupport::TimeWithZone
1265
- utc: 2021-08-19 23:29:21.079132000 Z
3346
+ utc: 2022-02-25 19:22:05.476133000 Z
1266
3347
  zone: *1
1267
- time: 2021-08-19 23:29:21.079132000 Z
1268
- ','2021-08-19 23:29:21.189732',NULL)
3348
+ time: 2022-02-25 19:22:05.476133000 Z
3349
+ ','2022-02-25 19:22:05.682462',NULL)
1269
3350
  TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1270
3351
  TRANSACTION (0.0ms) SAVEPOINT active_record_1
1271
3352
  ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "foobar 3"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1272
3353
  TRANSACTION (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1273
3354
  TRANSACTION (0.3ms) rollback transaction
1274
3355
  TRANSACTION (0.0ms) begin transaction
1275
- ----------------------------------------
1276
- SnapshotsConcernTest: test_relationships
1277
- ----------------------------------------
3356
+ ------------------------------------------------
3357
+ SnapshotsConcernTest: test_has_snapshot_children
3358
+ ------------------------------------------------
3359
+ Post Load (0.3ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
3360
+ Post Load (0.0ms) SELECT "posts".* FROM "posts" LIMIT ? [["LIMIT", 1]]
1278
3361
  TRANSACTION (0.1ms) rollback transaction
1279
- TRANSACTION (0.1ms) begin transaction
3362
+ TRANSACTION (0.0ms) begin transaction
1280
3363
  -----------------------------------------------
1281
3364
  InstallGeneratorTest: test_should_add_migration
1282
3365
  -----------------------------------------------
1283
3366
  TRANSACTION (0.1ms) rollback transaction
1284
- TRANSACTION (0.0ms) begin transaction
1285
- --------------------------------------
1286
- SnapshotTest: test_fetch_reified_items
1287
- --------------------------------------
1288
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1289
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1290
- TRANSACTION (0.0ms) rollback transaction
1291
- TRANSACTION (0.0ms) begin transaction
1292
- --------------------------------
1293
- SnapshotTest: test_relationships
1294
- --------------------------------
1295
- TRANSACTION (0.0ms) rollback transaction
1296
- TRANSACTION (0.0ms) begin transaction
1297
- --------------------------------------
1298
- SnapshotTest: test_build_snapshot_item
1299
- --------------------------------------
1300
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1301
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1302
- Post Load (0.0ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
1303
- TRANSACTION (0.0ms) rollback transaction
1304
- TRANSACTION (0.0ms) begin transaction
1305
- --------------------------
1306
- SnapshotTest: test_restore
1307
- --------------------------
1308
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1309
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
1310
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1311
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1312
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
1313
- Note Load (0.1ms) SELECT "notes".* FROM "notes" WHERE "notes"."post_id" = ? [["post_id", 1]]
1314
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1315
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? [["id", 1]]
1316
- Post Update (0.3ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1317
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1318
- TRANSACTION (0.2ms) rollback transaction
1319
- TRANSACTION (0.0ms) begin transaction
1320
- ------------------------------
1321
- SnapshotTest: test_validations
1322
- ------------------------------
1323
- ActiveSnapshot::Snapshot Load (0.2ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1324
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" IS NULL AND "snapshots"."item_id" IS NULL AND "snapshots"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1325
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "v1"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1326
- ActiveSnapshot::Snapshot Exists? (0.1ms) SELECT 1 AS one FROM "snapshots" WHERE "snapshots"."identifier" = ? AND "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? LIMIT ? [["identifier", "random"], ["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1327
- TRANSACTION (0.0ms) rollback transaction
1328
- TRANSACTION (0.0ms) begin transaction
1329
- ---------------------------
1330
- SnapshotTest: test_metadata
1331
- ---------------------------
1332
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1333
- TRANSACTION (0.0ms) rollback transaction
1334
- TRANSACTION (0.0ms) begin transaction
1335
- -----------------------------
1336
- SnapshotItemTest: test_object
1337
- -----------------------------
1338
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1339
- ActiveSnapshot::SnapshotItem Load (0.1ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1340
- TRANSACTION (0.0ms) rollback transaction
1341
- TRANSACTION (0.0ms) begin transaction
1342
- ----------------------------------
1343
- SnapshotItemTest: test_validations
1344
- ----------------------------------
1345
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_type" IS NULL LIMIT ? [["LIMIT", 1]]
1346
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" IS NULL AND "snapshot_items"."snapshot_id" IS NULL AND "snapshot_items"."item_id" IS NULL LIMIT ? [["LIMIT", 1]]
1347
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" WHERE "snapshots"."item_id" = ? AND "snapshots"."item_type" = ? ORDER BY "snapshots"."id" ASC LIMIT ? [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1348
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
1349
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Post"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1350
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_id" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_type" = ? LIMIT ? [["item_id", 1], ["snapshot_id", 1], ["item_type", "Foobar"], ["LIMIT", 1]]
1351
- ActiveSnapshot::SnapshotItem Exists? (0.1ms) SELECT 1 AS one FROM "snapshot_items" WHERE "snapshot_items"."item_type" = ? AND "snapshot_items"."snapshot_id" = ? AND "snapshot_items"."item_id" = ? LIMIT ? [["item_type", "Foobar"], ["snapshot_id", 1], ["item_id", 1], ["LIMIT", 1]]
1352
- TRANSACTION (0.0ms) rollback transaction
1353
- TRANSACTION (0.0ms) begin transaction
1354
- ------------------------------------
1355
- SnapshotItemTest: test_relationships
1356
- ------------------------------------
1357
- TRANSACTION (0.0ms) rollback transaction
1358
- TRANSACTION (0.0ms) begin transaction
1359
- ------------------------------------
1360
- SnapshotItemTest: test_restore_item!
1361
- ------------------------------------
1362
- ActiveSnapshot::Snapshot Load (0.1ms) SELECT "snapshots".* FROM "snapshots" ORDER BY "snapshots"."id" ASC LIMIT ? [["LIMIT", 1]]
1363
- ActiveSnapshot::SnapshotItem Load (0.0ms) SELECT "snapshot_items".* FROM "snapshot_items" WHERE "snapshot_items"."snapshot_id" = ? [["snapshot_id", 1]]
1364
- Post Load (0.0ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1365
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
1366
- Post Update (0.2ms) UPDATE "posts" SET "a" = ?, "b" = ? WHERE "posts"."id" = ? [["a", 1], ["b", 3], ["id", 1]]
1367
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1368
- TRANSACTION (0.2ms) rollback transaction