activerecord-cockroachdb-adapter 8.1.0 → 8.1.2
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 +4 -4
- data/CHANGELOG.md +12 -1
- data/lib/active_record/connection_adapters/cockroachdb/column.rb +4 -1
- data/lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb +59 -5
- data/lib/active_record/connection_adapters/cockroachdb_adapter.rb +39 -13
- data/lib/version.rb +1 -1
- data/test/cases/adapters/cockroachdb/cached_plan_failure_test.rb +106 -0
- data/test/cases/adapters/cockroachdb/referential_integrity_test.rb +44 -2
- data/test/cases/adapters/postgresql/postgis_test.rb +14 -0
- data/test/cases/defaults_test.rb +1 -1
- data/test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterTest.rb +7 -0
- data/test/excludes/PostgreSQLReferentialIntegrityTest.rb +4 -0
- data/test/excludes/QueryCacheExpiryTest.rb +10 -0
- data/test/excludes/SchemaIndexOpclassTest.rb +1 -0
- metadata +178 -177
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89db3d0e5b53942784db247fbdf247790cc0e8a06861f6881546e348d0c151bb
|
|
4
|
+
data.tar.gz: 26e1b278cf2abe8dc532eaa3ab187c356760d40cb1b42c1a3561117ab4a32c58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 599a68d0aeb772af6fb102004deb44d5d548a5d0dcc16e38d187c324c7957f023f8bd3cae6438922f103a6b813e661f0e429848b9cc2ec5b65a89f4491141df1
|
|
7
|
+
data.tar.gz: 26257cf4314a3654444f4154e75acb626c8ccf4d6a1237f18153c78a253dfd93125f663f803e01303492766e9db6e3478f87f4abdbbeb299d36cf425c84dc043
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Ongoing
|
|
4
4
|
|
|
5
|
-
## 8.
|
|
5
|
+
## 8.1.2 - 2026-09-25
|
|
6
|
+
|
|
7
|
+
- Verified compatibility with Rails 8.1.4 ([#407](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/407))
|
|
8
|
+
|
|
9
|
+
## 8.1.1 - 2026-08-18
|
|
10
|
+
|
|
11
|
+
- Disabled `schema_locked` by default on connect for CockroachDB v25.3+ and unlocked tables around batched foreign key changes ([#404](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/404))
|
|
12
|
+
- Improved error classification by detecting cached plan failures from the error message instead of the source function ([#403](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/403))
|
|
13
|
+
- Stopped advertising support for restarting database transactions ([#398](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/398))
|
|
14
|
+
- Fixed enum columns being misdetected as spatial columns ([#396](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/396))
|
|
15
|
+
|
|
16
|
+
## 8.1.0 - 2025-11-25
|
|
6
17
|
- Add support for Rails 8.1 ([#386](https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/386))
|
|
7
18
|
|
|
8
19
|
## 8.0.3 - 2025-08-19
|
|
@@ -27,9 +27,12 @@ module ActiveRecord
|
|
|
27
27
|
super(name, cast_type, default, sql_type_metadata, null, default_function,
|
|
28
28
|
collation: collation, comment: comment, serial: serial, generated: generated, identity: identity)
|
|
29
29
|
|
|
30
|
-
@geographic = sql_type_metadata.sql_type.match?(/geography\(/i)
|
|
31
30
|
@hidden = hidden
|
|
32
31
|
|
|
32
|
+
return unless spatial?
|
|
33
|
+
|
|
34
|
+
@geographic = sql_type_metadata.sql_type.match?(/geography\(/i)
|
|
35
|
+
|
|
33
36
|
if @geographic
|
|
34
37
|
# Geographic type information is embedded in the SQL type
|
|
35
38
|
@srid = 4326
|
|
@@ -84,7 +84,9 @@ WARNING
|
|
|
84
84
|
|
|
85
85
|
schema_creation.accept(at)
|
|
86
86
|
end
|
|
87
|
-
|
|
87
|
+
with_schema_unlocked(foreign_keys.flat_map { |fk| [fk.from_table, fk.to_table] }) do
|
|
88
|
+
execute_batch(statements, "Disable referential integrity -> remove foreign keys")
|
|
89
|
+
end
|
|
88
90
|
end
|
|
89
91
|
|
|
90
92
|
# NOTE: This method should never raise, otherwise we risk polluting table name
|
|
@@ -95,16 +97,68 @@ WARNING
|
|
|
95
97
|
# for every key. This method is performance critical for the test suite, hence
|
|
96
98
|
# we use the `#all_foreign_keys` method that only make one query to the database.
|
|
97
99
|
already_inserted_foreign_keys = all_foreign_keys
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
foreign_keys_to_add = foreign_keys.reject do |foreign_key|
|
|
101
|
+
already_inserted_foreign_keys.any? { |fk| fk.from_table == foreign_key.from_table && fk.options[:name] == foreign_key.options[:name] }
|
|
102
|
+
end
|
|
103
|
+
statements = foreign_keys_to_add.map do |foreign_key|
|
|
101
104
|
options = foreign_key_options(foreign_key.from_table, foreign_key.to_table, foreign_key.options)
|
|
102
105
|
at = create_alter_table foreign_key.from_table
|
|
103
106
|
at.add_foreign_key foreign_key.to_table, options
|
|
104
107
|
|
|
105
108
|
schema_creation.accept(at)
|
|
106
109
|
end
|
|
107
|
-
|
|
110
|
+
with_schema_unlocked(foreign_keys_to_add.flat_map { |fk| [fk.from_table, fk.to_table] }) do
|
|
111
|
+
execute_batch(statements, "Disable referential integrity -> add foreign keys")
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Starting in CockroachDB v26.x, tables are created with the
|
|
116
|
+
# `schema_locked` storage parameter enabled by default (it improves
|
|
117
|
+
# changefeed performance). CockroachDB transparently unlocks a table to
|
|
118
|
+
# run a single-statement DDL, but it cannot do so for the multi-statement
|
|
119
|
+
# batches used to drop and re-add foreign keys above: it raises instead
|
|
120
|
+
# of unlocking automatically. So we unlock the affected tables ourselves,
|
|
121
|
+
# run the batch, then restore their locked state. Adding a foreign key
|
|
122
|
+
# also writes a back-reference into the referenced table, so callers must
|
|
123
|
+
# pass both the referencing and referenced tables.
|
|
124
|
+
#
|
|
125
|
+
# See https://www.cockroachlabs.com/docs/stable/schema-locked
|
|
126
|
+
def with_schema_unlocked(tables)
|
|
127
|
+
locked = schema_locked_tables(tables.uniq)
|
|
128
|
+
return yield if locked.empty?
|
|
129
|
+
|
|
130
|
+
set_schema_locked(locked, false)
|
|
131
|
+
begin
|
|
132
|
+
yield
|
|
133
|
+
ensure
|
|
134
|
+
set_schema_locked(locked, true)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the subset of +tables+ whose `schema_locked` storage parameter
|
|
139
|
+
# is currently enabled. CockroachDB exposes storage parameters through
|
|
140
|
+
# `pg_class.reloptions`. On versions (or configurations) that do not lock
|
|
141
|
+
# tables this returns an empty array, so callers stay on the fast path.
|
|
142
|
+
def schema_locked_tables(tables)
|
|
143
|
+
return [] if tables.empty?
|
|
144
|
+
|
|
145
|
+
locked = query_values(<<~SQL, "SCHEMA")
|
|
146
|
+
SELECT (CASE WHEN n.nspname = current_schema() THEN '' ELSE n.nspname || '.' END) || c.relname
|
|
147
|
+
FROM pg_class c
|
|
148
|
+
JOIN pg_namespace n ON n.oid = c.relnamespace
|
|
149
|
+
WHERE c.relkind = 'r' AND 'schema_locked=true' = ANY (c.reloptions)
|
|
150
|
+
SQL
|
|
151
|
+
tables & locked
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Toggles the `schema_locked` storage parameter for the given tables.
|
|
155
|
+
# CockroachDB only allows changing `schema_locked` in a single-statement
|
|
156
|
+
# implicit transaction, so unlike the foreign key statements above these
|
|
157
|
+
# cannot be batched together.
|
|
158
|
+
def set_schema_locked(tables, value)
|
|
159
|
+
tables.each do |table|
|
|
160
|
+
execute("ALTER TABLE #{quote_table_name(table)} SET (schema_locked = #{value})", "Toggle schema_locked")
|
|
161
|
+
end
|
|
108
162
|
end
|
|
109
163
|
|
|
110
164
|
# NOTE: Copy/paste of the `#foreign_keys(table)` method adapted
|
|
@@ -202,6 +202,12 @@ module ActiveRecord
|
|
|
202
202
|
false
|
|
203
203
|
end
|
|
204
204
|
|
|
205
|
+
def supports_restart_db_transaction?
|
|
206
|
+
# In PostgreSQL, this would call 'ROLLBACK AND CHAIN'
|
|
207
|
+
# which is not available with CRDB.
|
|
208
|
+
false
|
|
209
|
+
end
|
|
210
|
+
|
|
205
211
|
# OVERRIDE: UNIQUE CONSTRAINTS will create indexes anyway, so we only consider
|
|
206
212
|
# then as indexes.
|
|
207
213
|
# See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/347.
|
|
@@ -259,6 +265,26 @@ module ActiveRecord
|
|
|
259
265
|
def configure_connection(...)
|
|
260
266
|
super
|
|
261
267
|
|
|
268
|
+
# Starting in CockroachDB v26.x, tables are created with the
|
|
269
|
+
# `schema_locked` storage parameter enabled by default (controlled by the
|
|
270
|
+
# `sql.create_table_with_schema_locked.enabled` cluster setting). While it
|
|
271
|
+
# improves changefeed performance, it blocks the transactional DDL that
|
|
272
|
+
# Active Record migrations and the test suite rely on: CockroachDB can
|
|
273
|
+
# only auto-unlock a locked table for single-statement implicit
|
|
274
|
+
# transactions, not for DDL run inside a transaction. Opt out at the
|
|
275
|
+
# session level so Active Record keeps working out of the box; users who
|
|
276
|
+
# want the changefeed benefit can still lock individual tables or set
|
|
277
|
+
# `create_table_with_schema_locked: true` in their connection variables.
|
|
278
|
+
#
|
|
279
|
+
# The session variable was introduced in CockroachDB v25.3, and we let an
|
|
280
|
+
# explicit `:variables` entry take precedence over this default.
|
|
281
|
+
#
|
|
282
|
+
# See https://www.cockroachlabs.com/docs/stable/schema-locked
|
|
283
|
+
variables = @config.fetch(:variables, {}).stringify_keys
|
|
284
|
+
if database_version >= 25_03_00 && !variables.key?("create_table_with_schema_locked")
|
|
285
|
+
internal_execute("SET create_table_with_schema_locked = false", "SCHEMA")
|
|
286
|
+
end
|
|
287
|
+
|
|
262
288
|
# This rescue flow appears in new_client, but it is needed here as well
|
|
263
289
|
# since Cockroach will sometimes not raise until a query is made.
|
|
264
290
|
#
|
|
@@ -479,22 +505,22 @@ module ActiveRecord
|
|
|
479
505
|
end
|
|
480
506
|
|
|
481
507
|
# override
|
|
482
|
-
#
|
|
483
|
-
#
|
|
484
|
-
# be an ActiveRecord::PreparedStatementCacheExpired
|
|
485
|
-
# error.
|
|
486
|
-
#
|
|
487
|
-
# ActiveRecord handles this by checking that the sql state matches the
|
|
488
|
-
# FEATURE_NOT_SUPPORTED code and that the source function
|
|
489
|
-
# is "RevalidateCachedQuery" since that is the only function
|
|
490
|
-
# in postgres that will create this error.
|
|
508
|
+
# Classifies a FEATURE_NOT_SUPPORTED error from the PG gem as an
|
|
509
|
+
# ActiveRecord::PreparedStatementCacheExpired.
|
|
491
510
|
#
|
|
492
|
-
#
|
|
493
|
-
#
|
|
494
|
-
#
|
|
511
|
+
# Upstream matches PG_DIAG_SOURCE_FUNCTION == "RevalidateCachedQuery",
|
|
512
|
+
# the one PostgreSQL C function that raises this error. CockroachDB's
|
|
513
|
+
# raising function is an internal detail that has already moved
|
|
514
|
+
# (runExecBuilder before cockroachdb/cockroach#164406, execBind after),
|
|
515
|
+
# so match the message instead. The message is not formally guaranteed,
|
|
516
|
+
# but it has been unchanged in PostgreSQL since 8.3 and drivers such as
|
|
517
|
+
# pgx assert the exact string. Upstream avoids message matching because
|
|
518
|
+
# PostgreSQL localizes messages via lc_messages (rails/rails@d507ae2a74);
|
|
519
|
+
# CockroachDB does not localize, so that concern does not apply.
|
|
520
|
+
CACHED_PLAN_HEURISTIC = "cached plan must not change result type"
|
|
495
521
|
def is_cached_plan_failure?(pgerror)
|
|
496
522
|
pgerror.result.result_error_field(PG::PG_DIAG_SQLSTATE) == FEATURE_NOT_SUPPORTED &&
|
|
497
|
-
pgerror.result.result_error_field(PG::
|
|
523
|
+
pgerror.result.result_error_field(PG::PG_DIAG_MESSAGE_PRIMARY).include?(CACHED_PLAN_HEURISTIC)
|
|
498
524
|
rescue
|
|
499
525
|
false
|
|
500
526
|
end
|
data/lib/version.rb
CHANGED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "cases/helper_cockroachdb"
|
|
4
|
+
|
|
5
|
+
class CockroachDBCachedPlanFailureTest < ActiveRecord::PostgreSQLTestCase
|
|
6
|
+
FakeResult = Struct.new(:fields) do
|
|
7
|
+
def result_error_field(code)
|
|
8
|
+
fields[code]
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
FakeError = Struct.new(:result)
|
|
12
|
+
|
|
13
|
+
# Reference the adapter's constant so the tests can't drift from the
|
|
14
|
+
# heuristic they are meant to verify.
|
|
15
|
+
CACHED_PLAN_MESSAGE =
|
|
16
|
+
ActiveRecord::ConnectionAdapters::CockroachDBAdapter::CACHED_PLAN_HEURISTIC
|
|
17
|
+
|
|
18
|
+
def setup
|
|
19
|
+
@connection = ActiveRecord::Base.lease_connection
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# CockroachDB has raised this error from "runExecBuilder" (Execute
|
|
23
|
+
# phase) and, since cockroachdb/cockroach#164406, from "execBind"
|
|
24
|
+
# (Bind phase). Detection must not depend on the source function.
|
|
25
|
+
def test_detects_cached_plan_failure_from_any_source_function
|
|
26
|
+
%w[runExecBuilder execBind].each do |source_function|
|
|
27
|
+
pgerror = FakeError.new(FakeResult.new({
|
|
28
|
+
PG::PG_DIAG_SQLSTATE => "0A000",
|
|
29
|
+
PG::PG_DIAG_MESSAGE_PRIMARY => CACHED_PLAN_MESSAGE,
|
|
30
|
+
PG::PG_DIAG_SOURCE_FUNCTION => source_function
|
|
31
|
+
}))
|
|
32
|
+
assert @connection.send(:is_cached_plan_failure?, pgerror),
|
|
33
|
+
"expected cached plan failure to be detected when raised from #{source_function}"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def test_detects_cached_plan_failure_with_wrapped_message
|
|
38
|
+
pgerror = FakeError.new(FakeResult.new({
|
|
39
|
+
PG::PG_DIAG_SQLSTATE => "0A000",
|
|
40
|
+
PG::PG_DIAG_MESSAGE_PRIMARY => "portal \"p1\": #{CACHED_PLAN_MESSAGE}"
|
|
41
|
+
}))
|
|
42
|
+
assert @connection.send(:is_cached_plan_failure?, pgerror)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def test_ignores_other_feature_not_supported_errors
|
|
46
|
+
pgerror = FakeError.new(FakeResult.new({
|
|
47
|
+
PG::PG_DIAG_SQLSTATE => "0A000",
|
|
48
|
+
PG::PG_DIAG_MESSAGE_PRIMARY => "unimplemented: something else"
|
|
49
|
+
}))
|
|
50
|
+
assert_not @connection.send(:is_cached_plan_failure?, pgerror)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def test_ignores_cached_plan_message_with_other_sqlstate
|
|
54
|
+
pgerror = FakeError.new(FakeResult.new({
|
|
55
|
+
PG::PG_DIAG_SQLSTATE => "XX000",
|
|
56
|
+
PG::PG_DIAG_MESSAGE_PRIMARY => CACHED_PLAN_MESSAGE
|
|
57
|
+
}))
|
|
58
|
+
assert_not @connection.send(:is_cached_plan_failure?, pgerror)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def test_returns_false_when_error_fields_unavailable
|
|
62
|
+
assert_not @connection.send(:is_cached_plan_failure?, Object.new)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# End-to-end check that a real cached-plan failure is caught and recovered
|
|
66
|
+
# from against a live server, rather than only exercising the classifier
|
|
67
|
+
# with fabricated errors. Adding a column changes the result type of a
|
|
68
|
+
# cached `SELECT *`, which makes CockroachDB raise FEATURE_NOT_SUPPORTED
|
|
69
|
+
# ("cached plan must not change result type") the next time the prepared
|
|
70
|
+
# statement runs. The adapter must evict the stale statement and retry.
|
|
71
|
+
#
|
|
72
|
+
# Recovery only happens outside a transaction (inside one, the adapter can
|
|
73
|
+
# only raise PreparedStatementCacheExpired), so this test must not run in
|
|
74
|
+
# the suite's wrapping transaction.
|
|
75
|
+
exclude_from_transactional_tests :test_recovers_from_real_cached_plan_failure
|
|
76
|
+
|
|
77
|
+
def test_recovers_from_real_cached_plan_failure
|
|
78
|
+
@connection.execute("DROP TABLE IF EXISTS cached_plan_things")
|
|
79
|
+
@connection.execute("CREATE TABLE cached_plan_things (id INT PRIMARY KEY, a INT)")
|
|
80
|
+
@connection.execute("INSERT INTO cached_plan_things (id, a) VALUES (1, 10)")
|
|
81
|
+
|
|
82
|
+
sql = "SELECT * FROM cached_plan_things WHERE id = $1"
|
|
83
|
+
bind = ActiveRecord::Relation::QueryAttribute.new(
|
|
84
|
+
"id", 1, ActiveRecord::Type::Integer.new
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Prime the server-side prepared statement cache. `prepare: true` forces
|
|
88
|
+
# the prepared-statement code path that contains the recovery logic.
|
|
89
|
+
first = @connection.exec_query(sql, "SQL", [bind], prepare: true)
|
|
90
|
+
assert_equal ["id", "a"], first.columns
|
|
91
|
+
|
|
92
|
+
# Invalidate the cached plan by changing the result type.
|
|
93
|
+
@connection.execute("ALTER TABLE cached_plan_things ADD COLUMN b INT")
|
|
94
|
+
|
|
95
|
+
# Re-running the same prepared statement would raise without recovery;
|
|
96
|
+
# the adapter should transparently flush the stale statement and retry.
|
|
97
|
+
second = assert_nothing_raised do
|
|
98
|
+
@connection.exec_query(sql, "SQL", [bind], prepare: true)
|
|
99
|
+
end
|
|
100
|
+
assert_equal ["id", "a", "b"], second.columns
|
|
101
|
+
assert_equal 1, second.rows.length
|
|
102
|
+
ensure
|
|
103
|
+
@connection.execute("DROP TABLE IF EXISTS cached_plan_things")
|
|
104
|
+
@connection.clear_cache!
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "cases/helper_cockroachdb"
|
|
4
|
-
require "support/connection_helper" # for #
|
|
4
|
+
require "support/connection_helper" # for #reset_pool
|
|
5
5
|
require "support/copy_cat"
|
|
6
6
|
|
|
7
7
|
class CockroachDBReferentialIntegrityTest < ActiveRecord::PostgreSQLTestCase
|
|
@@ -18,8 +18,10 @@ class CockroachDBReferentialIntegrityTest < ActiveRecord::PostgreSQLTestCase
|
|
|
18
18
|
@connection = ActiveRecord::Base.lease_connection
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
# A new pool, not just a reset connection: the connection extended with
|
|
22
|
+
# ProgrammerMistake must not be reused by the next test.
|
|
21
23
|
def teardown
|
|
22
|
-
|
|
24
|
+
reset_pool
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
exclude_from_transactional_tests :test_only_catch_active_record_errors_others_bubble_up
|
|
@@ -48,4 +50,44 @@ class CockroachDBReferentialIntegrityTest < ActiveRecord::PostgreSQLTestCase
|
|
|
48
50
|
end
|
|
49
51
|
assert_predicate warning, :blank?, "expected no warnings but got:\n#{warning}"
|
|
50
52
|
end
|
|
53
|
+
|
|
54
|
+
# `#disable_referential_integrity` drops and re-adds every foreign key using
|
|
55
|
+
# batched DDL. CockroachDB cannot auto-unlock a `schema_locked` table for a
|
|
56
|
+
# multi-statement batch, so the adapter must unlock the affected tables (both
|
|
57
|
+
# the referencing and referenced ones) around the batch and restore their
|
|
58
|
+
# locked state. This must run outside a transaction: the batched DDL only
|
|
59
|
+
# takes the unlocking path when no transaction is open, and toggling
|
|
60
|
+
# `schema_locked` is only allowed in single-statement implicit transactions.
|
|
61
|
+
exclude_from_transactional_tests :test_disable_referential_integrity_unlocks_schema_locked_tables
|
|
62
|
+
def test_disable_referential_integrity_unlocks_schema_locked_tables
|
|
63
|
+
skip "schema_locked requires CockroachDB v25.3+" if @connection.database_version < 25_03_00
|
|
64
|
+
|
|
65
|
+
# `authors.author_address_id` references `author_addresses`, so this covers
|
|
66
|
+
# both the referencing and referenced sides of a foreign key.
|
|
67
|
+
begin
|
|
68
|
+
@connection.execute("ALTER TABLE authors SET (schema_locked = true)")
|
|
69
|
+
@connection.execute("ALTER TABLE author_addresses SET (schema_locked = true)")
|
|
70
|
+
assert schema_locked?(:authors), "precondition: authors should be schema_locked"
|
|
71
|
+
assert schema_locked?(:author_addresses), "precondition: author_addresses should be schema_locked"
|
|
72
|
+
|
|
73
|
+
assert_nothing_raised do
|
|
74
|
+
@connection.disable_referential_integrity { }
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
assert schema_locked?(:authors), "authors should be re-locked afterwards"
|
|
78
|
+
assert schema_locked?(:author_addresses), "author_addresses should be re-locked afterwards"
|
|
79
|
+
ensure
|
|
80
|
+
@connection.execute("ALTER TABLE authors SET (schema_locked = false)")
|
|
81
|
+
@connection.execute("ALTER TABLE author_addresses SET (schema_locked = false)")
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
private
|
|
86
|
+
|
|
87
|
+
def schema_locked?(table)
|
|
88
|
+
reloptions = @connection.query_value(<<~SQL)
|
|
89
|
+
SELECT array_to_string(reloptions, ',') FROM pg_class WHERE relname = #{@connection.quote(table.to_s)}
|
|
90
|
+
SQL
|
|
91
|
+
reloptions.to_s.include?("schema_locked=true")
|
|
92
|
+
end
|
|
51
93
|
end
|
|
@@ -169,6 +169,20 @@ class PostGISTest < ActiveRecord::PostgreSQLTestCase
|
|
|
169
169
|
assert_equal wkt, rec.m_poly.to_s
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
+
def test_spatial_column_matching_enum
|
|
173
|
+
SpatialModel.lease_connection.create_enum(:point_type, ["point", "line_string", "polygon"])
|
|
174
|
+
SpatialModel.lease_connection.create_table(:spatial_models, force: true) do |t|
|
|
175
|
+
t.enum "point_type", enum_type: :point_type
|
|
176
|
+
t.column "latlon", :st_point, srid: 3785, geographic: true
|
|
177
|
+
end
|
|
178
|
+
SpatialModel.reset_column_information
|
|
179
|
+
_id, enum, geo = SpatialModel.columns
|
|
180
|
+
refute_predicate enum, :geographic?
|
|
181
|
+
refute_predicate enum, :spatial?
|
|
182
|
+
assert_predicate geo, :geographic?
|
|
183
|
+
assert_predicate geo, :spatial?
|
|
184
|
+
end
|
|
185
|
+
|
|
172
186
|
private
|
|
173
187
|
|
|
174
188
|
def klass
|
data/test/cases/defaults_test.rb
CHANGED
|
@@ -39,7 +39,7 @@ module CockroachDB
|
|
|
39
39
|
def test_default_decimal_zero_with_large_scale
|
|
40
40
|
record = DefaultNumber.new
|
|
41
41
|
assert_equal 0.0, record.decimal_number
|
|
42
|
-
assert_equal 0.
|
|
42
|
+
assert_equal "0.0000000000000000", record.decimal_number_before_type_cast
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -32,6 +32,13 @@ exclude :test_warnings_behavior_can_be_customized_with_a_proc, plpgsql_needed
|
|
|
32
32
|
exclude :test_allowlist_of_warnings_to_ignore, plpgsql_needed
|
|
33
33
|
exclude :test_allowlist_of_warning_codes_to_ignore, plpgsql_needed
|
|
34
34
|
|
|
35
|
+
if ActiveRecord::Base.with_connection(&:database_version) < 25_01_00
|
|
36
|
+
do_needed = "DO blocks are supported from CockroachDB v25.1."
|
|
37
|
+
exclude :test_clears_warnings_after_handling_non_execute_query, do_needed
|
|
38
|
+
exclude :test_clears_warnings_after_non_execute_warning_action_raises, do_needed
|
|
39
|
+
exclude :test_handles_warnings_after_non_execute_query_raises, do_needed
|
|
40
|
+
end
|
|
41
|
+
|
|
35
42
|
exclude :test_translate_no_connection_exception_to_not_established, "CRDB doesn't implement pg_terminate_backend()"
|
|
36
43
|
|
|
37
44
|
exclude :test_disable_extension_without_schema, ExcludeMessage::NO_HSTORE
|
|
@@ -12,3 +12,7 @@ exclude :test_does_not_break_nested_transactions, break_tx
|
|
|
12
12
|
exclude :test_only_catch_active_record_errors_others_bubble_up,
|
|
13
13
|
"Reimplemented in test/cases/adapters/cockroachdb/referential_integrity_test.rb" \
|
|
14
14
|
" to use a different trigger for the error."
|
|
15
|
+
|
|
16
|
+
exclude :test_all_foreign_keys_valid_having_foreign_keys_with_partitioned_table,
|
|
17
|
+
"CockroachDB does not support PostgreSQL's declarative partitioning " \
|
|
18
|
+
"(CREATE TABLE ... PARTITION OF)."
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# `test_cache_gets_cleared_after_migration` runs `change_column :posts, :title,
|
|
2
|
+
# :string, limit: 80`, which adds a length limit to a VARCHAR column. Since
|
|
3
|
+
# cockroachdb/cockroach@5a8fd7226192 (v26.2), converting an unbounded string to a
|
|
4
|
+
# bounded one validates existing data, and CockroachDB does not allow such a
|
|
5
|
+
# conversion inside an explicit transaction (see
|
|
6
|
+
# https://go.crdb.dev/issue-v/49351/v26.2). Running the test non-transactionally
|
|
7
|
+
# lets change_column execute as an implicit single-statement transaction, which
|
|
8
|
+
# is allowed. Earlier versions treat the change as metadata-only and are
|
|
9
|
+
# unaffected, so this is safe across all supported versions.
|
|
10
|
+
exclude_from_transactional_tests :test_cache_gets_cleared_after_migration
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
exclude :test_string_opclass_is_dumped, "Operator classes on indexes are not supported in CockroachDB."
|
|
2
2
|
exclude :test_non_default_opclass_is_dumped, "Operator classes on indexes are not supported in CockroachDB."
|
|
3
3
|
exclude :test_opclass_class_parsing_on_non_reserved_and_cannot_be_function_or_type_keyword, "Operator classes on indexes are not supported in CockroachDB."
|
|
4
|
+
exclude :test_opclass_class_parsing_from_another_schema, "CockroachDB does not support CREATE EXTENSION ... SCHEMA or schema-qualified operator classes."
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-cockroachdb-adapter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.1.
|
|
4
|
+
version: 8.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cockroach Labs
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activerecord
|
|
@@ -74,8 +73,8 @@ executables: []
|
|
|
74
73
|
extensions: []
|
|
75
74
|
extra_rdoc_files:
|
|
76
75
|
- CHANGELOG.md
|
|
77
|
-
- README.md
|
|
78
76
|
- CONTRIBUTING.md
|
|
77
|
+
- README.md
|
|
79
78
|
files:
|
|
80
79
|
- CHANGELOG.md
|
|
81
80
|
- CONTRIBUTING.md
|
|
@@ -108,6 +107,7 @@ files:
|
|
|
108
107
|
- lib/arel/nodes/join_source_ext.rb
|
|
109
108
|
- lib/version.rb
|
|
110
109
|
- test/cases/adapter_test.rb
|
|
110
|
+
- test/cases/adapters/cockroachdb/cached_plan_failure_test.rb
|
|
111
111
|
- test/cases/adapters/cockroachdb/referential_integrity_test.rb
|
|
112
112
|
- test/cases/adapters/postgresql/active_schema_test.rb
|
|
113
113
|
- test/cases/adapters/postgresql/change_schema_test.rb
|
|
@@ -276,6 +276,7 @@ files:
|
|
|
276
276
|
- test/excludes/PrimaryKeyIntegerNilDefaultTest.rb
|
|
277
277
|
- test/excludes/PrimaryKeyIntegerTest.rb
|
|
278
278
|
- test/excludes/PrimaryKeysTest.rb
|
|
279
|
+
- test/excludes/QueryCacheExpiryTest.rb
|
|
279
280
|
- test/excludes/RelationMergingTest.rb
|
|
280
281
|
- test/excludes/RelationTest.rb
|
|
281
282
|
- test/excludes/ReservedWordsMigrationTest.rb
|
|
@@ -315,7 +316,6 @@ licenses:
|
|
|
315
316
|
- Apache-2.0
|
|
316
317
|
metadata:
|
|
317
318
|
allowed_push_host: https://rubygems.org
|
|
318
|
-
post_install_message:
|
|
319
319
|
rdoc_options: []
|
|
320
320
|
require_paths:
|
|
321
321
|
- lib
|
|
@@ -330,211 +330,212 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
330
330
|
- !ruby/object:Gem::Version
|
|
331
331
|
version: '0'
|
|
332
332
|
requirements: []
|
|
333
|
-
rubygems_version:
|
|
334
|
-
signing_key:
|
|
333
|
+
rubygems_version: 4.0.10
|
|
335
334
|
specification_version: 4
|
|
336
335
|
summary: CockroachDB adapter for ActiveRecord.
|
|
337
336
|
test_files:
|
|
338
|
-
- test/cases/
|
|
339
|
-
- test/cases/
|
|
340
|
-
- test/cases/
|
|
341
|
-
- test/cases/
|
|
342
|
-
- test/cases/
|
|
343
|
-
- test/cases/
|
|
344
|
-
- test/cases/relation/or_test.rb
|
|
345
|
-
- test/cases/relation/table_hints_test.rb
|
|
346
|
-
- test/cases/show_create_test.rb
|
|
347
|
-
- test/cases/invertible_migration_test.rb
|
|
348
|
-
- test/cases/associations_test.rb
|
|
349
|
-
- test/cases/inheritance_test.rb
|
|
350
|
-
- test/cases/strict_loading_test.rb
|
|
351
|
-
- test/cases/migration_test.rb
|
|
352
|
-
- test/cases/marshal_serialization_test.rb
|
|
353
|
-
- test/cases/schema_dumper_test.rb
|
|
337
|
+
- test/cases/adapter_test.rb
|
|
338
|
+
- test/cases/adapters/cockroachdb/cached_plan_failure_test.rb
|
|
339
|
+
- test/cases/adapters/cockroachdb/referential_integrity_test.rb
|
|
340
|
+
- test/cases/adapters/postgresql/active_schema_test.rb
|
|
341
|
+
- test/cases/adapters/postgresql/change_schema_test.rb
|
|
342
|
+
- test/cases/adapters/postgresql/connection_test.rb
|
|
354
343
|
- test/cases/adapters/postgresql/ddl_test.rb
|
|
355
344
|
- test/cases/adapters/postgresql/interval_test.rb
|
|
356
|
-
- test/cases/adapters/postgresql/
|
|
357
|
-
- test/cases/adapters/postgresql/
|
|
345
|
+
- test/cases/adapters/postgresql/nested_class_test.rb
|
|
346
|
+
- test/cases/adapters/postgresql/numeric_test.rb
|
|
347
|
+
- test/cases/adapters/postgresql/postgis_test.rb
|
|
358
348
|
- test/cases/adapters/postgresql/postgresql_adapter_test.rb
|
|
359
|
-
- test/cases/adapters/postgresql/active_schema_test.rb
|
|
360
349
|
- test/cases/adapters/postgresql/quoting_test.rb
|
|
350
|
+
- test/cases/adapters/postgresql/schema_statements_test.rb
|
|
351
|
+
- test/cases/adapters/postgresql/serial_test.rb
|
|
352
|
+
- test/cases/adapters/postgresql/spatial_queries_test.rb
|
|
353
|
+
- test/cases/adapters/postgresql/spatial_setup_test.rb
|
|
361
354
|
- test/cases/adapters/postgresql/spatial_type_test.rb
|
|
362
|
-
- test/cases/adapters/postgresql/nested_class_test.rb
|
|
363
355
|
- test/cases/adapters/postgresql/timestamp_test.rb
|
|
364
|
-
- test/cases/adapters/postgresql/postgis_test.rb
|
|
365
|
-
- test/cases/adapters/postgresql/connection_test.rb
|
|
366
356
|
- test/cases/adapters/postgresql/virtual_column_test.rb
|
|
367
|
-
- test/cases/
|
|
368
|
-
- test/cases/
|
|
369
|
-
- test/cases/
|
|
370
|
-
- test/cases/
|
|
371
|
-
- test/cases/
|
|
372
|
-
- test/cases/defaults_test.rb
|
|
373
|
-
- test/cases/persistence_test.rb
|
|
357
|
+
- test/cases/associations/eager_load_nested_include_test.rb
|
|
358
|
+
- test/cases/associations/left_outer_join_association_test.rb
|
|
359
|
+
- test/cases/associations_test.rb
|
|
360
|
+
- test/cases/base_test.rb
|
|
361
|
+
- test/cases/comment_test.rb
|
|
374
362
|
- test/cases/connection_adapters/type_test.rb
|
|
375
|
-
- test/cases/adapter_test.rb
|
|
376
|
-
- test/cases/relations_test.rb
|
|
377
363
|
- test/cases/database_configurations/resolver_test.rb
|
|
378
|
-
- test/cases/
|
|
379
|
-
- test/cases/
|
|
364
|
+
- test/cases/defaults_test.rb
|
|
365
|
+
- test/cases/dirty_test.rb
|
|
380
366
|
- test/cases/fixtures_test.rb
|
|
381
|
-
- test/cases/
|
|
382
|
-
- test/cases/
|
|
367
|
+
- test/cases/helper_cockroachdb.rb
|
|
368
|
+
- test/cases/inheritance_test.rb
|
|
369
|
+
- test/cases/invertible_migration_test.rb
|
|
370
|
+
- test/cases/marshal_serialization_test.rb
|
|
371
|
+
- test/cases/migration/change_schema_test.rb
|
|
383
372
|
- test/cases/migration/check_constraint_test.rb
|
|
373
|
+
- test/cases/migration/columns_test.rb
|
|
384
374
|
- test/cases/migration/create_join_table_test.rb
|
|
385
375
|
- test/cases/migration/foreign_key_test.rb
|
|
386
|
-
- test/cases/migration/columns_test.rb
|
|
387
376
|
- test/cases/migration/hidden_column_test.rb
|
|
388
|
-
- test/cases/migration/
|
|
389
|
-
- test/cases/
|
|
390
|
-
- test/cases/
|
|
377
|
+
- test/cases/migration/references_foreign_key_test.rb
|
|
378
|
+
- test/cases/migration_test.rb
|
|
379
|
+
- test/cases/persistence_test.rb
|
|
380
|
+
- test/cases/primary_keys_test.rb
|
|
381
|
+
- test/cases/relation/aost_test.rb
|
|
382
|
+
- test/cases/relation/or_test.rb
|
|
383
|
+
- test/cases/relation/table_hints_test.rb
|
|
384
|
+
- test/cases/relation_test.rb
|
|
385
|
+
- test/cases/relations_test.rb
|
|
386
|
+
- test/cases/schema_dumper_test.rb
|
|
387
|
+
- test/cases/show_create_test.rb
|
|
388
|
+
- test/cases/strict_loading_test.rb
|
|
389
|
+
- test/cases/tasks/cockroachdb_rake_test.rb
|
|
391
390
|
- test/cases/test_fixtures_test.rb
|
|
392
|
-
- test/cases/
|
|
393
|
-
- test/
|
|
394
|
-
- test/models/building.rb
|
|
395
|
-
- test/schema/cockroachdb_specific_schema.rb
|
|
396
|
-
- test/support/exclude_from_transactional_tests.rb
|
|
397
|
-
- test/support/paths_cockroachdb.rb
|
|
398
|
-
- test/support/rake_helpers.rb
|
|
399
|
-
- test/support/copy_cat.rb
|
|
400
|
-
- test/support/template_creator.rb
|
|
401
|
-
- test/support/sql_logger.rb
|
|
391
|
+
- test/cases/transactions_test.rb
|
|
392
|
+
- test/cases/unsafe_raw_sql_test.rb
|
|
402
393
|
- test/config.yml
|
|
403
|
-
- test/excludes/
|
|
404
|
-
- test/excludes/
|
|
405
|
-
- test/excludes/MarshalSerializationTest.rb
|
|
406
|
-
- test/excludes/PostgresqlInfinityTest.rb
|
|
407
|
-
- test/excludes/WithAnnotationsTest.rb
|
|
408
|
-
- test/excludes/CommentTest.rb
|
|
409
|
-
- test/excludes/SequenceNameDetectionTestCases/CollidedSequenceNameTest.rb
|
|
410
|
-
- test/excludes/SequenceNameDetectionTestCases/LongerSequenceNameDetectionTest.rb
|
|
411
|
-
- test/excludes/SchemaForeignKeyTest.rb
|
|
412
|
-
- test/excludes/LegacyPrimaryKeyTest/V5_0.rb
|
|
413
|
-
- test/excludes/LegacyPrimaryKeyTest/V4_2.rb
|
|
414
|
-
- test/excludes/PessimisticLockingTest.rb
|
|
415
|
-
- test/excludes/FixturesWithForeignKeyViolationsTest.rb
|
|
416
|
-
- test/excludes/SchemaIndexOpclassTest.rb
|
|
417
|
-
- test/excludes/PostgreSQLPartitionsTest.rb
|
|
418
|
-
- test/excludes/PrimaryKeyIntegerNilDefaultTest.rb
|
|
419
|
-
- test/excludes/CalculationsTest.rb
|
|
420
|
-
- test/excludes/PostgresqlLtreeTest.rb
|
|
421
|
-
- test/excludes/DirtyTest.rb
|
|
422
|
-
- test/excludes/RelationMergingTest.rb
|
|
423
|
-
- test/excludes/PersistenceTest.rb
|
|
424
|
-
- test/excludes/PostgreSQLGeometricTypesTest.rb
|
|
425
|
-
- test/excludes/TypeTest.rb
|
|
426
|
-
- test/excludes/PostgresqlNumberTest.rb
|
|
427
|
-
- test/excludes/PostgresqlXMLTest.rb
|
|
428
|
-
- test/excludes/PostgresqlTimestampFixtureTest.rb
|
|
429
|
-
- test/excludes/PostgresqlIntervalTest.rb
|
|
430
|
-
- test/excludes/LeftOuterJoinAssociationTest.rb
|
|
431
|
-
- test/excludes/SchemaIndexNullsOrderTest.rb
|
|
432
|
-
- test/excludes/NestedRelationScopingTest.rb
|
|
433
|
-
- test/excludes/UnloggedTablesTest.rb
|
|
434
|
-
- test/excludes/PostgresqlHstoreTest.rb
|
|
435
|
-
- test/excludes/CoreTest.rb
|
|
436
|
-
- test/excludes/TransactionIsolationTest.rb
|
|
437
|
-
- test/excludes/PostgresqlTimestampMigrationTest.rb
|
|
438
|
-
- test/excludes/PostgresqlVirtualColumnTest.rb
|
|
439
|
-
- test/excludes/SchemaDumperTest.rb
|
|
440
|
-
- test/excludes/RelationTest.rb
|
|
441
|
-
- test/excludes/BasicsTest.rb
|
|
442
|
-
- test/excludes/SanitizeTest.rb
|
|
443
|
-
- test/excludes/PostgresqlGeometricTest.rb
|
|
444
|
-
- test/excludes/SameNameDifferentDatabaseFixturesTest.rb
|
|
445
|
-
- test/excludes/MigrationTest.rb
|
|
446
|
-
- test/excludes/EagerLoadPolyAssocsTest.rb
|
|
447
|
-
- test/excludes/ActiveSupportSubclassWithFixturesTest.rb
|
|
448
|
-
- test/excludes/PostgresqlCollationTest.rb
|
|
449
|
-
- test/excludes/ForeignTableTest.rb
|
|
450
|
-
- test/excludes/SchemaAuthorizationTest.rb
|
|
451
|
-
- test/excludes/PostgresqlUUIDTest.rb
|
|
452
|
-
- test/excludes/PostgresqlFullTextTest.rb
|
|
453
|
-
- test/excludes/MaterializedViewTest.rb
|
|
454
|
-
- test/excludes/PostgresqlDeferredConstraintsTest.rb
|
|
455
|
-
- test/excludes/TestFixturesTest.rb
|
|
456
|
-
- test/excludes/PostgresqlJSONTest.rb
|
|
457
|
-
- test/excludes/PostgresqlExtensionMigrationTest.rb
|
|
458
|
-
- test/excludes/PostgresqlJSONBTest.rb
|
|
459
|
-
- test/excludes/PostgresqlDataTypeTest.rb
|
|
460
|
-
- test/excludes/PostgresqlCompositeWithCustomOIDTest.rb
|
|
461
|
-
- test/excludes/ReservedWordsMigrationTest.rb
|
|
462
|
-
- test/excludes/SchemaCreateTableOptionsTest.rb
|
|
463
|
-
- test/excludes/PostgresqlBitStringTest.rb
|
|
464
|
-
- test/excludes/PostgresqlCitextTest.rb
|
|
465
|
-
- test/excludes/PostgreSQLExplainTest.rb
|
|
466
|
-
- test/excludes/PostgresqlTypeLookupTest.rb
|
|
467
|
-
- test/excludes/PostgreSQLGeometricLineTest.rb
|
|
468
|
-
- test/excludes/PostgresqlMoneyTest.rb
|
|
469
|
-
- test/excludes/SchemaTest.rb
|
|
470
|
-
- test/excludes/PostgresqlArrayTest.rb
|
|
471
|
-
- test/excludes/ActiveRecord/PostgresqlConnectionTest.rb
|
|
472
|
-
- test/excludes/ActiveRecord/Encryption/ExtendedDeterministicQueriesPerformanceTest.rb
|
|
473
|
-
- test/excludes/ActiveRecord/Encryption/EnvelopeEncryptionPerformanceTest.rb
|
|
474
|
-
- test/excludes/ActiveRecord/Encryption/StoragePerformanceTest.rb
|
|
475
|
-
- test/excludes/ActiveRecord/Encryption/EncryptionPerformanceTest.rb
|
|
476
|
-
- test/excludes/ActiveRecord/InvertibleMigrationTest.rb
|
|
477
|
-
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterTest.rb
|
|
478
|
-
- test/excludes/ActiveRecord/ConnectionAdapters/RegistrationIsolatedTest.rb
|
|
479
|
-
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterPreventWritesTest.rb
|
|
480
|
-
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterPreventWritesLegacyTest.rb
|
|
394
|
+
- test/excludes/ActiveRecord/AdapterTest.rb
|
|
395
|
+
- test/excludes/ActiveRecord/AdapterTestWithoutTransaction.rb
|
|
481
396
|
- test/excludes/ActiveRecord/ConnectionAdapters/PoolConfig/ResolverTest.rb
|
|
482
397
|
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/BindParameterTest.rb
|
|
483
398
|
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/QuotingTest.rb
|
|
484
|
-
- test/excludes/ActiveRecord/
|
|
485
|
-
- test/excludes/ActiveRecord/
|
|
486
|
-
- test/excludes/ActiveRecord/
|
|
487
|
-
- test/excludes/ActiveRecord/
|
|
399
|
+
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterPreventWritesLegacyTest.rb
|
|
400
|
+
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterPreventWritesTest.rb
|
|
401
|
+
- test/excludes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterTest.rb
|
|
402
|
+
- test/excludes/ActiveRecord/ConnectionAdapters/RegistrationIsolatedTest.rb
|
|
403
|
+
- test/excludes/ActiveRecord/Encryption/EncryptionPerformanceTest.rb
|
|
404
|
+
- test/excludes/ActiveRecord/Encryption/EnvelopeEncryptionPerformanceTest.rb
|
|
405
|
+
- test/excludes/ActiveRecord/Encryption/ExtendedDeterministicQueriesPerformanceTest.rb
|
|
406
|
+
- test/excludes/ActiveRecord/Encryption/StoragePerformanceTest.rb
|
|
488
407
|
- test/excludes/ActiveRecord/InstrumentationTest.rb
|
|
489
|
-
- test/excludes/ActiveRecord/
|
|
490
|
-
- test/excludes/ActiveRecord/
|
|
491
|
-
- test/excludes/ActiveRecord/
|
|
492
|
-
- test/excludes/ActiveRecord/
|
|
408
|
+
- test/excludes/ActiveRecord/InvertibleMigrationTest.rb
|
|
409
|
+
- test/excludes/ActiveRecord/Migration/ChangeSchemaTest.rb
|
|
410
|
+
- test/excludes/ActiveRecord/Migration/CheckConstraintTest.rb
|
|
411
|
+
- test/excludes/ActiveRecord/Migration/ColumnsTest.rb
|
|
412
|
+
- test/excludes/ActiveRecord/Migration/CompatibilityTest.rb
|
|
413
|
+
- test/excludes/ActiveRecord/Migration/CompositeForeignKeyTest.rb
|
|
493
414
|
- test/excludes/ActiveRecord/Migration/CreateJoinTableTest.rb
|
|
494
|
-
- test/excludes/ActiveRecord/Migration/
|
|
415
|
+
- test/excludes/ActiveRecord/Migration/ForeignKeyInCreateTest.rb
|
|
416
|
+
- test/excludes/ActiveRecord/Migration/ForeignKeyTest.rb
|
|
417
|
+
- test/excludes/ActiveRecord/Migration/InvalidOptionsTest.rb
|
|
495
418
|
- test/excludes/ActiveRecord/Migration/PGChangeSchemaTest.rb
|
|
419
|
+
- test/excludes/ActiveRecord/Migration/ReferencesForeignKeyTest.rb
|
|
496
420
|
- test/excludes/ActiveRecord/Migration/ReferencesIndexTest.rb
|
|
497
|
-
- test/excludes/ActiveRecord/Migration/ForeignKeyTest.rb
|
|
498
|
-
- test/excludes/ActiveRecord/Migration/CompatibilityTest.rb
|
|
499
|
-
- test/excludes/ActiveRecord/Migration/CheckConstraintTest.rb
|
|
500
|
-
- test/excludes/ActiveRecord/Migration/ForeignKeyInCreateTest.rb
|
|
501
|
-
- test/excludes/ActiveRecord/Migration/CompositeForeignKeyTest.rb
|
|
502
421
|
- test/excludes/ActiveRecord/Migration/ReferencesStatementsTest.rb
|
|
503
|
-
- test/excludes/ActiveRecord/
|
|
504
|
-
- test/excludes/ActiveRecord/Migration/InvalidOptionsTest.rb
|
|
505
|
-
- test/excludes/ActiveRecord/Migration/ColumnsTest.rb
|
|
422
|
+
- test/excludes/ActiveRecord/MysqlDBCreateWithInvalidPermissionsTest.rb
|
|
506
423
|
- test/excludes/ActiveRecord/OrTest.rb
|
|
507
|
-
- test/excludes/
|
|
508
|
-
- test/excludes/
|
|
509
|
-
- test/excludes/
|
|
510
|
-
- test/excludes/
|
|
511
|
-
- test/excludes/
|
|
512
|
-
- test/excludes/
|
|
513
|
-
- test/excludes/
|
|
514
|
-
- test/excludes/PostgresqlNetworkTest.rb
|
|
515
|
-
- test/excludes/AssociationDeprecationTest/WarnModeTest.rb
|
|
516
|
-
- test/excludes/AssociationDeprecationTest/fix_backtrace_cleaner.rb
|
|
517
|
-
- test/excludes/AssociationDeprecationTest/RaiseModeTest.rb
|
|
424
|
+
- test/excludes/ActiveRecord/PostgreSQLStructureDumpTest.rb
|
|
425
|
+
- test/excludes/ActiveRecord/PostgresqlConnectionTest.rb
|
|
426
|
+
- test/excludes/ActiveRecord/PostgresqlTransactionNestedTest.rb
|
|
427
|
+
- test/excludes/ActiveRecord/PostgresqlTransactionTest.rb
|
|
428
|
+
- test/excludes/ActiveRecord/RelationTest.rb
|
|
429
|
+
- test/excludes/ActiveRecord/TooManyOrTest.rb
|
|
430
|
+
- test/excludes/ActiveSupportSubclassWithFixturesTest.rb
|
|
518
431
|
- test/excludes/AssociationDeprecationTest/NotifyModeTest.rb
|
|
519
432
|
- test/excludes/AssociationDeprecationTest/RaiseBacktraceModeTest.rb
|
|
433
|
+
- test/excludes/AssociationDeprecationTest/RaiseModeTest.rb
|
|
520
434
|
- test/excludes/AssociationDeprecationTest/WarnBacktraceModeTest.rb
|
|
521
|
-
- test/excludes/
|
|
522
|
-
- test/excludes/
|
|
435
|
+
- test/excludes/AssociationDeprecationTest/WarnModeTest.rb
|
|
436
|
+
- test/excludes/AssociationDeprecationTest/fix_backtrace_cleaner.rb
|
|
437
|
+
- test/excludes/BasicsTest.rb
|
|
523
438
|
- test/excludes/BulkAlterTableMigrationsTest.rb
|
|
524
|
-
- test/excludes/
|
|
525
|
-
- test/excludes/
|
|
526
|
-
- test/excludes/
|
|
527
|
-
- test/excludes/PostgresqlRenameTableTest.rb
|
|
528
|
-
- test/excludes/UnsafeRawSqlTest.rb
|
|
529
|
-
- test/excludes/PrimaryKeysTest.rb
|
|
530
|
-
- test/excludes/PostgresqlDefaultExpressionTest.rb
|
|
439
|
+
- test/excludes/CalculationsTest.rb
|
|
440
|
+
- test/excludes/CommentTest.rb
|
|
441
|
+
- test/excludes/CoreTest.rb
|
|
531
442
|
- test/excludes/CreateOrFindByWithinTransactions.rb
|
|
532
|
-
- test/excludes/MultiDbMigratorTest.rb
|
|
533
|
-
- test/excludes/PostgresqlSerialTest.rb
|
|
534
|
-
- test/excludes/PostgresqlCompositeTest.rb
|
|
535
|
-
- test/excludes/EachTest.rb
|
|
536
443
|
- test/excludes/DefaultsUsingMultipleSchemasAndDomainTest.rb
|
|
444
|
+
- test/excludes/DirtyTest.rb
|
|
445
|
+
- test/excludes/EachTest.rb
|
|
446
|
+
- test/excludes/EagerLoadPolyAssocsTest.rb
|
|
447
|
+
- test/excludes/ExplicitlyNamedIndexMigrationTest.rb
|
|
448
|
+
- test/excludes/FixturesResetPkSequenceTest.rb
|
|
449
|
+
- test/excludes/FixturesTest.rb
|
|
450
|
+
- test/excludes/FixturesWithForeignKeyViolationsTest.rb
|
|
451
|
+
- test/excludes/ForeignTableTest.rb
|
|
452
|
+
- test/excludes/InheritanceComputeTypeTest.rb
|
|
453
|
+
- test/excludes/LeftOuterJoinAssociationTest.rb
|
|
454
|
+
- test/excludes/LegacyPrimaryKeyTest/V4_2.rb
|
|
455
|
+
- test/excludes/LegacyPrimaryKeyTest/V5_0.rb
|
|
456
|
+
- test/excludes/MarshalSerializationTest.rb
|
|
457
|
+
- test/excludes/MaterializedViewTest.rb
|
|
458
|
+
- test/excludes/MigrationTest.rb
|
|
459
|
+
- test/excludes/MultiDbMigratorTest.rb
|
|
460
|
+
- test/excludes/NestedRelationScopingTest.rb
|
|
537
461
|
- test/excludes/OrTest.rb
|
|
538
|
-
- test/excludes/
|
|
462
|
+
- test/excludes/PersistenceTest.rb
|
|
463
|
+
- test/excludes/PessimisticLockingTest.rb
|
|
464
|
+
- test/excludes/PostgreSQLExplainTest.rb
|
|
465
|
+
- test/excludes/PostgreSQLGeometricLineTest.rb
|
|
466
|
+
- test/excludes/PostgreSQLGeometricTypesTest.rb
|
|
467
|
+
- test/excludes/PostgreSQLPartitionsTest.rb
|
|
468
|
+
- test/excludes/PostgreSQLReferentialIntegrityTest.rb
|
|
469
|
+
- test/excludes/PostgresqlArrayTest.rb
|
|
470
|
+
- test/excludes/PostgresqlBigSerialTest.rb
|
|
471
|
+
- test/excludes/PostgresqlBitStringTest.rb
|
|
472
|
+
- test/excludes/PostgresqlByteaTest.rb
|
|
473
|
+
- test/excludes/PostgresqlCitextTest.rb
|
|
474
|
+
- test/excludes/PostgresqlCollationTest.rb
|
|
475
|
+
- test/excludes/PostgresqlCompositeTest.rb
|
|
476
|
+
- test/excludes/PostgresqlCompositeWithCustomOIDTest.rb
|
|
477
|
+
- test/excludes/PostgresqlDataTypeTest.rb
|
|
478
|
+
- test/excludes/PostgresqlDefaultExpressionTest.rb
|
|
479
|
+
- test/excludes/PostgresqlDeferredConstraintsTest.rb
|
|
539
480
|
- test/excludes/PostgresqlDomainTest.rb
|
|
540
|
-
- test/excludes/
|
|
481
|
+
- test/excludes/PostgresqlExtensionMigrationTest.rb
|
|
482
|
+
- test/excludes/PostgresqlFullTextTest.rb
|
|
483
|
+
- test/excludes/PostgresqlGeometricTest.rb
|
|
484
|
+
- test/excludes/PostgresqlHstoreTest.rb
|
|
485
|
+
- test/excludes/PostgresqlInfinityTest.rb
|
|
486
|
+
- test/excludes/PostgresqlIntervalTest.rb
|
|
487
|
+
- test/excludes/PostgresqlJSONBTest.rb
|
|
488
|
+
- test/excludes/PostgresqlJSONTest.rb
|
|
489
|
+
- test/excludes/PostgresqlLtreeTest.rb
|
|
490
|
+
- test/excludes/PostgresqlMoneyTest.rb
|
|
491
|
+
- test/excludes/PostgresqlNetworkTest.rb
|
|
492
|
+
- test/excludes/PostgresqlNumberTest.rb
|
|
493
|
+
- test/excludes/PostgresqlPointTest.rb
|
|
494
|
+
- test/excludes/PostgresqlRangeTest.rb
|
|
495
|
+
- test/excludes/PostgresqlRenameTableTest.rb
|
|
496
|
+
- test/excludes/PostgresqlSerialTest.rb
|
|
497
|
+
- test/excludes/PostgresqlTimestampFixtureTest.rb
|
|
498
|
+
- test/excludes/PostgresqlTimestampMigrationTest.rb
|
|
499
|
+
- test/excludes/PostgresqlTypeLookupTest.rb
|
|
500
|
+
- test/excludes/PostgresqlUUIDGenerationTest.rb
|
|
501
|
+
- test/excludes/PostgresqlUUIDTest.rb
|
|
502
|
+
- test/excludes/PostgresqlVirtualColumnTest.rb
|
|
503
|
+
- test/excludes/PostgresqlXMLTest.rb
|
|
504
|
+
- test/excludes/PrimaryKeyIntegerNilDefaultTest.rb
|
|
505
|
+
- test/excludes/PrimaryKeyIntegerTest.rb
|
|
506
|
+
- test/excludes/PrimaryKeysTest.rb
|
|
507
|
+
- test/excludes/QueryCacheExpiryTest.rb
|
|
508
|
+
- test/excludes/RelationMergingTest.rb
|
|
509
|
+
- test/excludes/RelationTest.rb
|
|
510
|
+
- test/excludes/ReservedWordsMigrationTest.rb
|
|
511
|
+
- test/excludes/SameNameDifferentDatabaseFixturesTest.rb
|
|
512
|
+
- test/excludes/SanitizeTest.rb
|
|
513
|
+
- test/excludes/SchemaAuthorizationTest.rb
|
|
514
|
+
- test/excludes/SchemaCreateTableOptionsTest.rb
|
|
515
|
+
- test/excludes/SchemaDumperDefaultsTest.rb
|
|
516
|
+
- test/excludes/SchemaDumperTest.rb
|
|
517
|
+
- test/excludes/SchemaForeignKeyTest.rb
|
|
518
|
+
- test/excludes/SchemaIndexNullsOrderTest.rb
|
|
519
|
+
- test/excludes/SchemaIndexOpclassTest.rb
|
|
520
|
+
- test/excludes/SchemaTest.rb
|
|
521
|
+
- test/excludes/SequenceNameDetectionTestCases/CollidedSequenceNameTest.rb
|
|
522
|
+
- test/excludes/SequenceNameDetectionTestCases/LongerSequenceNameDetectionTest.rb
|
|
523
|
+
- test/excludes/StrictLoadingFixturesTest.rb
|
|
524
|
+
- test/excludes/TestFixturesTest.rb
|
|
525
|
+
- test/excludes/TransactionInstrumentationTest.rb
|
|
526
|
+
- test/excludes/TransactionIsolationTest.rb
|
|
527
|
+
- test/excludes/TypeTest.rb
|
|
528
|
+
- test/excludes/UniquenessValidationTest.rb
|
|
529
|
+
- test/excludes/UnloggedTablesTest.rb
|
|
530
|
+
- test/excludes/UnsafeRawSqlTest.rb
|
|
531
|
+
- test/excludes/UpdateableViewTest.rb
|
|
532
|
+
- test/excludes/WithAnnotationsTest.rb
|
|
533
|
+
- test/models/building.rb
|
|
534
|
+
- test/models/spatial_model.rb
|
|
535
|
+
- test/schema/cockroachdb_specific_schema.rb
|
|
536
|
+
- test/support/copy_cat.rb
|
|
537
|
+
- test/support/exclude_from_transactional_tests.rb
|
|
538
|
+
- test/support/paths_cockroachdb.rb
|
|
539
|
+
- test/support/rake_helpers.rb
|
|
540
|
+
- test/support/sql_logger.rb
|
|
541
|
+
- test/support/template_creator.rb
|