arel-helpers 2.13.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afe6ddeb4e41b56b59f08d6b2ac09bfd832e66b995355169b756ed22d11a2136
4
- data.tar.gz: 944d2e1730143abe055f2dad7efe9d01b9ddafabab2080811714d72405177446
3
+ metadata.gz: 667479f8a68b5bb0af49054dea8aad1071976d752ca00f1e6cd4560005b71ba7
4
+ data.tar.gz: 0d7d43d81c584cf98a7a2becb0cc61e9f36af9cc24296146d0e4857855a9ef4b
5
5
  SHA512:
6
- metadata.gz: 5f03ab5b864494bcc5cfb2bc7558c315a18e6460cd815c34855b2b3f0ac9d2696a49b3bd3755543c9124e2ef0667e4d774ae4164cd0317705f74556696c6cfc3
7
- data.tar.gz: e3f704bb25be566eb5797f81804d4446b9c3c96b5df84129afb5bdeec16b91fb420d2cc7ff901648e8dab03a818d2036a5288fa6a11c95d14231b6cd9ed74b97
6
+ metadata.gz: 07545d1df75177211b9e40302b3273df2eac33d29dc3ad42fa8c737b06711f2cdbf6455e1e2b90cb523a7248bfece31e8b16296501c103a8f65c513cf21dde02
7
+ data.tar.gz: 978312ef3268e698c8b155fad5bdbdf084a5175a1a753b8367386d8f116af2fbacb58601288987a3e8cc3a6755eb1efee9412eb459aec72a1990ecb6112e8c1a
data/arel-helpers.gemspec CHANGED
@@ -12,15 +12,16 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.platform = Gem::Platform::RUBY
14
14
 
15
- s.add_dependency 'activerecord', '>= 3.1.0', '< 7'
15
+ s.add_dependency 'activerecord', '>= 3.1.0', '< 8'
16
16
 
17
17
  s.add_development_dependency 'appraisal'
18
18
  s.add_development_dependency 'combustion', '~> 1.3'
19
19
  s.add_development_dependency 'database_cleaner', '~> 1.8'
20
- s.add_development_dependency 'rake', '~> 10.0'
20
+ s.add_development_dependency 'rake'
21
21
  s.add_development_dependency 'rspec', '~> 3'
22
22
  s.add_development_dependency 'sqlite3', '~> 1.4.0'
23
23
 
24
24
  s.require_path = 'lib'
25
25
  s.files = Dir['{lib,spec}/**/*', 'Gemfile', 'History.txt', 'README.md', 'Rakefile', 'arel-helpers.gemspec']
26
+ s.files -= Dir['spec/internal/log', 'spec/internal/log/**/*', 'spec/internal/db', 'spec/internal/db/**/*']
26
27
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ArelHelpers
4
- VERSION = '2.13.0'
4
+ VERSION = '2.14.0'
5
5
  end
@@ -6,6 +6,9 @@ class TestQueryBuilder < ArelHelpers::QueryBuilder
6
6
 
7
7
  def initialize(query = nil)
8
8
  super(query || Post.unscoped)
9
+
10
+ # only necessary for the test environment to prevent pollution between tests
11
+ @query.reload
9
12
  end
10
13
 
11
14
  def noop
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-06 00:00:00.000000000 Z
11
+ date: 2021-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 3.1.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 3.1.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7'
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: appraisal
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -76,16 +76,16 @@ dependencies:
76
76
  name: rake
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: '10.0'
81
+ version: '0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - "~>"
86
+ - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '10.0'
88
+ version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rspec
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -137,9 +137,6 @@ files:
137
137
  - spec/arel_table_spec.rb
138
138
  - spec/env/models.rb
139
139
  - spec/internal/config/database.yml
140
- - spec/internal/db/combustion_test.sqlite
141
- - spec/internal/db/schema.rb
142
- - spec/internal/log/test.log
143
140
  - spec/join_association_spec.rb
144
141
  - spec/query_builder_spec.rb
145
142
  - spec/spec_helper.rb
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ActiveRecord::Schema.define do
4
- create_table :posts do |t|
5
- t.column :title, :string
6
- end
7
-
8
- create_table :comments do |t|
9
- t.references :post
10
- end
11
-
12
- create_table :authors do |t|
13
- t.references :comment
14
- t.references :collab_posts
15
- end
16
-
17
- create_table :favorites do |t|
18
- t.references :post
19
- end
20
-
21
- create_table :collab_posts do |t|
22
- t.references :authors
23
- end
24
-
25
- create_table :cards
26
-
27
- create_table :card_locations do |t|
28
- t.references :location
29
- t.references :card, polymorphic: true
30
- end
31
-
32
- create_table :locations
33
- create_table :community_tickets
34
- end
@@ -1,530 +0,0 @@
1
-  (1.9ms) SELECT sqlite_version(*)
2
-  (0.1ms) SELECT sqlite_version(*)
3
-  (1.5ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar)
4
-  (1.3ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
5
-  (1.3ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
6
-  (1.2ms) CREATE TABLE "authors" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "comment_id" integer, "collab_posts_id" integer)
7
-  (1.3ms) CREATE INDEX "index_authors_on_comment_id" ON "authors" ("comment_id")
8
-  (1.4ms) CREATE INDEX "index_authors_on_collab_posts_id" ON "authors" ("collab_posts_id")
9
-  (1.1ms) CREATE TABLE "favorites" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
10
-  (1.1ms) CREATE INDEX "index_favorites_on_post_id" ON "favorites" ("post_id")
11
-  (0.9ms) CREATE TABLE "collab_posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "authors_id" integer)
12
-  (1.0ms) CREATE INDEX "index_collab_posts_on_authors_id" ON "collab_posts" ("authors_id")
13
-  (1.0ms) CREATE TABLE "cards" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
14
-  (1.0ms) CREATE TABLE "card_locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "location_id" integer, "card_type" varchar, "card_id" integer)
15
-  (0.9ms) CREATE INDEX "index_card_locations_on_location_id" ON "card_locations" ("location_id")
16
-  (1.0ms) CREATE INDEX "index_card_locations_on_card" ON "card_locations" ("card_type", "card_id")
17
-  (0.9ms) CREATE TABLE "locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
18
-  (0.9ms) CREATE TABLE "community_tickets" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
19
-  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
20
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
21
- TRANSACTION (0.0ms) begin transaction
22
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-26 17:33:23.741476"], ["updated_at", "2021-08-26 17:33:23.741476"]]
23
- TRANSACTION (0.9ms) commit transaction
24
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
25
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
26
-  (0.1ms) SELECT sqlite_version(*)
27
-  (0.0ms) PRAGMA foreign_keys
28
-  (0.1ms) PRAGMA defer_foreign_keys
29
-  (0.1ms) PRAGMA defer_foreign_keys = ON
30
-  (0.0ms) PRAGMA foreign_keys = OFF
31
-  (1.1ms) DELETE FROM "posts";
32
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
33
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'posts';
34
-  (1.2ms) DELETE FROM "comments";
35
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
36
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'comments';
37
-  (1.1ms) DELETE FROM "authors";
38
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
39
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'authors';
40
-  (1.0ms) DELETE FROM "favorites";
41
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
42
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'favorites';
43
-  (1.0ms) DELETE FROM "collab_posts";
44
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
45
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'collab_posts';
46
-  (0.9ms) DELETE FROM "cards";
47
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
48
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'cards';
49
-  (1.0ms) DELETE FROM "card_locations";
50
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
51
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'card_locations';
52
-  (0.9ms) DELETE FROM "locations";
53
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
54
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'locations';
55
-  (0.8ms) DELETE FROM "community_tickets";
56
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
57
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'community_tickets';
58
-  (0.0ms) PRAGMA defer_foreign_keys = 0
59
-  (0.0ms) PRAGMA foreign_keys = 1
60
- TRANSACTION (0.0ms) begin transaction
61
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
62
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
63
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
64
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
65
- TRANSACTION (0.2ms) rollback transaction
66
- TRANSACTION (0.0ms) begin transaction
67
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
68
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
69
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
70
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
71
- Comment Create (0.2ms) INSERT INTO "comments" ("post_id") VALUES (?) [["post_id", 1]]
72
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
73
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
74
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
75
- TRANSACTION (0.4ms) rollback transaction
76
- TRANSACTION (0.0ms) begin transaction
77
- Post Load (0.2ms) SELECT "posts".* FROM "posts"
78
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
79
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "foo"]]
80
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
81
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
82
- TRANSACTION (0.4ms) rollback transaction
83
- TRANSACTION (0.1ms) begin transaction
84
- TRANSACTION (0.0ms) rollback transaction
85
- TRANSACTION (0.1ms) begin transaction
86
- TRANSACTION (0.0ms) rollback transaction
87
- TRANSACTION (0.1ms) begin transaction
88
- TRANSACTION (0.1ms) rollback transaction
89
- TRANSACTION (0.1ms) begin transaction
90
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
91
- Location Create (0.4ms) INSERT INTO "locations" DEFAULT VALUES
92
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
93
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
94
- CommunityTicket Create (0.1ms) INSERT INTO "community_tickets" DEFAULT VALUES
95
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
96
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
97
- CardLocation Create (0.3ms) INSERT INTO "card_locations" ("location_id", "card_type", "card_id") VALUES (?, ?, ?) [["location_id", 1], ["card_type", "CommunityTicket"], ["card_id", 1]]
98
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
99
-  (0.1ms) SELECT COUNT(*) FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
100
- Location Load (0.1ms) SELECT "locations".* FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
101
- TRANSACTION (0.5ms) rollback transaction
102
- TRANSACTION (0.0ms) begin transaction
103
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
104
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
105
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
106
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
107
- TRANSACTION (0.3ms) rollback transaction
108
- TRANSACTION (0.1ms) begin transaction
109
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
110
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
111
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
112
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
113
- TRANSACTION (0.4ms) rollback transaction
114
- TRANSACTION (0.0ms) begin transaction
115
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
116
- Post Create (0.5ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
117
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
118
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
119
- TRANSACTION (0.3ms) rollback transaction
120
- TRANSACTION (0.1ms) begin transaction
121
-  (0.1ms) SELECT COUNT(*) FROM "posts"
122
- TRANSACTION (0.1ms) rollback transaction
123
- TRANSACTION (0.1ms) begin transaction
124
- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
125
- TRANSACTION (0.1ms) rollback transaction
126
- TRANSACTION (0.1ms) begin transaction
127
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ? [["LIMIT", 1]]
128
- TRANSACTION (0.0ms) rollback transaction
129
- TRANSACTION (0.0ms) begin transaction
130
-  (0.1ms) SELECT "posts".* FROM "posts"
131
- TRANSACTION (0.0ms) rollback transaction
132
-  (1.2ms) SELECT sqlite_version(*)
133
-  (0.1ms) SELECT sqlite_version(*)
134
-  (1.3ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar)
135
-  (1.2ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
136
-  (1.1ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
137
-  (1.1ms) CREATE TABLE "authors" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "comment_id" integer, "collab_posts_id" integer)
138
-  (1.1ms) CREATE INDEX "index_authors_on_comment_id" ON "authors" ("comment_id")
139
-  (1.0ms) CREATE INDEX "index_authors_on_collab_posts_id" ON "authors" ("collab_posts_id")
140
-  (1.0ms) CREATE TABLE "favorites" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
141
-  (1.0ms) CREATE INDEX "index_favorites_on_post_id" ON "favorites" ("post_id")
142
-  (1.1ms) CREATE TABLE "collab_posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "authors_id" integer)
143
-  (1.1ms) CREATE INDEX "index_collab_posts_on_authors_id" ON "collab_posts" ("authors_id")
144
-  (1.1ms) CREATE TABLE "cards" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
145
-  (1.2ms) CREATE TABLE "card_locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "location_id" integer, "card_type" varchar, "card_id" integer)
146
-  (1.2ms) CREATE INDEX "index_card_locations_on_location_id" ON "card_locations" ("location_id")
147
-  (1.1ms) CREATE INDEX "index_card_locations_on_card" ON "card_locations" ("card_type", "card_id")
148
-  (1.2ms) CREATE TABLE "locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
149
-  (1.0ms) CREATE TABLE "community_tickets" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
150
-  (1.1ms) 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)
151
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
152
- TRANSACTION (0.0ms) begin transaction
153
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-26 17:55:10.184260"], ["updated_at", "2021-08-26 17:55:10.184260"]]
154
- TRANSACTION (1.0ms) commit transaction
155
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
156
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
157
-  (0.1ms) SELECT sqlite_version(*)
158
-  (0.0ms) PRAGMA foreign_keys
159
-  (0.0ms) PRAGMA defer_foreign_keys
160
-  (0.0ms) PRAGMA defer_foreign_keys = ON
161
-  (0.0ms) PRAGMA foreign_keys = OFF
162
-  (1.1ms) DELETE FROM "posts";
163
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
164
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'posts';
165
-  (1.2ms) DELETE FROM "comments";
166
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
167
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'comments';
168
-  (1.1ms) DELETE FROM "authors";
169
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
170
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'authors';
171
-  (1.0ms) DELETE FROM "favorites";
172
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
173
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'favorites';
174
-  (1.1ms) DELETE FROM "collab_posts";
175
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
176
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'collab_posts';
177
-  (1.0ms) DELETE FROM "cards";
178
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
179
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'cards';
180
-  (1.0ms) DELETE FROM "card_locations";
181
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
182
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'card_locations';
183
-  (0.8ms) DELETE FROM "locations";
184
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
185
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'locations';
186
-  (1.0ms) DELETE FROM "community_tickets";
187
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
188
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'community_tickets';
189
-  (0.0ms) PRAGMA defer_foreign_keys = 0
190
-  (0.0ms) PRAGMA foreign_keys = 1
191
- TRANSACTION (0.0ms) begin transaction
192
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
193
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
194
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
195
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
196
- TRANSACTION (0.3ms) rollback transaction
197
- TRANSACTION (0.1ms) begin transaction
198
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
199
- Post Create (0.5ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
200
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
201
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
202
- Comment Create (0.2ms) INSERT INTO "comments" ("post_id") VALUES (?) [["post_id", 1]]
203
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
204
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
205
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
206
- TRANSACTION (0.3ms) rollback transaction
207
- TRANSACTION (0.0ms) begin transaction
208
- Post Load (0.1ms) SELECT "posts".* FROM "posts"
209
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
210
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "foo"]]
211
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
212
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
213
- TRANSACTION (0.4ms) rollback transaction
214
- TRANSACTION (0.1ms) begin transaction
215
- TRANSACTION (0.0ms) rollback transaction
216
- TRANSACTION (0.0ms) begin transaction
217
- TRANSACTION (0.1ms) rollback transaction
218
- TRANSACTION (0.1ms) begin transaction
219
- TRANSACTION (0.1ms) rollback transaction
220
- TRANSACTION (0.1ms) begin transaction
221
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
222
- Location Create (0.4ms) INSERT INTO "locations" DEFAULT VALUES
223
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
224
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
225
- CommunityTicket Create (0.1ms) INSERT INTO "community_tickets" DEFAULT VALUES
226
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
227
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
228
- CardLocation Create (0.2ms) INSERT INTO "card_locations" ("location_id", "card_type", "card_id") VALUES (?, ?, ?) [["location_id", 1], ["card_type", "CommunityTicket"], ["card_id", 1]]
229
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
230
-  (0.1ms) SELECT COUNT(*) FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
231
- Location Load (0.1ms) SELECT "locations".* FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
232
- TRANSACTION (0.4ms) rollback transaction
233
- TRANSACTION (0.1ms) begin transaction
234
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
235
- Post Create (0.5ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
236
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
237
- Post Load (0.1ms) SELECT "posts".* FROM "posts"
238
- TRANSACTION (0.4ms) rollback transaction
239
- TRANSACTION (0.1ms) begin transaction
240
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
241
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
242
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
243
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
244
- TRANSACTION (0.3ms) rollback transaction
245
- TRANSACTION (0.0ms) begin transaction
246
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
247
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
248
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
249
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
250
- TRANSACTION (0.3ms) rollback transaction
251
- TRANSACTION (0.1ms) begin transaction
252
-  (0.2ms) SELECT COUNT(*) FROM "posts"
253
- TRANSACTION (0.1ms) rollback transaction
254
- TRANSACTION (0.0ms) begin transaction
255
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
256
- TRANSACTION (0.0ms) rollback transaction
257
- TRANSACTION (0.0ms) begin transaction
258
- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ? [["LIMIT", 1]]
259
- TRANSACTION (0.0ms) rollback transaction
260
- TRANSACTION (0.0ms) begin transaction
261
-  (0.1ms) SELECT "posts".* FROM "posts"
262
- TRANSACTION (0.0ms) rollback transaction
263
-  (1.5ms) SELECT sqlite_version(*)
264
-  (0.1ms) SELECT sqlite_version(*)
265
-  (1.4ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar)
266
-  (1.0ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
267
-  (1.0ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
268
-  (0.9ms) CREATE TABLE "authors" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "comment_id" integer, "collab_posts_id" integer)
269
-  (1.0ms) CREATE INDEX "index_authors_on_comment_id" ON "authors" ("comment_id")
270
-  (1.0ms) CREATE INDEX "index_authors_on_collab_posts_id" ON "authors" ("collab_posts_id")
271
-  (0.9ms) CREATE TABLE "favorites" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
272
-  (0.9ms) CREATE INDEX "index_favorites_on_post_id" ON "favorites" ("post_id")
273
-  (1.0ms) CREATE TABLE "collab_posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "authors_id" integer)
274
-  (0.9ms) CREATE INDEX "index_collab_posts_on_authors_id" ON "collab_posts" ("authors_id")
275
-  (0.9ms) CREATE TABLE "cards" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
276
-  (0.9ms) CREATE TABLE "card_locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "location_id" integer, "card_type" varchar, "card_id" integer)
277
-  (0.9ms) CREATE INDEX "index_card_locations_on_location_id" ON "card_locations" ("location_id")
278
-  (0.9ms) CREATE INDEX "index_card_locations_on_card" ON "card_locations" ("card_type", "card_id")
279
-  (0.9ms) CREATE TABLE "locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
280
-  (1.0ms) CREATE TABLE "community_tickets" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
281
-  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
282
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
283
- TRANSACTION (0.0ms) begin transaction
284
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-08-26 17:57:07.842116"], ["updated_at", "2021-08-26 17:57:07.842116"]]
285
- TRANSACTION (0.8ms) commit transaction
286
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
287
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
288
-  (0.1ms) SELECT sqlite_version(*)
289
-  (0.0ms) PRAGMA foreign_keys
290
-  (0.0ms) PRAGMA defer_foreign_keys
291
-  (0.0ms) PRAGMA defer_foreign_keys = ON
292
-  (0.0ms) PRAGMA foreign_keys = OFF
293
-  (0.9ms) DELETE FROM "posts";
294
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
295
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'posts';
296
-  (0.8ms) DELETE FROM "comments";
297
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
298
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'comments';
299
-  (0.8ms) DELETE FROM "authors";
300
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
301
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'authors';
302
-  (0.8ms) DELETE FROM "favorites";
303
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
304
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'favorites';
305
-  (0.6ms) DELETE FROM "collab_posts";
306
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
307
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'collab_posts';
308
-  (0.8ms) DELETE FROM "cards";
309
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
310
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'cards';
311
-  (1.0ms) DELETE FROM "card_locations";
312
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
313
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'card_locations';
314
-  (0.6ms) DELETE FROM "locations";
315
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
316
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'locations';
317
-  (1.0ms) DELETE FROM "community_tickets";
318
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
319
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'community_tickets';
320
-  (0.0ms) PRAGMA defer_foreign_keys = 0
321
-  (0.0ms) PRAGMA foreign_keys = 1
322
- TRANSACTION (0.0ms) begin transaction
323
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
324
- Post Create (0.3ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
325
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
326
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
327
- TRANSACTION (0.3ms) rollback transaction
328
- TRANSACTION (0.1ms) begin transaction
329
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
330
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
331
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
332
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
333
- Comment Create (0.2ms) INSERT INTO "comments" ("post_id") VALUES (?) [["post_id", 1]]
334
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
335
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
336
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
337
- TRANSACTION (0.4ms) rollback transaction
338
- TRANSACTION (0.0ms) begin transaction
339
- Post Load (0.1ms) SELECT "posts".* FROM "posts"
340
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
341
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "foo"]]
342
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
343
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
344
- TRANSACTION (0.2ms) rollback transaction
345
- TRANSACTION (0.1ms) begin transaction
346
- TRANSACTION (0.0ms) rollback transaction
347
- TRANSACTION (0.1ms) begin transaction
348
- TRANSACTION (0.0ms) rollback transaction
349
- TRANSACTION (0.0ms) begin transaction
350
- TRANSACTION (0.1ms) rollback transaction
351
- TRANSACTION (0.1ms) begin transaction
352
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
353
- Location Create (0.4ms) INSERT INTO "locations" DEFAULT VALUES
354
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
355
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
356
- CommunityTicket Create (0.1ms) INSERT INTO "community_tickets" DEFAULT VALUES
357
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
358
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
359
- CardLocation Create (0.3ms) INSERT INTO "card_locations" ("location_id", "card_type", "card_id") VALUES (?, ?, ?) [["location_id", 1], ["card_type", "CommunityTicket"], ["card_id", 1]]
360
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
361
-  (0.1ms) SELECT COUNT(*) FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
362
- Location Load (0.1ms) SELECT "locations".* FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
363
- TRANSACTION (0.4ms) rollback transaction
364
- TRANSACTION (0.1ms) begin transaction
365
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
366
- Post Create (0.5ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
367
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
368
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
369
- TRANSACTION (0.2ms) rollback transaction
370
- TRANSACTION (0.0ms) begin transaction
371
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
372
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
373
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
374
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
375
- TRANSACTION (0.3ms) rollback transaction
376
- TRANSACTION (0.0ms) begin transaction
377
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
378
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
379
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
380
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
381
- TRANSACTION (0.2ms) rollback transaction
382
- TRANSACTION (0.1ms) begin transaction
383
-  (0.1ms) SELECT COUNT(*) FROM "posts"
384
- TRANSACTION (0.0ms) rollback transaction
385
- TRANSACTION (0.0ms) begin transaction
386
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
387
- TRANSACTION (0.0ms) rollback transaction
388
- TRANSACTION (0.0ms) begin transaction
389
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ? [["LIMIT", 1]]
390
- TRANSACTION (0.0ms) rollback transaction
391
- TRANSACTION (0.0ms) begin transaction
392
-  (0.1ms) SELECT "posts".* FROM "posts"
393
- TRANSACTION (0.0ms) rollback transaction
394
-  (1.3ms) SELECT sqlite_version(*)
395
-  (0.0ms) SELECT sqlite_version(*)
396
-  (1.0ms) CREATE TABLE "posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar)
397
-  (1.0ms) CREATE TABLE "comments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
398
-  (1.0ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
399
-  (1.1ms) CREATE TABLE "authors" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "comment_id" integer, "collab_posts_id" integer)
400
-  (1.0ms) CREATE INDEX "index_authors_on_comment_id" ON "authors" ("comment_id")
401
-  (0.9ms) CREATE INDEX "index_authors_on_collab_posts_id" ON "authors" ("collab_posts_id")
402
-  (0.9ms) CREATE TABLE "favorites" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer)
403
-  (0.9ms) CREATE INDEX "index_favorites_on_post_id" ON "favorites" ("post_id")
404
-  (0.9ms) CREATE TABLE "collab_posts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "authors_id" integer)
405
-  (0.8ms) CREATE INDEX "index_collab_posts_on_authors_id" ON "collab_posts" ("authors_id")
406
-  (1.0ms) CREATE TABLE "cards" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
407
-  (0.9ms) CREATE TABLE "card_locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "location_id" integer, "card_type" varchar, "card_id" integer)
408
-  (0.9ms) CREATE INDEX "index_card_locations_on_location_id" ON "card_locations" ("location_id")
409
-  (1.1ms) CREATE INDEX "index_card_locations_on_card" ON "card_locations" ("card_type", "card_id")
410
-  (0.9ms) CREATE TABLE "locations" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
411
-  (0.9ms) CREATE TABLE "community_tickets" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL)
412
-  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
413
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
414
- TRANSACTION (0.0ms) begin transaction
415
- ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2021-12-06 21:11:29.100377"], ["updated_at", "2021-12-06 21:11:29.100377"]]
416
- TRANSACTION (0.8ms) commit transaction
417
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
418
- ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
419
-  (0.1ms) SELECT sqlite_version(*)
420
-  (0.0ms) PRAGMA foreign_keys
421
-  (0.0ms) PRAGMA defer_foreign_keys
422
-  (0.1ms) PRAGMA defer_foreign_keys = ON
423
-  (0.0ms) PRAGMA foreign_keys = OFF
424
-  (0.8ms) DELETE FROM "posts";
425
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
426
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'posts';
427
-  (0.8ms) DELETE FROM "comments";
428
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
429
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'comments';
430
-  (1.7ms) DELETE FROM "authors";
431
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
432
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'authors';
433
-  (1.1ms) DELETE FROM "favorites";
434
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
435
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'favorites';
436
-  (0.8ms) DELETE FROM "collab_posts";
437
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
438
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'collab_posts';
439
-  (1.1ms) DELETE FROM "cards";
440
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
441
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'cards';
442
-  (0.9ms) DELETE FROM "card_locations";
443
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
444
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'card_locations';
445
-  (0.9ms) DELETE FROM "locations";
446
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
447
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'locations';
448
-  (1.0ms) DELETE FROM "community_tickets";
449
-  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
450
-  (0.1ms) DELETE FROM sqlite_sequence where name = 'community_tickets';
451
-  (0.0ms) PRAGMA defer_foreign_keys = 0
452
-  (0.0ms) PRAGMA foreign_keys = 1
453
- TRANSACTION (0.0ms) begin transaction
454
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
455
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
456
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
457
- Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
458
- TRANSACTION (0.2ms) rollback transaction
459
- TRANSACTION (0.0ms) begin transaction
460
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
461
- Post Create (0.5ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "I'm a little teapot"]]
462
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
463
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
464
- Comment Create (0.2ms) INSERT INTO "comments" ("post_id") VALUES (?) [["post_id", 1]]
465
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
466
- Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
467
- Comment Load (0.0ms) SELECT "comments".* FROM "comments" WHERE "comments"."post_id" = ? [["post_id", 1]]
468
- TRANSACTION (0.4ms) rollback transaction
469
- TRANSACTION (0.0ms) begin transaction
470
- Post Load (0.1ms) SELECT "posts".* FROM "posts"
471
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
472
- Post Create (0.3ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "foo"]]
473
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
474
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
475
- TRANSACTION (0.2ms) rollback transaction
476
- TRANSACTION (0.1ms) begin transaction
477
- TRANSACTION (0.1ms) rollback transaction
478
- TRANSACTION (0.0ms) begin transaction
479
- TRANSACTION (0.0ms) rollback transaction
480
- TRANSACTION (0.0ms) begin transaction
481
- TRANSACTION (0.0ms) rollback transaction
482
- TRANSACTION (0.0ms) begin transaction
483
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
484
- Location Create (0.4ms) INSERT INTO "locations" DEFAULT VALUES
485
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
486
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
487
- CommunityTicket Create (0.2ms) INSERT INTO "community_tickets" DEFAULT VALUES
488
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
489
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
490
- CardLocation Create (0.3ms) INSERT INTO "card_locations" ("location_id", "card_type", "card_id") VALUES (?, ?, ?) [["location_id", 1], ["card_type", "CommunityTicket"], ["card_id", 1]]
491
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
492
-  (0.1ms) SELECT COUNT(*) FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
493
- Location Load (0.4ms) SELECT "locations".* FROM "locations" INNER JOIN "card_locations" ON "card_locations"."card_type" = ? AND "card_locations"."location_id" = "locations"."id" INNER JOIN "community_tickets" ON "community_tickets"."id" = "card_locations"."card_id" [["card_type", "CommunityTicket"]]
494
- TRANSACTION (0.4ms) rollback transaction
495
- TRANSACTION (0.0ms) begin transaction
496
- TRANSACTION (0.0ms) SAVEPOINT active_record_1
497
- Post Create (0.4ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
498
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
499
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
500
- TRANSACTION (0.4ms) rollback transaction
501
- TRANSACTION (0.1ms) begin transaction
502
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
503
- Post Create (0.7ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
504
- TRANSACTION (0.1ms) RELEASE SAVEPOINT active_record_1
505
- Post Load (0.1ms) SELECT "posts".* FROM "posts"
506
- TRANSACTION (0.5ms) rollback transaction
507
- TRANSACTION (0.1ms) begin transaction
508
- TRANSACTION (0.1ms) SAVEPOINT active_record_1
509
- Post Create (0.7ms) INSERT INTO "posts" ("title") VALUES (?) [["title", "Foobar"]]
510
- TRANSACTION (0.0ms) RELEASE SAVEPOINT active_record_1
511
- Post Load (0.0ms) SELECT "posts".* FROM "posts"
512
- TRANSACTION (0.3ms) rollback transaction
513
- TRANSACTION (0.0ms) begin transaction
514
- Post Exists? (0.1ms) SELECT 1 AS one FROM "posts" LIMIT ? [["LIMIT", 1]]
515
- TRANSACTION (0.0ms) rollback transaction
516
- TRANSACTION (0.0ms) begin transaction
517
-  (0.1ms) SELECT COUNT(*) FROM "posts"
518
- TRANSACTION (0.0ms) rollback transaction
519
- TRANSACTION (0.1ms) begin transaction
520
-  (0.1ms) SELECT COUNT(*) FROM "posts"
521
- TRANSACTION (0.1ms) rollback transaction
522
- TRANSACTION (0.0ms) begin transaction
523
- Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
524
- TRANSACTION (0.0ms) rollback transaction
525
- TRANSACTION (0.1ms) begin transaction
526
- Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT ? [["LIMIT", 1]]
527
- TRANSACTION (0.1ms) rollback transaction
528
- TRANSACTION (0.1ms) begin transaction
529
-  (0.1ms) SELECT "posts".* FROM "posts"
530
- TRANSACTION (0.1ms) rollback transaction