Skip to content

Commit 1b2fa18

Browse files
committed
Fix changelog from rails#43105
1 parent 6c17335 commit 1b2fa18

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

activerecord/CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
Previously the schema cache methods `primary_keys`, `columns, `columns_hash`, and `indexes`
44
would behave differently than one another when a table didn't exist and differently across
5-
databases. This change unifies the behavior so that all the methods return `nil` if the table
6-
doesn't exist. While this class is technically public, applications don't interact with the
7-
return values of these methods so it should be safe to make this change.
5+
database adapters. This change unifies the behavior so each method behaves the same regardless
6+
of adapter.
7+
8+
The behavior now is:
9+
10+
`columns`: (unchanged) raises a db error if the table does not exist
11+
`columns_hash`: (unchanged) raises a db error if the table does not exist
12+
`primary_keys`: (unchanged) returns `nil` if the table does not exist
13+
`indexes`: (changed for mysql2) returns `[]` if the table does not exist
814

915
*Eileen M. Uchitelle*
1016

0 commit comments

Comments
 (0)