Open jenlampton opened 8 years ago
The word "field" is also used in a few methods, such as db_update()->fields()
and db_select->fields()
.
This change definitely makes sense in my mind, but it's also a fair amount of API change. Clearly we can help ease the transition with a BC layer (just have all "field" functions/methods call "column" ones). If we take that approach, we could remove BC in 2.x and implement it in 1.x whenever.
We have a DX problem with
db_add_field()
in that the term "field" is confusing. We have fields on entities, and fields in forms, but "field" is not a common term in databases, particularly relational databases like MySQL.We inherited
db_add_field()
and friends (db_drop_field()
,db_change_field()
,db_escape_field()
,db_field_names()
,db_field_exists()
,db_field_set_default()
,db_field_set_no_default()
) from Drupal 7. Let's deprecate the lot of them, and make equivalents using the word "column" instead.db_add_field()
db_drop_field()
db_change_field()
db_escape_field()
db_field_names()
db_field_exists()
db_field_set_default()
db_field_set_no_default()
db_update()->fields()
db_select->fields()