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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a674e66bbf9674502c2c5cb25ec4a1dfeca0f9201fa001a54c5a03f025b09718
|
|
4
|
+
data.tar.gz: 32560701fb69a497e6c539cd71e9de071423523f00d2baa1333b6328973b5da0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
54
|
-
#
|
|
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
|
|
162
|
-
#
|
|
163
|
-
#
|
|
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
|