Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NS: [articles]: Article table not accepting page number with letters for v2.0 #747

Open
drdiek opened this issue Apr 24, 2024 · 0 comments
Assignees
Milestone

Comments

@drdiek
Copy link
Member

drdiek commented Apr 24, 2024

In csv2db_import, the Article table only accepts first_page as the data type int(11) which is a number-only data type. Some Journals list page numbers with letters in them, e.g., Proceedings of the National Academy of Sciences, link, or eLife and PLoS Biology. When entering new article records into the Hippocampome database, using a column such as pmid_isbn_page in fragement tables, e.g., phases_fragment, may allow entering page numbers with letters in them. PHP functions to retrieve article ids based on the pmid and first_page can have a conflict when the fragment data and the Article table's first page do not match because of a letter in one entry and no letters in the other.

A solution would be to change the Article table's first_page column to a text data type instead of a number-only one. However, this may have unintended consequences because any existing code that expects to access the column as the integer data type or does numerical operations with the column value could have a conflict. A short term solution implemented is to change any fragment page number entries into numbers only even if the real page description has a letter in it. For example, article's pmid_isbn_page was changed from E2726 to 2726 in phases_fragment. A long term solution can be to go through all code, ensure there will not be any conflicts with changing the Article table first_page column data type, then change the data type to a text one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants