Add comments to database fields

Today I spend some time tying to discover why a journal (moved from ubiquitypress) don’t show review-forms properly.

Data was there, but the problem was with “review_forms.assoc_id”.
After some testing I realized “assoc_id” don’t refer the right journal id so IMHO, this field must be renamed to “journal_id”. Renaming this column is risky and probably a waste of time so I’m not suggesting a change…

The point is that most of the time OJS database is selfexplainatory, and you can find easily tables and fields if you ask yourself “where I would place it if I were the developer?”.

But I think would be a nice addition if we cant comment DB fields… at least, for columns like the one described that or are not obvius, or are confusing or are refered as a foreigh key (ie: “if you modify this field, X table also need to be updated”) or could break everything… :wink:

This is just a proposal to think about, that is not urgent. And if you agree, not everything need to be done at the same time… This is just a suggestion for developers to talk about the code not only in the php side, also in the database.

Cheers,
m.

1 Like