activerecord-virgodb-adapter 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 757fecfe8176d3354cf42df451f013c814c2699b3ac1206a055a3ada8196fd10
4
- data.tar.gz: 945f9ab23d59f055951dcbe55786545f106d7c0c90a26c23699a9e61a32cbec2
3
+ metadata.gz: a674e66bbf9674502c2c5cb25ec4a1dfeca0f9201fa001a54c5a03f025b09718
4
+ data.tar.gz: 32560701fb69a497e6c539cd71e9de071423523f00d2baa1333b6328973b5da0
5
5
  SHA512:
6
- metadata.gz: 24f8356243e4ab3349e1b94c4fb4d561d28e86575442bca4e7185cb1c2a39c745c3f98a25b7bdca0e06f09b5f9cf50af121963fba72d021d2ab3e61b53461dc3
7
- data.tar.gz: f9c6ced6922d7254082c043e2317507d303b63fb4708a957ca8cf33f6fb462711e72690a19074639f37138f5d0e80c884ec13cc0e08d4fd9255edc99ad0df026
6
+ metadata.gz: e9b192ed7e8bc0ad7e3b18a6ecdda847c323a272f70c35b236685718b0aa0b27cca1b63195c4a6df2e403cb49e017ff455f29e8b0a1b932067fcc9cef64c63fc
7
+ data.tar.gz: caeefe677d520080a4db26d04852dbc7adfaa2667c710cc195bd4877307a7ccf452a86b7ff6700d618b67700164217e34676673763c3aad07d056f8d8a4e6693
@@ -50,9 +50,8 @@ module ActiveRecord
50
50
  # real failure modes from that mismatch, not just cosmetic ones:
51
51
  #
52
52
  # 1. `Type::DateTime.new.cast("0")` -- "0" being a perfectly valid
53
- # epoch-seconds default (e.g. exit_page_at/split_test_id_at's own
54
- # DEFAULT 0 sentinel, see
55
- # db/migrate_virgodb/20260727000002_create_ahoy_visits.rb in hintpot)
53
+ # epoch-seconds default (e.g. a real host app declaring `DEFAULT 0`
54
+ # as a sentinel on a nullable-in-spirit timestamp column)
56
55
  # -- returns nil. `Column#default` itself is unaffected (DateTime is
57
56
  # `mutable?`, so `Column#initialize` keeps the raw string rather than
58
57
  # deserializing it -- see ActiveModel::Type::DateTime#mutable?'s own
@@ -158,9 +157,9 @@ module ActiveRecord
158
157
  # falls through to `Type.default_value`, an untyped
159
158
  # `ActiveModel::Type::Value` whose `.type` is nil.
160
159
  # 2. An `AnyLast <type> <order_by_column>` column (the two-scalar-
161
- # column tuple-workaround pairs -- see
162
- # db/migrate_virgodb/20260727000002_create_ahoy_visits.rb in
163
- # hintpot) can get a WRONG match instead of no match: Rails'
160
+ # column tuple-workaround pairs a real host app might use to
161
+ # emulate ClickHouse-style last-touch columns) can get a WRONG
162
+ # match instead of no match: Rails'
164
163
  # %r(date)i is an unanchored substring regex, and
165
164
  # "AnyLast String updated_at" contains the substring "date"
166
165
  # (from "upDATEd_at") purely by accident, mis-casting a String
@@ -113,6 +113,14 @@ module ActiveRecord
113
113
  raw = SQLite3::Database.new(path, readonly: true)
114
114
  raw.busy_timeout = 5_000
115
115
  raw.execute("SELECT DISTINCT table_name FROM schema_versions").flatten
116
+ rescue SQLite3::SQLException
117
+ # File.exist? isn't proof schema_versions exists -- SQLite
118
+ # auto-creates an empty file the instant something connects to a
119
+ # path that doesn't exist yet, and Rails' parallel-test setup
120
+ # (ActiveRecord::TestDatabases.create_and_load_schema, one file per
121
+ # worker) does exactly that via schema_up_to_date? moments before
122
+ # calling drop. Nothing to clean up in that case.
123
+ []
116
124
  ensure
117
125
  raw&.close
118
126
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-virgodb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - virgodb