sortability 0.1.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2485 @@
1
+  (0.5ms) SELECT sqlite_version(*)
2
+  (0.4ms) SELECT sqlite_version(*)
3
+  (0.0ms) SELECT sqlite_version(*)
4
+  (0.0ms) SELECT sqlite_version(*)
5
+  (0.0ms) DROP TABLE IF EXISTS "containers"
6
+  (0.5ms) CREATE TABLE "containers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
7
+  (0.0ms) DROP TABLE IF EXISTS "items"
8
+  (0.3ms) CREATE TABLE "items" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "container_id" integer NOT NULL, "sort_position" integer NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
9
+  (0.3ms) CREATE UNIQUE INDEX "index_items_on_container_id_and_sort_position" ON "items" ("container_id", "sort_position")
10
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
11
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
12
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES (20190523235430)
13
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
14
+ (20190523235417);
15
+
16
+ 
17
+  (0.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
18
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
19
+ TRANSACTION (0.0ms) begin transaction
20
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2024-08-14 20:15:51.333068"], ["updated_at", "2024-08-14 20:15:51.333068"]]
21
+ TRANSACTION (0.3ms) commit transaction
22
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
23
+ ActiveRecord::InternalMetadata Load (0.0ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "schema_sha1"], ["LIMIT", 1]]
24
+ TRANSACTION (0.0ms) begin transaction
25
+ ActiveRecord::InternalMetadata Create (0.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "schema_sha1"], ["value", "53ba2f4dcf5378474176f0d79278886ba3481594"], ["created_at", "2024-08-14 20:15:51.334483"], ["updated_at", "2024-08-14 20:15:51.334483"]]
26
+ TRANSACTION (0.2ms) commit transaction
27
+  (0.0ms) SELECT sqlite_version(*)
28
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
29
+ TRANSACTION (0.0ms) begin transaction
30
+ TRANSACTION (0.0ms) rollback transaction
31
+ TRANSACTION (0.0ms) begin transaction
32
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
33
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
34
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
35
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.385885"], ["updated_at", "2024-08-14 20:15:51.385885"]]
36
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
37
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
38
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
39
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
40
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:15:51.387070"], ["updated_at", "2024-08-14 20:15:51.387070"]]
41
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
42
+ TRANSACTION (0.1ms) rollback transaction
43
+ TRANSACTION (0.0ms) begin transaction
44
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
45
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
46
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
47
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.387965"], ["updated_at", "2024-08-14 20:15:51.387965"]]
48
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
49
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
50
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
51
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
52
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:15:51.388459"], ["updated_at", "2024-08-14 20:15:51.388459"]]
53
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
54
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
55
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
56
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
57
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
58
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
59
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.389113"], ["updated_at", "2024-08-14 20:15:51.389113"]]
60
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
61
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
62
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
63
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
64
+ TRANSACTION (0.1ms) rollback transaction
65
+ TRANSACTION (0.0ms) begin transaction
66
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
67
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
68
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
69
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.390317"], ["updated_at", "2024-08-14 20:15:51.390317"]]
70
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
71
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
72
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
73
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
74
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:15:51.390871"], ["updated_at", "2024-08-14 20:15:51.390871"]]
75
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
76
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
77
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
78
+ TRANSACTION (0.1ms) rollback transaction
79
+ TRANSACTION (0.0ms) begin transaction
80
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
81
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
82
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
83
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.391880"], ["updated_at", "2024-08-14 20:15:51.391880"]]
84
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
85
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
86
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
87
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
88
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:15:51.392338"], ["updated_at", "2024-08-14 20:15:51.392338"]]
89
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
90
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
91
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
92
+ TRANSACTION (0.1ms) rollback transaction
93
+ TRANSACTION (0.0ms) begin transaction
94
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
95
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
96
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
97
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:15:51.393392"], ["updated_at", "2024-08-14 20:15:51.393392"]]
98
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
99
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
100
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
101
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
102
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:15:51.393888"], ["updated_at", "2024-08-14 20:15:51.393888"]]
103
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
104
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
105
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
106
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
107
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
108
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
109
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
110
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
111
+ Container Load (0.1ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
112
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
113
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
114
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
115
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
116
+ TRANSACTION (0.1ms) rollback transaction
117
+ TRANSACTION (0.0ms) begin transaction
118
+ TRANSACTION (0.0ms) rollback transaction
119
+ TRANSACTION (0.0ms) begin transaction
120
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
121
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
122
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
123
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.396243"], ["updated_at", "2024-08-14 20:15:51.396243"]]
124
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
125
+ TRANSACTION (0.1ms) rollback transaction
126
+ TRANSACTION (0.0ms) begin transaction
127
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
128
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
129
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
130
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.398387"], ["updated_at", "2024-08-14 20:15:51.398387"]]
131
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
132
+ TRANSACTION (0.1ms) rollback transaction
133
+ TRANSACTION (0.0ms) begin transaction
134
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
135
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
136
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
137
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.399266"], ["updated_at", "2024-08-14 20:15:51.399266"]]
138
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
139
+ TRANSACTION (0.1ms) rollback transaction
140
+ TRANSACTION (0.0ms) begin transaction
141
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
142
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
143
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
144
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.400304"], ["updated_at", "2024-08-14 20:15:51.400304"]]
145
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
146
+ TRANSACTION (0.1ms) rollback transaction
147
+ TRANSACTION (0.0ms) begin transaction
148
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
149
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
150
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
151
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:15:51.401120"], ["updated_at", "2024-08-14 20:15:51.401120"]]
152
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
153
+ TRANSACTION (0.1ms) rollback transaction
154
+ TRANSACTION (0.0ms) begin transaction
155
+ TRANSACTION (0.0ms) rollback transaction
156
+ TRANSACTION (0.0ms) begin transaction
157
+ TRANSACTION (0.0ms) rollback transaction
158
+ TRANSACTION (0.0ms) begin transaction
159
+ TRANSACTION (0.0ms) rollback transaction
160
+ TRANSACTION (0.0ms) begin transaction
161
+ TRANSACTION (0.0ms) rollback transaction
162
+ TRANSACTION (0.0ms) begin transaction
163
+ TRANSACTION (0.0ms) rollback transaction
164
+ TRANSACTION (0.0ms) begin transaction
165
+ TRANSACTION (0.0ms) rollback transaction
166
+  (0.3ms) SELECT sqlite_version(*)
167
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
168
+  (0.0ms) SELECT sqlite_version(*)
169
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
170
+ TRANSACTION (0.0ms) begin transaction
171
+ TRANSACTION (0.0ms) rollback transaction
172
+ TRANSACTION (0.0ms) begin transaction
173
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
174
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
175
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
176
+ Container Create (0.3ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.382613"], ["updated_at", "2024-08-14 20:18:33.382613"]]
177
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
178
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
179
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
180
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
181
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:18:33.383654"], ["updated_at", "2024-08-14 20:18:33.383654"]]
182
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
183
+ TRANSACTION (0.4ms) rollback transaction
184
+ TRANSACTION (0.0ms) begin transaction
185
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
186
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
187
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
188
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.384978"], ["updated_at", "2024-08-14 20:18:33.384978"]]
189
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
190
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
191
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
192
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
193
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:18:33.385520"], ["updated_at", "2024-08-14 20:18:33.385520"]]
194
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
195
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
196
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
197
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
198
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
199
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
200
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.386243"], ["updated_at", "2024-08-14 20:18:33.386243"]]
201
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
202
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
203
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
204
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
205
+ TRANSACTION (0.2ms) rollback transaction
206
+ TRANSACTION (0.0ms) begin transaction
207
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
208
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
209
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
210
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.387432"], ["updated_at", "2024-08-14 20:18:33.387432"]]
211
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
212
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
213
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
214
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
215
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:18:33.387929"], ["updated_at", "2024-08-14 20:18:33.387929"]]
216
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
217
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
218
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
219
+ TRANSACTION (0.1ms) rollback transaction
220
+ TRANSACTION (0.0ms) begin transaction
221
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
222
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
223
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
224
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.389011"], ["updated_at", "2024-08-14 20:18:33.389011"]]
225
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
226
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
227
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
228
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
229
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:18:33.389476"], ["updated_at", "2024-08-14 20:18:33.389476"]]
230
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
231
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
232
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
233
+ TRANSACTION (0.1ms) rollback transaction
234
+ TRANSACTION (0.1ms) begin transaction
235
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
236
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
237
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
238
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:18:33.390494"], ["updated_at", "2024-08-14 20:18:33.390494"]]
239
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
240
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
241
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
242
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
243
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:18:33.390980"], ["updated_at", "2024-08-14 20:18:33.390980"]]
244
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
245
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
246
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
247
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
248
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
249
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
250
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
251
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
252
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
253
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
254
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
255
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
256
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
257
+ TRANSACTION (0.1ms) rollback transaction
258
+ TRANSACTION (0.0ms) begin transaction
259
+ TRANSACTION (0.0ms) rollback transaction
260
+ TRANSACTION (0.0ms) begin transaction
261
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
262
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
263
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
264
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.393348"], ["updated_at", "2024-08-14 20:18:33.393348"]]
265
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
266
+ TRANSACTION (0.1ms) rollback transaction
267
+ TRANSACTION (0.0ms) begin transaction
268
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
269
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
270
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
271
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.395552"], ["updated_at", "2024-08-14 20:18:33.395552"]]
272
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
273
+ TRANSACTION (0.1ms) rollback transaction
274
+ TRANSACTION (0.0ms) begin transaction
275
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
276
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
277
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
278
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.396541"], ["updated_at", "2024-08-14 20:18:33.396541"]]
279
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
280
+ TRANSACTION (0.1ms) rollback transaction
281
+ TRANSACTION (0.0ms) begin transaction
282
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
283
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
284
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
285
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.397406"], ["updated_at", "2024-08-14 20:18:33.397406"]]
286
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
287
+ TRANSACTION (0.1ms) rollback transaction
288
+ TRANSACTION (0.0ms) begin transaction
289
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
290
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
291
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
292
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:18:33.398290"], ["updated_at", "2024-08-14 20:18:33.398290"]]
293
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
294
+ TRANSACTION (0.1ms) rollback transaction
295
+ TRANSACTION (0.0ms) begin transaction
296
+ TRANSACTION (0.0ms) rollback transaction
297
+ TRANSACTION (0.0ms) begin transaction
298
+ TRANSACTION (0.0ms) rollback transaction
299
+ TRANSACTION (0.0ms) begin transaction
300
+ TRANSACTION (0.0ms) rollback transaction
301
+ TRANSACTION (0.0ms) begin transaction
302
+ TRANSACTION (0.0ms) rollback transaction
303
+ TRANSACTION (0.0ms) begin transaction
304
+ TRANSACTION (0.0ms) rollback transaction
305
+ TRANSACTION (0.0ms) begin transaction
306
+ TRANSACTION (0.0ms) rollback transaction
307
+  (0.3ms) SELECT sqlite_version(*)
308
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
309
+  (0.0ms) SELECT sqlite_version(*)
310
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
311
+ TRANSACTION (0.0ms) begin transaction
312
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
313
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
314
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
315
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
316
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
317
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.822212"], ["updated_at", "2024-08-14 20:19:15.822212"]]
318
+ TRANSACTION (2.9ms) RELEASE SAVEPOINT active_record_1
319
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
320
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
321
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
322
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
323
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
324
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:19:15.833949"], ["updated_at", "2024-08-14 20:19:15.833949"]]
325
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
326
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
327
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
328
+ TRANSACTION (0.2ms) rollback transaction
329
+ TRANSACTION (0.0ms) begin transaction
330
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
331
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
332
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
333
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.849588"], ["updated_at", "2024-08-14 20:19:15.849588"]]
334
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
335
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
336
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
337
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
338
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:19:15.850151"], ["updated_at", "2024-08-14 20:19:15.850151"]]
339
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
340
+ TRANSACTION (0.1ms) rollback transaction
341
+ TRANSACTION (0.0ms) begin transaction
342
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
343
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
344
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
345
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.851001"], ["updated_at", "2024-08-14 20:19:15.851001"]]
346
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
347
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
348
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
349
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
350
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:19:15.851511"], ["updated_at", "2024-08-14 20:19:15.851511"]]
351
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
352
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
353
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
354
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
355
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
356
+ Container Exists? (0.1ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
357
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.852221"], ["updated_at", "2024-08-14 20:19:15.852221"]]
358
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
359
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
360
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
361
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
362
+ TRANSACTION (0.1ms) rollback transaction
363
+ TRANSACTION (0.0ms) begin transaction
364
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
365
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
366
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
367
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.853319"], ["updated_at", "2024-08-14 20:19:15.853319"]]
368
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
369
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
370
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
371
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
372
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:19:15.853873"], ["updated_at", "2024-08-14 20:19:15.853873"]]
373
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
374
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
375
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
376
+ TRANSACTION (0.1ms) rollback transaction
377
+ TRANSACTION (0.0ms) begin transaction
378
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
379
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
380
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
381
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.854933"], ["updated_at", "2024-08-14 20:19:15.854933"]]
382
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
383
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
384
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
385
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
386
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:19:15.855414"], ["updated_at", "2024-08-14 20:19:15.855414"]]
387
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
388
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
389
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
390
+ TRANSACTION (0.1ms) rollback transaction
391
+ TRANSACTION (0.0ms) begin transaction
392
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
393
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
394
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
395
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:19:15.856427"], ["updated_at", "2024-08-14 20:19:15.856427"]]
396
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
397
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
398
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
399
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
400
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:19:15.856955"], ["updated_at", "2024-08-14 20:19:15.856955"]]
401
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
402
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
403
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
404
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
405
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
406
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
407
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
408
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
409
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
410
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
411
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
412
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
413
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
414
+ TRANSACTION (0.1ms) rollback transaction
415
+ TRANSACTION (0.0ms) begin transaction
416
+ TRANSACTION (0.0ms) rollback transaction
417
+ TRANSACTION (0.0ms) begin transaction
418
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
419
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
420
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
421
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.859380"], ["updated_at", "2024-08-14 20:19:15.859380"]]
422
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
423
+ TRANSACTION (0.1ms) rollback transaction
424
+ TRANSACTION (0.0ms) begin transaction
425
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
426
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
427
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
428
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.861635"], ["updated_at", "2024-08-14 20:19:15.861635"]]
429
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
430
+ TRANSACTION (0.2ms) rollback transaction
431
+ TRANSACTION (0.0ms) begin transaction
432
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
433
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
434
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
435
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.862607"], ["updated_at", "2024-08-14 20:19:15.862607"]]
436
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
437
+ TRANSACTION (0.1ms) rollback transaction
438
+ TRANSACTION (0.0ms) begin transaction
439
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
440
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
441
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
442
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.863457"], ["updated_at", "2024-08-14 20:19:15.863457"]]
443
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
444
+ TRANSACTION (0.1ms) rollback transaction
445
+ TRANSACTION (0.0ms) begin transaction
446
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
447
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
448
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
449
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:19:15.864295"], ["updated_at", "2024-08-14 20:19:15.864295"]]
450
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
451
+ TRANSACTION (0.1ms) rollback transaction
452
+ TRANSACTION (0.0ms) begin transaction
453
+ TRANSACTION (0.0ms) rollback transaction
454
+ TRANSACTION (0.0ms) begin transaction
455
+ TRANSACTION (0.0ms) rollback transaction
456
+ TRANSACTION (0.0ms) begin transaction
457
+ TRANSACTION (0.0ms) rollback transaction
458
+ TRANSACTION (0.0ms) begin transaction
459
+ TRANSACTION (0.0ms) rollback transaction
460
+ TRANSACTION (0.0ms) begin transaction
461
+ TRANSACTION (0.0ms) rollback transaction
462
+ TRANSACTION (0.0ms) begin transaction
463
+ TRANSACTION (0.0ms) rollback transaction
464
+  (0.4ms) SELECT sqlite_version(*)
465
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
466
+  (0.0ms) SELECT sqlite_version(*)
467
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
468
+ TRANSACTION (0.0ms) begin transaction
469
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
470
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
471
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
472
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
473
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
474
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.682809"], ["updated_at", "2024-08-14 20:25:59.682809"]]
475
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
476
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
477
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
478
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
479
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
480
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
481
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.695199"], ["updated_at", "2024-08-14 20:25:59.695199"]]
482
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
483
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
484
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
485
+ TRANSACTION (0.2ms) rollback transaction
486
+ TRANSACTION (0.0ms) begin transaction
487
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
488
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
489
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
490
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.711031"], ["updated_at", "2024-08-14 20:25:59.711031"]]
491
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
492
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
493
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
494
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
495
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.711595"], ["updated_at", "2024-08-14 20:25:59.711595"]]
496
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
497
+ TRANSACTION (0.1ms) rollback transaction
498
+ TRANSACTION (0.0ms) begin transaction
499
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
500
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
501
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
502
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.712467"], ["updated_at", "2024-08-14 20:25:59.712467"]]
503
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
504
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
505
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
506
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
507
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.712993"], ["updated_at", "2024-08-14 20:25:59.712993"]]
508
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
509
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
510
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
511
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
512
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
513
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
514
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.713707"], ["updated_at", "2024-08-14 20:25:59.713707"]]
515
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
516
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
517
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
518
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
519
+ TRANSACTION (0.1ms) rollback transaction
520
+ TRANSACTION (0.0ms) begin transaction
521
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
522
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
523
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
524
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.714813"], ["updated_at", "2024-08-14 20:25:59.714813"]]
525
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
526
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
527
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
528
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
529
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.715369"], ["updated_at", "2024-08-14 20:25:59.715369"]]
530
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
531
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
532
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
533
+ TRANSACTION (0.1ms) rollback transaction
534
+ TRANSACTION (0.0ms) begin transaction
535
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
536
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
537
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
538
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.716432"], ["updated_at", "2024-08-14 20:25:59.716432"]]
539
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
540
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
541
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
542
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
543
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.716927"], ["updated_at", "2024-08-14 20:25:59.716927"]]
544
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
545
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
546
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
547
+ TRANSACTION (0.1ms) rollback transaction
548
+ TRANSACTION (0.0ms) begin transaction
549
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
550
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
551
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
552
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:25:59.717944"], ["updated_at", "2024-08-14 20:25:59.717944"]]
553
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
554
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
555
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
556
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
557
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:25:59.718433"], ["updated_at", "2024-08-14 20:25:59.718433"]]
558
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
559
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
560
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
561
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
562
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
563
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
564
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
565
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
566
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
567
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
568
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
569
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
570
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
571
+ TRANSACTION (0.1ms) rollback transaction
572
+ TRANSACTION (0.0ms) begin transaction
573
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
574
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
575
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
576
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.722055"], ["updated_at", "2024-08-14 20:25:59.722055"]]
577
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
578
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
579
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
580
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
581
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
582
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
583
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.730563"], ["updated_at", "2024-08-14 20:25:59.730563"]]
584
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
585
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
586
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
587
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
588
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
589
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.731408"], ["updated_at", "2024-08-14 20:25:59.731408"]]
590
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
591
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
592
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
593
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
594
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
595
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
596
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
597
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
598
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:25:59.732497"], ["updated_at", "2024-08-14 20:25:59.732497"]]
599
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
600
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
601
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
602
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
603
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
604
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
605
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
606
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
607
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.733622"], ["updated_at", "2024-08-14 20:25:59.733622"]]
608
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
609
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
610
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
611
+ TRANSACTION (0.2ms) rollback transaction
612
+ TRANSACTION (0.0ms) begin transaction
613
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
614
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
615
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
616
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.734813"], ["updated_at", "2024-08-14 20:25:59.734813"]]
617
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
618
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
619
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
620
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
621
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.735365"], ["updated_at", "2024-08-14 20:25:59.735365"]]
622
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
623
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
624
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
625
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
626
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.735950"], ["updated_at", "2024-08-14 20:25:59.735950"]]
627
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
628
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
629
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
630
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
631
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:25:59.736432"], ["updated_at", "2024-08-14 20:25:59.736432"]]
632
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
633
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
634
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
635
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
636
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.737016"], ["updated_at", "2024-08-14 20:25:59.737016"]]
637
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
638
+ TRANSACTION (0.1ms) rollback transaction
639
+ TRANSACTION (0.0ms) begin transaction
640
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
641
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
642
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
643
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.737832"], ["updated_at", "2024-08-14 20:25:59.737832"]]
644
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
645
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
646
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
647
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
648
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.738505"], ["updated_at", "2024-08-14 20:25:59.738505"]]
649
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
650
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
651
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
652
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
653
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:25:59.738994"], ["updated_at", "2024-08-14 20:25:59.738994"]]
654
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
655
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
656
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
657
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
658
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.739401"], ["updated_at", "2024-08-14 20:25:59.739401"]]
659
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
660
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
661
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
662
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
663
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.739965"], ["updated_at", "2024-08-14 20:25:59.739965"]]
664
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
665
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
666
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
667
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - (sort_position + 1) WHERE "items"."container_id" = ? AND "items"."sort_position" >= 1 [["container_id", 1]]
668
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? AND "items"."sort_position" < 0 [["container_id", 1]]
669
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
670
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.740684"], ["updated_at", "2024-08-14 20:25:59.740684"]]
671
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
672
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
673
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
674
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
675
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]]
676
+ TRANSACTION (0.1ms) rollback transaction
677
+ TRANSACTION (0.0ms) begin transaction
678
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
679
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
680
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
681
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.741874"], ["updated_at", "2024-08-14 20:25:59.741874"]]
682
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
683
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
684
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
685
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
686
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.742543"], ["updated_at", "2024-08-14 20:25:59.742543"]]
687
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
688
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
689
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
690
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
691
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:25:59.743031"], ["updated_at", "2024-08-14 20:25:59.743031"]]
692
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
693
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
694
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
695
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
696
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.743437"], ["updated_at", "2024-08-14 20:25:59.743437"]]
697
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
698
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
699
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
700
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
701
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.743999"], ["updated_at", "2024-08-14 20:25:59.743999"]]
702
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
703
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
704
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 2 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
705
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
706
+ TRANSACTION (0.1ms) rollback transaction
707
+ TRANSACTION (0.0ms) begin transaction
708
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
709
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
710
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
711
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.745237"], ["updated_at", "2024-08-14 20:25:59.745237"]]
712
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
713
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
714
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
715
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
716
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.745986"], ["updated_at", "2024-08-14 20:25:59.745986"]]
717
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
718
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
719
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
720
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
721
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:25:59.746512"], ["updated_at", "2024-08-14 20:25:59.746512"]]
722
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
723
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
724
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
725
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
726
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.746935"], ["updated_at", "2024-08-14 20:25:59.746935"]]
727
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
728
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
729
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
730
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
731
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:25:59.747502"], ["updated_at", "2024-08-14 20:25:59.747502"]]
732
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
733
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
734
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 2 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
735
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
736
+ TRANSACTION (0.1ms) rollback transaction
737
+ TRANSACTION (0.0ms) begin transaction
738
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
739
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
740
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
741
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:25:59.748746"], ["updated_at", "2024-08-14 20:25:59.748746"]]
742
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
743
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
744
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
745
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 21], ["container_id", 1], ["LIMIT", 1]]
746
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 21], ["created_at", "2024-08-14 20:25:59.749471"], ["updated_at", "2024-08-14 20:25:59.749471"]]
747
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
748
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
749
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 42], ["container_id", 1], ["LIMIT", 1]]
750
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 42], ["created_at", "2024-08-14 20:25:59.749892"], ["updated_at", "2024-08-14 20:25:59.749892"]]
751
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
752
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
753
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
754
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
755
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:25:59.750328"], ["updated_at", "2024-08-14 20:25:59.750328"]]
756
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
757
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
758
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
759
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 84], ["container_id", 2], ["LIMIT", 1]]
760
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 84], ["created_at", "2024-08-14 20:25:59.750912"], ["updated_at", "2024-08-14 20:25:59.750912"]]
761
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
762
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
763
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
764
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
765
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
766
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
767
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
768
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END WHERE "items"."container_id" = ? [["container_id", 1]]
769
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 1]]
770
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
771
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
772
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
773
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
774
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
775
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
776
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
777
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
778
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
779
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 2], ["LIMIT", 1]]
780
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
781
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
782
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 84 THEN -1 END WHERE "items"."container_id" = ? [["container_id", 2]]
783
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 2]]
784
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
785
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
786
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
787
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
788
+ TRANSACTION (0.1ms) rollback transaction
789
+ TRANSACTION (0.0ms) begin transaction
790
+ TRANSACTION (0.0ms) rollback transaction
791
+ TRANSACTION (0.0ms) begin transaction
792
+ TRANSACTION (0.0ms) rollback transaction
793
+ TRANSACTION (0.0ms) begin transaction
794
+ TRANSACTION (0.0ms) rollback transaction
795
+ TRANSACTION (0.0ms) begin transaction
796
+ TRANSACTION (0.0ms) rollback transaction
797
+ TRANSACTION (0.0ms) begin transaction
798
+ TRANSACTION (0.0ms) rollback transaction
799
+ TRANSACTION (0.0ms) begin transaction
800
+ TRANSACTION (0.0ms) rollback transaction
801
+  (0.3ms) SELECT sqlite_version(*)
802
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
803
+  (0.0ms) SELECT sqlite_version(*)
804
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
805
+ TRANSACTION (0.0ms) begin transaction
806
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
807
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
808
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
809
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
810
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
811
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.939963"], ["updated_at", "2024-08-14 20:27:45.939963"]]
812
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
813
+ Container Load (2.6ms) SELECT "containers".* FROM "containers"
814
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
815
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
816
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
817
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
818
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.949539"], ["updated_at", "2024-08-14 20:27:45.949539"]]
819
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
820
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
821
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
822
+ TRANSACTION (0.4ms) rollback transaction
823
+ TRANSACTION (0.0ms) begin transaction
824
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
825
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
826
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
827
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.965538"], ["updated_at", "2024-08-14 20:27:45.965538"]]
828
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
829
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
830
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
831
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
832
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.966113"], ["updated_at", "2024-08-14 20:27:45.966113"]]
833
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
834
+ TRANSACTION (0.2ms) rollback transaction
835
+ TRANSACTION (0.0ms) begin transaction
836
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
837
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
838
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
839
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.967006"], ["updated_at", "2024-08-14 20:27:45.967006"]]
840
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
841
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
842
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
843
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
844
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.967530"], ["updated_at", "2024-08-14 20:27:45.967530"]]
845
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
846
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
847
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
848
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
849
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
850
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
851
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.968165"], ["updated_at", "2024-08-14 20:27:45.968165"]]
852
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
853
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
854
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
855
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
856
+ TRANSACTION (0.1ms) rollback transaction
857
+ TRANSACTION (0.0ms) begin transaction
858
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
859
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
860
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
861
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.969367"], ["updated_at", "2024-08-14 20:27:45.969367"]]
862
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
863
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
864
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
865
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
866
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.969960"], ["updated_at", "2024-08-14 20:27:45.969960"]]
867
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
868
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
869
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
870
+ TRANSACTION (0.1ms) rollback transaction
871
+ TRANSACTION (0.0ms) begin transaction
872
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
873
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
874
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
875
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.971057"], ["updated_at", "2024-08-14 20:27:45.971057"]]
876
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
877
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
878
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
879
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
880
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.971591"], ["updated_at", "2024-08-14 20:27:45.971591"]]
881
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
882
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
883
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
884
+ TRANSACTION (0.1ms) rollback transaction
885
+ TRANSACTION (0.0ms) begin transaction
886
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
887
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
888
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
889
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:27:45.972619"], ["updated_at", "2024-08-14 20:27:45.972619"]]
890
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
891
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
892
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
893
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
894
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:27:45.973116"], ["updated_at", "2024-08-14 20:27:45.973116"]]
895
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
896
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
897
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
898
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
899
+ TRANSACTION (0.1ms) SAVEPOINT active_record_1
900
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
901
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
902
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
903
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
904
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
905
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
906
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
907
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
908
+ TRANSACTION (0.1ms) rollback transaction
909
+ TRANSACTION (0.0ms) begin transaction
910
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
911
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
912
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
913
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.976107"], ["updated_at", "2024-08-14 20:27:45.976107"]]
914
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
915
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
916
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
917
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
918
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
919
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
920
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.982269"], ["updated_at", "2024-08-14 20:27:45.982269"]]
921
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
922
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
923
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
924
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
925
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
926
+ Item Create (0.1ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.983098"], ["updated_at", "2024-08-14 20:27:45.983098"]]
927
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
928
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
929
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
930
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
931
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
932
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
933
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
934
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
935
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:27:45.984235"], ["updated_at", "2024-08-14 20:27:45.984235"]]
936
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
937
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
938
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
939
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
940
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
941
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
942
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
943
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
944
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.985338"], ["updated_at", "2024-08-14 20:27:45.985338"]]
945
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
946
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
947
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
948
+ TRANSACTION (0.2ms) rollback transaction
949
+ TRANSACTION (0.0ms) begin transaction
950
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
951
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
952
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
953
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.986537"], ["updated_at", "2024-08-14 20:27:45.986537"]]
954
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
955
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
956
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
957
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
958
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.987123"], ["updated_at", "2024-08-14 20:27:45.987123"]]
959
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
960
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
961
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
962
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
963
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.987723"], ["updated_at", "2024-08-14 20:27:45.987723"]]
964
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
965
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
966
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
967
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
968
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:27:45.988211"], ["updated_at", "2024-08-14 20:27:45.988211"]]
969
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
970
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
971
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
972
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
973
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.988761"], ["updated_at", "2024-08-14 20:27:45.988761"]]
974
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
975
+ TRANSACTION (0.2ms) rollback transaction
976
+ TRANSACTION (0.0ms) begin transaction
977
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
978
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
979
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
980
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.989628"], ["updated_at", "2024-08-14 20:27:45.989628"]]
981
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
982
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
983
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
984
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
985
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.990341"], ["updated_at", "2024-08-14 20:27:45.990341"]]
986
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
987
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
988
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
989
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
990
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:27:45.990839"], ["updated_at", "2024-08-14 20:27:45.990839"]]
991
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
992
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
993
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
994
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
995
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.991275"], ["updated_at", "2024-08-14 20:27:45.991275"]]
996
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
997
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
998
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
999
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1000
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.991866"], ["updated_at", "2024-08-14 20:27:45.991866"]]
1001
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1002
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1003
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1004
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - (sort_position + 1) WHERE "items"."container_id" = ? AND "items"."sort_position" >= 1 [["container_id", 1]]
1005
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? AND "items"."sort_position" < 0 [["container_id", 1]]
1006
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1007
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.992631"], ["updated_at", "2024-08-14 20:27:45.992631"]]
1008
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1009
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1010
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1011
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1012
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]]
1013
+ TRANSACTION (0.1ms) rollback transaction
1014
+ TRANSACTION (0.0ms) begin transaction
1015
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1016
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1017
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1018
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.993872"], ["updated_at", "2024-08-14 20:27:45.993872"]]
1019
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1020
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1021
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1022
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1023
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.994579"], ["updated_at", "2024-08-14 20:27:45.994579"]]
1024
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1025
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1026
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1027
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1028
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:27:45.995104"], ["updated_at", "2024-08-14 20:27:45.995104"]]
1029
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1030
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1031
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1032
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1033
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.995547"], ["updated_at", "2024-08-14 20:27:45.995547"]]
1034
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1035
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1036
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1037
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1038
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.996125"], ["updated_at", "2024-08-14 20:27:45.996125"]]
1039
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1040
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1041
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 2 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1042
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1043
+ TRANSACTION (0.1ms) rollback transaction
1044
+ TRANSACTION (0.0ms) begin transaction
1045
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1046
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1047
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1048
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:45.997331"], ["updated_at", "2024-08-14 20:27:45.997331"]]
1049
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1050
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1051
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1052
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1053
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.998020"], ["updated_at", "2024-08-14 20:27:45.998020"]]
1054
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1055
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1056
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1057
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1058
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:27:45.998538"], ["updated_at", "2024-08-14 20:27:45.998538"]]
1059
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1060
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1061
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1062
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1063
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:45.999009"], ["updated_at", "2024-08-14 20:27:45.999009"]]
1064
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1065
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1066
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1067
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1068
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:27:45.999666"], ["updated_at", "2024-08-14 20:27:45.999666"]]
1069
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1070
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1071
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 2 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1072
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1073
+ TRANSACTION (0.1ms) rollback transaction
1074
+ TRANSACTION (0.0ms) begin transaction
1075
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1076
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1077
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1078
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:27:46.000946"], ["updated_at", "2024-08-14 20:27:46.000946"]]
1079
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1080
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1081
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1082
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 21], ["container_id", 1], ["LIMIT", 1]]
1083
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 21], ["created_at", "2024-08-14 20:27:46.001696"], ["updated_at", "2024-08-14 20:27:46.001696"]]
1084
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1085
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1086
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 42], ["container_id", 1], ["LIMIT", 1]]
1087
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 42], ["created_at", "2024-08-14 20:27:46.002165"], ["updated_at", "2024-08-14 20:27:46.002165"]]
1088
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1089
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1090
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1091
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1092
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:27:46.002606"], ["updated_at", "2024-08-14 20:27:46.002606"]]
1093
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1094
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1095
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1096
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 84], ["container_id", 2], ["LIMIT", 1]]
1097
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 84], ["created_at", "2024-08-14 20:27:46.003194"], ["updated_at", "2024-08-14 20:27:46.003194"]]
1098
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1099
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1100
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1101
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1102
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
1103
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1104
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1105
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END WHERE "items"."container_id" = ? [["container_id", 1]]
1106
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 1]]
1107
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1108
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1109
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1110
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1111
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
1112
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1113
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1114
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1115
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1116
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 2], ["LIMIT", 1]]
1117
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1118
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1119
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 84 THEN -1 END WHERE "items"."container_id" = ? [["container_id", 2]]
1120
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 2]]
1121
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1122
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1123
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1124
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1125
+ TRANSACTION (0.1ms) rollback transaction
1126
+ TRANSACTION (0.0ms) begin transaction
1127
+ TRANSACTION (0.0ms) rollback transaction
1128
+ TRANSACTION (0.0ms) begin transaction
1129
+ TRANSACTION (0.0ms) rollback transaction
1130
+ TRANSACTION (0.0ms) begin transaction
1131
+ TRANSACTION (0.0ms) rollback transaction
1132
+ TRANSACTION (0.0ms) begin transaction
1133
+ TRANSACTION (0.0ms) rollback transaction
1134
+ TRANSACTION (0.0ms) begin transaction
1135
+ TRANSACTION (0.0ms) rollback transaction
1136
+ TRANSACTION (0.0ms) begin transaction
1137
+ TRANSACTION (0.0ms) rollback transaction
1138
+  (0.3ms) SELECT sqlite_version(*)
1139
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
1140
+  (0.0ms) SELECT sqlite_version(*)
1141
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1142
+ TRANSACTION (0.0ms) begin transaction
1143
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
1144
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
1145
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1146
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1147
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1148
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.868347"], ["updated_at", "2024-08-14 20:35:08.868347"]]
1149
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1150
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1151
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1152
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1153
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1154
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1155
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.877754"], ["updated_at", "2024-08-14 20:35:08.877754"]]
1156
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1157
+ Container Load (2.9ms) SELECT "containers".* FROM "containers"
1158
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1159
+ TRANSACTION (0.4ms) rollback transaction
1160
+ TRANSACTION (0.0ms) begin transaction
1161
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1162
+  (0.1ms) SELECT MAX("containers"."sort_position") FROM "containers"
1163
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1164
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.893890"], ["updated_at", "2024-08-14 20:35:08.893890"]]
1165
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1166
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1167
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1168
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1169
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.894473"], ["updated_at", "2024-08-14 20:35:08.894473"]]
1170
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1171
+ TRANSACTION (0.2ms) rollback transaction
1172
+ TRANSACTION (0.0ms) begin transaction
1173
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1174
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1175
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1176
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.895365"], ["updated_at", "2024-08-14 20:35:08.895365"]]
1177
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1178
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1179
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1180
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1181
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.895889"], ["updated_at", "2024-08-14 20:35:08.895889"]]
1182
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1183
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1184
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1185
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
1186
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
1187
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1188
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.896596"], ["updated_at", "2024-08-14 20:35:08.896596"]]
1189
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1190
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1191
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1192
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1193
+ TRANSACTION (0.1ms) rollback transaction
1194
+ TRANSACTION (0.0ms) begin transaction
1195
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1196
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1197
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1198
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.897717"], ["updated_at", "2024-08-14 20:35:08.897717"]]
1199
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1200
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1201
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1202
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1203
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.898339"], ["updated_at", "2024-08-14 20:35:08.898339"]]
1204
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1205
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
1206
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
1207
+ TRANSACTION (0.1ms) rollback transaction
1208
+ TRANSACTION (0.0ms) begin transaction
1209
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1210
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1211
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1212
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.899422"], ["updated_at", "2024-08-14 20:35:08.899422"]]
1213
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1214
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1215
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1216
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1217
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.899927"], ["updated_at", "2024-08-14 20:35:08.899927"]]
1218
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1219
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
1220
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
1221
+ TRANSACTION (0.1ms) rollback transaction
1222
+ TRANSACTION (0.0ms) begin transaction
1223
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1224
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1225
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
1226
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:35:08.900967"], ["updated_at", "2024-08-14 20:35:08.900967"]]
1227
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1228
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1229
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1230
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
1231
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:35:08.901505"], ["updated_at", "2024-08-14 20:35:08.901505"]]
1232
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1233
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1234
+ Container Load (0.1ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1235
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1236
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1237
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
1238
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
1239
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1240
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1241
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1242
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1243
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1244
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1245
+ TRANSACTION (0.1ms) rollback transaction
1246
+ TRANSACTION (0.0ms) begin transaction
1247
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1248
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1249
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1250
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.904476"], ["updated_at", "2024-08-14 20:35:08.904476"]]
1251
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1252
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1253
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1254
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1255
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1256
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1257
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.910504"], ["updated_at", "2024-08-14 20:35:08.910504"]]
1258
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1259
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1260
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1261
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1262
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1263
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.911308"], ["updated_at", "2024-08-14 20:35:08.911308"]]
1264
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1265
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1266
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1267
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1268
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1269
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1270
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1271
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1272
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:08.912389"], ["updated_at", "2024-08-14 20:35:08.912389"]]
1273
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1274
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1275
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1276
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1277
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1278
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1279
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1280
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1281
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.913475"], ["updated_at", "2024-08-14 20:35:08.913475"]]
1282
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1283
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1284
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1285
+ TRANSACTION (0.2ms) rollback transaction
1286
+ TRANSACTION (0.0ms) begin transaction
1287
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1288
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1289
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1290
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.914729"], ["updated_at", "2024-08-14 20:35:08.914729"]]
1291
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1292
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1293
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1294
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1295
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.915305"], ["updated_at", "2024-08-14 20:35:08.915305"]]
1296
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1297
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1298
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1299
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1300
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.915907"], ["updated_at", "2024-08-14 20:35:08.915907"]]
1301
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1302
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1303
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1304
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1305
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:08.916410"], ["updated_at", "2024-08-14 20:35:08.916410"]]
1306
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1307
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1308
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1309
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1310
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.916964"], ["updated_at", "2024-08-14 20:35:08.916964"]]
1311
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1312
+ TRANSACTION (0.2ms) rollback transaction
1313
+ TRANSACTION (0.0ms) begin transaction
1314
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1315
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1316
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1317
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.917841"], ["updated_at", "2024-08-14 20:35:08.917841"]]
1318
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1319
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1320
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1321
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1322
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.918543"], ["updated_at", "2024-08-14 20:35:08.918543"]]
1323
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1324
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1325
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1326
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1327
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:08.919037"], ["updated_at", "2024-08-14 20:35:08.919037"]]
1328
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1329
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1330
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1331
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1332
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.919457"], ["updated_at", "2024-08-14 20:35:08.919457"]]
1333
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1334
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1335
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1336
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1337
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.920028"], ["updated_at", "2024-08-14 20:35:08.920028"]]
1338
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1339
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1340
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1341
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - (sort_position + 1) WHERE "items"."container_id" = ? AND "items"."sort_position" >= 1 [["container_id", 1]]
1342
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? AND "items"."sort_position" < 0 [["container_id", 1]]
1343
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1344
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.920763"], ["updated_at", "2024-08-14 20:35:08.920763"]]
1345
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1346
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1347
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1348
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1349
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]]
1350
+ TRANSACTION (0.1ms) rollback transaction
1351
+ TRANSACTION (0.0ms) begin transaction
1352
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1353
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1354
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1355
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.921995"], ["updated_at", "2024-08-14 20:35:08.921995"]]
1356
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1357
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1358
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1359
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1360
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.922670"], ["updated_at", "2024-08-14 20:35:08.922670"]]
1361
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1362
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1363
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1364
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1365
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:08.923201"], ["updated_at", "2024-08-14 20:35:08.923201"]]
1366
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1367
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1368
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1369
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1370
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.923619"], ["updated_at", "2024-08-14 20:35:08.923619"]]
1371
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1372
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1373
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1374
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1375
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.924219"], ["updated_at", "2024-08-14 20:35:08.924219"]]
1376
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1377
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1378
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 2 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1379
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1380
+ TRANSACTION (0.1ms) rollback transaction
1381
+ TRANSACTION (0.0ms) begin transaction
1382
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1383
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1384
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1385
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.925461"], ["updated_at", "2024-08-14 20:35:08.925461"]]
1386
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1387
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1388
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1389
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1390
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.926159"], ["updated_at", "2024-08-14 20:35:08.926159"]]
1391
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1392
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1393
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1394
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1395
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:08.926654"], ["updated_at", "2024-08-14 20:35:08.926654"]]
1396
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1397
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1398
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1399
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1400
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.927085"], ["updated_at", "2024-08-14 20:35:08.927085"]]
1401
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1402
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1403
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1404
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1405
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:08.927686"], ["updated_at", "2024-08-14 20:35:08.927686"]]
1406
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1407
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1408
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 2 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1409
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1410
+ TRANSACTION (0.1ms) rollback transaction
1411
+ TRANSACTION (0.0ms) begin transaction
1412
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1413
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1414
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1415
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:08.928957"], ["updated_at", "2024-08-14 20:35:08.928957"]]
1416
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1417
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1418
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1419
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 21], ["container_id", 1], ["LIMIT", 1]]
1420
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 21], ["created_at", "2024-08-14 20:35:08.929686"], ["updated_at", "2024-08-14 20:35:08.929686"]]
1421
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1422
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1423
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 42], ["container_id", 1], ["LIMIT", 1]]
1424
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 42], ["created_at", "2024-08-14 20:35:08.930110"], ["updated_at", "2024-08-14 20:35:08.930110"]]
1425
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1426
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1427
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1428
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1429
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:08.930531"], ["updated_at", "2024-08-14 20:35:08.930531"]]
1430
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1431
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1432
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1433
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 84], ["container_id", 2], ["LIMIT", 1]]
1434
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 84], ["created_at", "2024-08-14 20:35:08.931137"], ["updated_at", "2024-08-14 20:35:08.931137"]]
1435
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1436
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1437
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1438
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1439
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
1440
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1441
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1442
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END WHERE "items"."container_id" = ? [["container_id", 1]]
1443
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 1]]
1444
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1445
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1446
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1447
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1448
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
1449
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1450
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1451
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1452
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1453
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 2], ["LIMIT", 1]]
1454
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1455
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1456
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 84 THEN -1 END WHERE "items"."container_id" = ? [["container_id", 2]]
1457
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 2]]
1458
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1459
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1460
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1461
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1462
+ TRANSACTION (0.2ms) rollback transaction
1463
+ TRANSACTION (0.0ms) begin transaction
1464
+ TRANSACTION (0.0ms) rollback transaction
1465
+ TRANSACTION (0.0ms) begin transaction
1466
+ TRANSACTION (0.0ms) rollback transaction
1467
+ TRANSACTION (0.0ms) begin transaction
1468
+ TRANSACTION (0.0ms) rollback transaction
1469
+ TRANSACTION (0.0ms) begin transaction
1470
+ TRANSACTION (0.0ms) rollback transaction
1471
+ TRANSACTION (0.0ms) begin transaction
1472
+ TRANSACTION (0.0ms) rollback transaction
1473
+ TRANSACTION (0.0ms) begin transaction
1474
+ TRANSACTION (0.0ms) rollback transaction
1475
+  (0.4ms) SELECT sqlite_version(*)
1476
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
1477
+  (0.0ms) SELECT sqlite_version(*)
1478
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1479
+ TRANSACTION (0.0ms) begin transaction
1480
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
1481
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
1482
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1483
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1484
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1485
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.212546"], ["updated_at", "2024-08-14 20:35:21.212546"]]
1486
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1487
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1488
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1489
+ TRANSACTION (2.6ms) SAVEPOINT active_record_1
1490
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1491
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1492
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.221552"], ["updated_at", "2024-08-14 20:35:21.221552"]]
1493
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1494
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1495
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1496
+ TRANSACTION (0.4ms) rollback transaction
1497
+ TRANSACTION (0.0ms) begin transaction
1498
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1499
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1500
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1501
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.241286"], ["updated_at", "2024-08-14 20:35:21.241286"]]
1502
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1503
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1504
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1505
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1506
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.241874"], ["updated_at", "2024-08-14 20:35:21.241874"]]
1507
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1508
+ TRANSACTION (0.2ms) rollback transaction
1509
+ TRANSACTION (0.0ms) begin transaction
1510
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1511
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1512
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1513
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.242762"], ["updated_at", "2024-08-14 20:35:21.242762"]]
1514
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1515
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1516
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1517
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1518
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.243272"], ["updated_at", "2024-08-14 20:35:21.243272"]]
1519
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1520
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1521
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1522
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
1523
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
1524
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1525
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.243979"], ["updated_at", "2024-08-14 20:35:21.243979"]]
1526
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1527
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1528
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1529
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1530
+ TRANSACTION (0.1ms) rollback transaction
1531
+ TRANSACTION (0.0ms) begin transaction
1532
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1533
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1534
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1535
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.245105"], ["updated_at", "2024-08-14 20:35:21.245105"]]
1536
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1537
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1538
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1539
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1540
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.245694"], ["updated_at", "2024-08-14 20:35:21.245694"]]
1541
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1542
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
1543
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
1544
+ TRANSACTION (0.1ms) rollback transaction
1545
+ TRANSACTION (0.0ms) begin transaction
1546
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1547
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1548
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1549
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.246792"], ["updated_at", "2024-08-14 20:35:21.246792"]]
1550
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1551
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1552
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1553
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1554
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.247284"], ["updated_at", "2024-08-14 20:35:21.247284"]]
1555
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1556
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
1557
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
1558
+ TRANSACTION (0.1ms) rollback transaction
1559
+ TRANSACTION (0.0ms) begin transaction
1560
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1561
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1562
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
1563
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:35:21.248279"], ["updated_at", "2024-08-14 20:35:21.248279"]]
1564
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1565
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1566
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1567
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
1568
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:35:21.248780"], ["updated_at", "2024-08-14 20:35:21.248780"]]
1569
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1570
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1571
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1572
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1573
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1574
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
1575
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
1576
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1577
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1578
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1579
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1580
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1581
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1582
+ TRANSACTION (0.1ms) rollback transaction
1583
+ TRANSACTION (0.0ms) begin transaction
1584
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1585
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1586
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1587
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.251716"], ["updated_at", "2024-08-14 20:35:21.251716"]]
1588
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1589
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1590
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1591
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1592
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1593
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1594
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.257581"], ["updated_at", "2024-08-14 20:35:21.257581"]]
1595
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1596
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1597
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1598
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1599
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1600
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.258372"], ["updated_at", "2024-08-14 20:35:21.258372"]]
1601
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1602
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1603
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1604
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1605
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1606
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1607
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1608
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1609
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:21.259457"], ["updated_at", "2024-08-14 20:35:21.259457"]]
1610
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1611
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1612
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1613
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1614
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1615
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1616
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1617
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1618
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.260530"], ["updated_at", "2024-08-14 20:35:21.260530"]]
1619
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1620
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1621
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1622
+ TRANSACTION (0.2ms) rollback transaction
1623
+ TRANSACTION (0.0ms) begin transaction
1624
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1625
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1626
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1627
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.261711"], ["updated_at", "2024-08-14 20:35:21.261711"]]
1628
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1629
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1630
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1631
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1632
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.262272"], ["updated_at", "2024-08-14 20:35:21.262272"]]
1633
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1634
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1635
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1636
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1637
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.262870"], ["updated_at", "2024-08-14 20:35:21.262870"]]
1638
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1639
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1640
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1641
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1642
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:21.263357"], ["updated_at", "2024-08-14 20:35:21.263357"]]
1643
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1644
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1645
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1646
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1647
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.263911"], ["updated_at", "2024-08-14 20:35:21.263911"]]
1648
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1649
+ TRANSACTION (0.2ms) rollback transaction
1650
+ TRANSACTION (0.0ms) begin transaction
1651
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1652
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1653
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1654
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.264730"], ["updated_at", "2024-08-14 20:35:21.264730"]]
1655
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1656
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1657
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1658
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1659
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.265413"], ["updated_at", "2024-08-14 20:35:21.265413"]]
1660
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1661
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1662
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1663
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1664
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:21.265904"], ["updated_at", "2024-08-14 20:35:21.265904"]]
1665
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1666
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1667
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1668
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1669
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.266320"], ["updated_at", "2024-08-14 20:35:21.266320"]]
1670
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1671
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1672
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1673
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1674
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.266869"], ["updated_at", "2024-08-14 20:35:21.266869"]]
1675
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1676
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1677
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1678
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - (sort_position + 1) WHERE "items"."container_id" = ? AND "items"."sort_position" >= 1 [["container_id", 1]]
1679
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? AND "items"."sort_position" < 0 [["container_id", 1]]
1680
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1681
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.267579"], ["updated_at", "2024-08-14 20:35:21.267579"]]
1682
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1683
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1684
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1685
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1686
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]]
1687
+ TRANSACTION (0.1ms) rollback transaction
1688
+ TRANSACTION (0.0ms) begin transaction
1689
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1690
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1691
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1692
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.268786"], ["updated_at", "2024-08-14 20:35:21.268786"]]
1693
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1694
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1695
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1696
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1697
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.269495"], ["updated_at", "2024-08-14 20:35:21.269495"]]
1698
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1699
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1700
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1701
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1702
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:21.269979"], ["updated_at", "2024-08-14 20:35:21.269979"]]
1703
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1704
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1705
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1706
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1707
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.270388"], ["updated_at", "2024-08-14 20:35:21.270388"]]
1708
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1709
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1710
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1711
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1712
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.270966"], ["updated_at", "2024-08-14 20:35:21.270966"]]
1713
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1714
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1715
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 2 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1716
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1717
+ TRANSACTION (0.3ms) rollback transaction
1718
+ TRANSACTION (0.0ms) begin transaction
1719
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1720
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1721
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1722
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.272337"], ["updated_at", "2024-08-14 20:35:21.272337"]]
1723
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1724
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1725
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1726
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1727
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.273053"], ["updated_at", "2024-08-14 20:35:21.273053"]]
1728
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1729
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1730
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1731
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1732
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:35:21.273585"], ["updated_at", "2024-08-14 20:35:21.273585"]]
1733
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1734
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1735
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1736
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1737
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.274017"], ["updated_at", "2024-08-14 20:35:21.274017"]]
1738
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1739
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1740
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1741
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1742
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:35:21.274599"], ["updated_at", "2024-08-14 20:35:21.274599"]]
1743
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1744
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1745
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 2 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1746
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1747
+ TRANSACTION (0.2ms) rollback transaction
1748
+ TRANSACTION (0.0ms) begin transaction
1749
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1750
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1751
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1752
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:35:21.275845"], ["updated_at", "2024-08-14 20:35:21.275845"]]
1753
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1754
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1755
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1756
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 21], ["container_id", 1], ["LIMIT", 1]]
1757
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 21], ["created_at", "2024-08-14 20:35:21.276596"], ["updated_at", "2024-08-14 20:35:21.276596"]]
1758
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1759
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1760
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 42], ["container_id", 1], ["LIMIT", 1]]
1761
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 42], ["created_at", "2024-08-14 20:35:21.277023"], ["updated_at", "2024-08-14 20:35:21.277023"]]
1762
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1763
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1764
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1765
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1766
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:35:21.277439"], ["updated_at", "2024-08-14 20:35:21.277439"]]
1767
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1768
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1769
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1770
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 84], ["container_id", 2], ["LIMIT", 1]]
1771
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 84], ["created_at", "2024-08-14 20:35:21.278020"], ["updated_at", "2024-08-14 20:35:21.278020"]]
1772
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1773
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1774
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1775
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1776
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
1777
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1778
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1779
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END WHERE "items"."container_id" = ? [["container_id", 1]]
1780
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 1]]
1781
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1782
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1783
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1784
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1785
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
1786
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1787
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1788
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1789
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1790
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 2], ["LIMIT", 1]]
1791
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1792
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1793
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 84 THEN -1 END WHERE "items"."container_id" = ? [["container_id", 2]]
1794
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 2]]
1795
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1796
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1797
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1798
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1799
+ TRANSACTION (0.2ms) rollback transaction
1800
+ TRANSACTION (0.0ms) begin transaction
1801
+ TRANSACTION (0.0ms) rollback transaction
1802
+ TRANSACTION (0.0ms) begin transaction
1803
+ TRANSACTION (0.0ms) rollback transaction
1804
+ TRANSACTION (0.0ms) begin transaction
1805
+ TRANSACTION (0.0ms) rollback transaction
1806
+ TRANSACTION (0.0ms) begin transaction
1807
+ TRANSACTION (0.0ms) rollback transaction
1808
+ TRANSACTION (0.0ms) begin transaction
1809
+ TRANSACTION (0.0ms) rollback transaction
1810
+ TRANSACTION (0.0ms) begin transaction
1811
+ TRANSACTION (0.0ms) rollback transaction
1812
+  (0.3ms) SELECT sqlite_version(*)
1813
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
1814
+  (0.0ms) SELECT sqlite_version(*)
1815
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
1816
+ TRANSACTION (0.0ms) begin transaction
1817
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
1818
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
1819
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1820
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1821
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1822
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.176559"], ["updated_at", "2024-08-14 20:37:00.176559"]]
1823
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1824
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1825
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1826
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1827
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1828
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1829
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.188523"], ["updated_at", "2024-08-14 20:37:00.188523"]]
1830
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1831
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1832
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1833
+ TRANSACTION (0.4ms) rollback transaction
1834
+ TRANSACTION (0.0ms) begin transaction
1835
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1836
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1837
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1838
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.204396"], ["updated_at", "2024-08-14 20:37:00.204396"]]
1839
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1840
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1841
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1842
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1843
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.204958"], ["updated_at", "2024-08-14 20:37:00.204958"]]
1844
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1845
+ TRANSACTION (0.1ms) rollback transaction
1846
+ TRANSACTION (0.0ms) begin transaction
1847
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1848
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1849
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1850
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.205790"], ["updated_at", "2024-08-14 20:37:00.205790"]]
1851
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1852
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1853
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1854
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1855
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.206305"], ["updated_at", "2024-08-14 20:37:00.206305"]]
1856
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1857
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1858
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1859
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
1860
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
1861
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1862
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.207009"], ["updated_at", "2024-08-14 20:37:00.207009"]]
1863
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1864
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1865
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1866
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
1867
+ TRANSACTION (0.1ms) rollback transaction
1868
+ TRANSACTION (0.0ms) begin transaction
1869
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1870
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1871
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1872
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.208114"], ["updated_at", "2024-08-14 20:37:00.208114"]]
1873
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1874
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1875
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1876
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1877
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.208693"], ["updated_at", "2024-08-14 20:37:00.208693"]]
1878
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1879
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
1880
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
1881
+ TRANSACTION (0.1ms) rollback transaction
1882
+ TRANSACTION (0.0ms) begin transaction
1883
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1884
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1885
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1886
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.209755"], ["updated_at", "2024-08-14 20:37:00.209755"]]
1887
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1888
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1889
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1890
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1891
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.210248"], ["updated_at", "2024-08-14 20:37:00.210248"]]
1892
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1893
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
1894
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
1895
+ TRANSACTION (0.1ms) rollback transaction
1896
+ TRANSACTION (0.0ms) begin transaction
1897
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1898
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1899
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
1900
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:37:00.211265"], ["updated_at", "2024-08-14 20:37:00.211265"]]
1901
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1902
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1903
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1904
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
1905
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:37:00.211762"], ["updated_at", "2024-08-14 20:37:00.211762"]]
1906
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1907
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1908
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1909
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1910
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1911
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
1912
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
1913
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1914
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1915
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1916
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
1917
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1918
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1919
+ TRANSACTION (0.1ms) rollback transaction
1920
+ TRANSACTION (0.0ms) begin transaction
1921
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1922
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1923
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1924
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.214733"], ["updated_at", "2024-08-14 20:37:00.214733"]]
1925
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1926
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1927
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
1928
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1929
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1930
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1931
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.220678"], ["updated_at", "2024-08-14 20:37:00.220678"]]
1932
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1933
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1934
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1935
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1936
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1937
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.221482"], ["updated_at", "2024-08-14 20:37:00.221482"]]
1938
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1939
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1940
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1941
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1942
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1943
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1944
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1945
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1946
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:37:00.222559"], ["updated_at", "2024-08-14 20:37:00.222559"]]
1947
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1948
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1949
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
1950
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
1951
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
1952
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1953
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1954
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1955
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.223674"], ["updated_at", "2024-08-14 20:37:00.223674"]]
1956
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1957
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
1958
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
1959
+ TRANSACTION (0.2ms) rollback transaction
1960
+ TRANSACTION (0.0ms) begin transaction
1961
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1962
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1963
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1964
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.224882"], ["updated_at", "2024-08-14 20:37:00.224882"]]
1965
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1966
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1967
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1968
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
1969
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.225450"], ["updated_at", "2024-08-14 20:37:00.225450"]]
1970
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1971
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1972
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1973
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1974
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.226038"], ["updated_at", "2024-08-14 20:37:00.226038"]]
1975
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1976
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1977
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1978
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
1979
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:37:00.226529"], ["updated_at", "2024-08-14 20:37:00.226529"]]
1980
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1981
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1982
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
1983
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
1984
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.227081"], ["updated_at", "2024-08-14 20:37:00.227081"]]
1985
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1986
+ TRANSACTION (0.2ms) rollback transaction
1987
+ TRANSACTION (0.0ms) begin transaction
1988
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1989
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
1990
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
1991
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.227925"], ["updated_at", "2024-08-14 20:37:00.227925"]]
1992
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1993
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1994
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
1995
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
1996
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.228619"], ["updated_at", "2024-08-14 20:37:00.228619"]]
1997
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
1998
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
1999
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2000
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2001
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:37:00.229123"], ["updated_at", "2024-08-14 20:37:00.229123"]]
2002
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2003
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2004
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2005
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2006
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.229537"], ["updated_at", "2024-08-14 20:37:00.229537"]]
2007
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2008
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2009
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2010
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2011
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.230095"], ["updated_at", "2024-08-14 20:37:00.230095"]]
2012
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2013
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2014
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2015
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - (sort_position + 1) WHERE "items"."container_id" = ? AND "items"."sort_position" >= 1 [["container_id", 1]]
2016
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? AND "items"."sort_position" < 0 [["container_id", 1]]
2017
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2018
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.230813"], ["updated_at", "2024-08-14 20:37:00.230813"]]
2019
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2020
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2021
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2022
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2023
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]]
2024
+ TRANSACTION (0.2ms) rollback transaction
2025
+ TRANSACTION (0.0ms) begin transaction
2026
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2027
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2028
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2029
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.232037"], ["updated_at", "2024-08-14 20:37:00.232037"]]
2030
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2031
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2032
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2033
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2034
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.232743"], ["updated_at", "2024-08-14 20:37:00.232743"]]
2035
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2036
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2037
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2038
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2039
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:37:00.233262"], ["updated_at", "2024-08-14 20:37:00.233262"]]
2040
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2041
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2042
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2043
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2044
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.233700"], ["updated_at", "2024-08-14 20:37:00.233700"]]
2045
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2046
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2047
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2048
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2049
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.234288"], ["updated_at", "2024-08-14 20:37:00.234288"]]
2050
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2051
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2052
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 2 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2053
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2054
+ TRANSACTION (0.1ms) rollback transaction
2055
+ TRANSACTION (0.0ms) begin transaction
2056
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2057
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2058
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2059
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.235505"], ["updated_at", "2024-08-14 20:37:00.235505"]]
2060
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2061
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2062
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2063
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2064
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.236198"], ["updated_at", "2024-08-14 20:37:00.236198"]]
2065
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2066
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2067
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2068
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2069
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:37:00.236711"], ["updated_at", "2024-08-14 20:37:00.236711"]]
2070
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2071
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2072
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2073
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2074
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.237134"], ["updated_at", "2024-08-14 20:37:00.237134"]]
2075
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2076
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2077
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2078
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2079
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:37:00.237703"], ["updated_at", "2024-08-14 20:37:00.237703"]]
2080
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2081
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2082
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 2 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2083
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2084
+ TRANSACTION (0.1ms) rollback transaction
2085
+ TRANSACTION (0.0ms) begin transaction
2086
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2087
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2088
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2089
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:37:00.238930"], ["updated_at", "2024-08-14 20:37:00.238930"]]
2090
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2091
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2092
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2093
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 21], ["container_id", 1], ["LIMIT", 1]]
2094
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 21], ["created_at", "2024-08-14 20:37:00.239672"], ["updated_at", "2024-08-14 20:37:00.239672"]]
2095
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2096
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2097
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 42], ["container_id", 1], ["LIMIT", 1]]
2098
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 42], ["created_at", "2024-08-14 20:37:00.240109"], ["updated_at", "2024-08-14 20:37:00.240109"]]
2099
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2100
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2101
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2102
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2103
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:37:00.240524"], ["updated_at", "2024-08-14 20:37:00.240524"]]
2104
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2105
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2106
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
2107
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 84], ["container_id", 2], ["LIMIT", 1]]
2108
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 84], ["created_at", "2024-08-14 20:37:00.241100"], ["updated_at", "2024-08-14 20:37:00.241100"]]
2109
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2110
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2111
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2112
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2113
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
2114
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2115
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2116
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END WHERE "items"."container_id" = ? [["container_id", 1]]
2117
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 1]]
2118
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2119
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2120
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2121
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2122
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
2123
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2124
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2125
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2126
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2127
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 2], ["LIMIT", 1]]
2128
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
2129
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2130
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 84 THEN -1 END WHERE "items"."container_id" = ? [["container_id", 2]]
2131
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 2]]
2132
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2133
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2134
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2135
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2136
+ TRANSACTION (0.2ms) rollback transaction
2137
+ TRANSACTION (0.0ms) begin transaction
2138
+ TRANSACTION (0.0ms) rollback transaction
2139
+ TRANSACTION (0.0ms) begin transaction
2140
+ TRANSACTION (0.0ms) rollback transaction
2141
+ TRANSACTION (0.0ms) begin transaction
2142
+ TRANSACTION (0.0ms) rollback transaction
2143
+ TRANSACTION (0.0ms) begin transaction
2144
+ TRANSACTION (0.0ms) rollback transaction
2145
+ TRANSACTION (0.0ms) begin transaction
2146
+ TRANSACTION (0.0ms) rollback transaction
2147
+ TRANSACTION (0.0ms) begin transaction
2148
+ TRANSACTION (0.0ms) rollback transaction
2149
+  (0.3ms) SELECT sqlite_version(*)
2150
+  (0.0ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "schema_sha1"]]
2151
+  (0.0ms) SELECT sqlite_version(*)
2152
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
2153
+ TRANSACTION (0.0ms) begin transaction
2154
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
2155
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" LIMIT ? [["LIMIT", 1]]
2156
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2157
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2158
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2159
+ Container Create (0.2ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:55.987437"], ["updated_at", "2024-08-14 20:39:55.987437"]]
2160
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2161
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2162
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2163
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2164
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2165
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2166
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:55.999622"], ["updated_at", "2024-08-14 20:39:55.999622"]]
2167
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2168
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2169
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2170
+ TRANSACTION (0.4ms) rollback transaction
2171
+ TRANSACTION (0.0ms) begin transaction
2172
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2173
+  (0.1ms) SELECT MAX("containers"."sort_position") FROM "containers"
2174
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2175
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.015605"], ["updated_at", "2024-08-14 20:39:56.015605"]]
2176
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2177
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2178
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2179
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2180
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.016171"], ["updated_at", "2024-08-14 20:39:56.016171"]]
2181
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2182
+ TRANSACTION (0.1ms) rollback transaction
2183
+ TRANSACTION (0.0ms) begin transaction
2184
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2185
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2186
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2187
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.017030"], ["updated_at", "2024-08-14 20:39:56.017030"]]
2188
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2189
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2190
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2191
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2192
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.017540"], ["updated_at", "2024-08-14 20:39:56.017540"]]
2193
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2194
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2195
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2196
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - (sort_position + 1) WHERE "containers"."sort_position" >= 1
2197
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position WHERE "containers"."sort_position" < 0
2198
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2199
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.018248"], ["updated_at", "2024-08-14 20:39:56.018248"]]
2200
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2201
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2202
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2203
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2204
+ TRANSACTION (0.1ms) rollback transaction
2205
+ TRANSACTION (0.0ms) begin transaction
2206
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2207
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2208
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2209
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.019362"], ["updated_at", "2024-08-14 20:39:56.019362"]]
2210
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2211
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2212
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2213
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2214
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.019932"], ["updated_at", "2024-08-14 20:39:56.019932"]]
2215
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2216
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 1 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
2217
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" > 2 ORDER BY "containers"."id" ASC LIMIT ? [["LIMIT", 1]]
2218
+ TRANSACTION (0.1ms) rollback transaction
2219
+ TRANSACTION (0.0ms) begin transaction
2220
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2221
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2222
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2223
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.021027"], ["updated_at", "2024-08-14 20:39:56.021027"]]
2224
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2225
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2226
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2227
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2228
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.021524"], ["updated_at", "2024-08-14 20:39:56.021524"]]
2229
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2230
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 1 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
2231
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."sort_position" < 2 ORDER BY "containers"."id" DESC LIMIT ? [["LIMIT", 1]]
2232
+ TRANSACTION (0.1ms) rollback transaction
2233
+ TRANSACTION (0.0ms) begin transaction
2234
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2235
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2236
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 21], ["LIMIT", 1]]
2237
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 21], ["created_at", "2024-08-14 20:39:56.022564"], ["updated_at", "2024-08-14 20:39:56.022564"]]
2238
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2239
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2240
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2241
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 42], ["LIMIT", 1]]
2242
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 42], ["created_at", "2024-08-14 20:39:56.023063"], ["updated_at", "2024-08-14 20:39:56.023063"]]
2243
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2244
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2245
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2246
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2247
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2248
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END
2249
+ Container Update All (0.0ms) UPDATE "containers" SET sort_position = - sort_position
2250
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2251
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2252
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2253
+ Container Load (0.0ms) SELECT "containers".* FROM "containers"
2254
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2255
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2256
+ TRANSACTION (0.1ms) rollback transaction
2257
+ TRANSACTION (0.0ms) begin transaction
2258
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2259
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2260
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2261
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.026069"], ["updated_at", "2024-08-14 20:39:56.026069"]]
2262
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2263
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2264
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2265
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2266
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2267
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2268
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.032122"], ["updated_at", "2024-08-14 20:39:56.032122"]]
2269
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2270
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2271
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2272
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2273
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2274
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.032942"], ["updated_at", "2024-08-14 20:39:56.032942"]]
2275
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2276
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2277
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2278
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2279
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2280
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2281
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2282
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2283
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:39:56.034028"], ["updated_at", "2024-08-14 20:39:56.034028"]]
2284
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2285
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2286
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."container_id" = ? LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2287
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2288
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2289
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2290
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2291
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2292
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.035113"], ["updated_at", "2024-08-14 20:39:56.035113"]]
2293
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2294
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2295
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
2296
+ TRANSACTION (0.2ms) rollback transaction
2297
+ TRANSACTION (0.0ms) begin transaction
2298
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2299
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2300
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2301
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.036322"], ["updated_at", "2024-08-14 20:39:56.036322"]]
2302
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2303
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2304
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2305
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2306
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.036884"], ["updated_at", "2024-08-14 20:39:56.036884"]]
2307
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2308
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2309
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2310
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2311
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.037524"], ["updated_at", "2024-08-14 20:39:56.037524"]]
2312
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2313
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2314
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2315
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2316
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:39:56.038019"], ["updated_at", "2024-08-14 20:39:56.038019"]]
2317
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2318
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2319
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2320
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2321
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.038571"], ["updated_at", "2024-08-14 20:39:56.038571"]]
2322
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2323
+ TRANSACTION (0.2ms) rollback transaction
2324
+ TRANSACTION (0.0ms) begin transaction
2325
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2326
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2327
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2328
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.039432"], ["updated_at", "2024-08-14 20:39:56.039432"]]
2329
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2330
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2331
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2332
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2333
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.040193"], ["updated_at", "2024-08-14 20:39:56.040193"]]
2334
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2335
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2336
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2337
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2338
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:39:56.040700"], ["updated_at", "2024-08-14 20:39:56.040700"]]
2339
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2340
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2341
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2342
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2343
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.041116"], ["updated_at", "2024-08-14 20:39:56.041116"]]
2344
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2345
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2346
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2347
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2348
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.041683"], ["updated_at", "2024-08-14 20:39:56.041683"]]
2349
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2350
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2351
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2352
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - (sort_position + 1) WHERE "items"."container_id" = ? AND "items"."sort_position" >= 1 [["container_id", 1]]
2353
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? AND "items"."sort_position" < 0 [["container_id", 1]]
2354
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2355
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.042417"], ["updated_at", "2024-08-14 20:39:56.042417"]]
2356
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2357
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2358
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2359
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2360
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 4], ["LIMIT", 1]]
2361
+ TRANSACTION (0.2ms) rollback transaction
2362
+ TRANSACTION (0.0ms) begin transaction
2363
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2364
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2365
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2366
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.043702"], ["updated_at", "2024-08-14 20:39:56.043702"]]
2367
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2368
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2369
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2370
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2371
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.044406"], ["updated_at", "2024-08-14 20:39:56.044406"]]
2372
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2373
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2374
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2375
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2376
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:39:56.044905"], ["updated_at", "2024-08-14 20:39:56.044905"]]
2377
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2378
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2379
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2380
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2381
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.045322"], ["updated_at", "2024-08-14 20:39:56.045322"]]
2382
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2383
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2384
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2385
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2386
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.045886"], ["updated_at", "2024-08-14 20:39:56.045886"]]
2387
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2388
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2389
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 2 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2390
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" > 1 ORDER BY "items"."sort_position" ASC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2391
+ TRANSACTION (0.1ms) rollback transaction
2392
+ TRANSACTION (0.0ms) begin transaction
2393
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2394
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2395
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2396
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.047116"], ["updated_at", "2024-08-14 20:39:56.047116"]]
2397
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2398
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2399
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2400
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 1], ["LIMIT", 1]]
2401
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.047797"], ["updated_at", "2024-08-14 20:39:56.047797"]]
2402
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2403
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2404
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 1]]
2405
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 2], ["container_id", 1], ["LIMIT", 1]]
2406
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 2], ["created_at", "2024-08-14 20:39:56.048305"], ["updated_at", "2024-08-14 20:39:56.048305"]]
2407
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2408
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2409
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2410
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2411
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.048730"], ["updated_at", "2024-08-14 20:39:56.048730"]]
2412
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2413
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2414
+  (0.0ms) SELECT MAX("items"."sort_position") FROM "items" WHERE "items"."container_id" = ? [["container_id", 2]]
2415
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 1], ["container_id", 2], ["LIMIT", 1]]
2416
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 1], ["created_at", "2024-08-14 20:39:56.049307"], ["updated_at", "2024-08-14 20:39:56.049307"]]
2417
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2418
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2419
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 2 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 1], ["LIMIT", 1]]
2420
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? AND "items"."sort_position" < 1 ORDER BY "items"."sort_position" DESC LIMIT ? [["container_id", 2], ["LIMIT", 1]]
2421
+ TRANSACTION (0.2ms) rollback transaction
2422
+ TRANSACTION (0.0ms) begin transaction
2423
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2424
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2425
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 1], ["LIMIT", 1]]
2426
+ Container Create (0.1ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 1], ["created_at", "2024-08-14 20:39:56.050596"], ["updated_at", "2024-08-14 20:39:56.050596"]]
2427
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2428
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2429
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2430
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 21], ["container_id", 1], ["LIMIT", 1]]
2431
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 21], ["created_at", "2024-08-14 20:39:56.051345"], ["updated_at", "2024-08-14 20:39:56.051345"]]
2432
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2433
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2434
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 42], ["container_id", 1], ["LIMIT", 1]]
2435
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 1], ["sort_position", 42], ["created_at", "2024-08-14 20:39:56.051773"], ["updated_at", "2024-08-14 20:39:56.051773"]]
2436
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2437
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2438
+  (0.0ms) SELECT MAX("containers"."sort_position") FROM "containers"
2439
+ Container Exists? (0.0ms) SELECT 1 AS one FROM "containers" WHERE "containers"."sort_position" = ? LIMIT ? [["sort_position", 2], ["LIMIT", 1]]
2440
+ Container Create (0.0ms) INSERT INTO "containers" ("sort_position", "created_at", "updated_at") VALUES (?, ?, ?) [["sort_position", 2], ["created_at", "2024-08-14 20:39:56.052202"], ["updated_at", "2024-08-14 20:39:56.052202"]]
2441
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2442
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2443
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
2444
+ Item Exists? (0.0ms) SELECT 1 AS one FROM "items" WHERE "items"."sort_position" = ? AND "items"."container_id" = ? LIMIT ? [["sort_position", 84], ["container_id", 2], ["LIMIT", 1]]
2445
+ Item Create (0.0ms) INSERT INTO "items" ("container_id", "sort_position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["container_id", 2], ["sort_position", 84], ["created_at", "2024-08-14 20:39:56.052782"], ["updated_at", "2024-08-14 20:39:56.052782"]]
2446
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2447
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2448
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2449
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2450
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
2451
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2452
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2453
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 21 THEN -1 WHEN 42 THEN -2 END WHERE "items"."container_id" = ? [["container_id", 1]]
2454
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 1]]
2455
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2456
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2457
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2458
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2459
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
2460
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 1]]
2461
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2462
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2463
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2464
+ Container Load (0.0ms) SELECT "containers".* FROM "containers" WHERE "containers"."id" = ? ORDER BY "containers"."sort_position" ASC LIMIT ? [["id", 2], ["LIMIT", 1]]
2465
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."container_id" = ? ORDER BY "items"."sort_position" ASC [["container_id", 2]]
2466
+ TRANSACTION (0.0ms) SAVEPOINT active_record_1
2467
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = CASE sort_position WHEN 84 THEN -1 END WHERE "items"."container_id" = ? [["container_id", 2]]
2468
+ Item Update All (0.0ms) UPDATE "items" SET sort_position = - sort_position WHERE "items"."container_id" = ? [["container_id", 2]]
2469
+ TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
2470
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
2471
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
2472
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT ? [["id", 3], ["LIMIT", 1]]
2473
+ TRANSACTION (0.2ms) rollback transaction
2474
+ TRANSACTION (0.0ms) begin transaction
2475
+ TRANSACTION (0.0ms) rollback transaction
2476
+ TRANSACTION (0.0ms) begin transaction
2477
+ TRANSACTION (0.0ms) rollback transaction
2478
+ TRANSACTION (0.0ms) begin transaction
2479
+ TRANSACTION (0.0ms) rollback transaction
2480
+ TRANSACTION (0.0ms) begin transaction
2481
+ TRANSACTION (0.0ms) rollback transaction
2482
+ TRANSACTION (0.0ms) begin transaction
2483
+ TRANSACTION (0.0ms) rollback transaction
2484
+ TRANSACTION (0.0ms) begin transaction
2485
+ TRANSACTION (0.0ms) rollback transaction