Modifying OpenMRS database table column character count

May I change the character limit for a certain column in the OpenMRS database tables? Is it allowed? Will it work? Are there any bad effects?

Which table? Which column? And why?

The family_name, given_name, middle_name, columns of the person_name table.

Because some names might not fit the 50 character limit.

Do you already have such names?

Yes. For example: Ratziel Timshel Ismail Zerubbabel Zabud Zimry Pike Blavatsky Philo Judaeus Polidorus Isurenus Morya Nylghara Rakoczy Kuthumi Krishnamurti Ashram Jerram Akasha Aum Ultimus Rufinorum Jancsi Janko Diamond Hu Ziv Zane Zeke Wakeman Wye Muo Teletai Chohkmah Nesethrah Mercavah Nigel Seven Morningstar A. San Juan CCCII

Read more: http://newsinfo.inquirer.net/412195/student-enrolls-using-41-names#ixzz50HJP2yDo Follow us: @inquirerdotnet on Twitter | inquirerdotnet on Facebook

Not clear enough. Can you put each name on a separate line? Or separate them with commas?

Given Name: “Ratziel Timshel Ismail Zerubbabel Zabud Zimry Pike Blavatsky Philo Judaeus Polidorus Isurenus Morya Nylghara Rakoczy Kuthumi Krishnamurti Ashram Jerram Akasha Aum Ultimus Rufinorum Jancsi Janko Diamond Hu Ziv Zane Zeke Wakeman Wye Muo Teletai Chohkmah Nesethrah Mercavah Nigel Seven Morningstar”

Middle Initial: “A.”

Family Name: “San Juan CCCII”

Is Given Name just one name? Or many names?

The given name is composed of many names.

Is that for just one person?

Yes. This is just for one person.

I do not believe that there exists a real person with a given name of all this: “Ratziel Timshel Ismail Zerubbabel Zabud Zimry Pike Blavatsky Philo Judaeus Polidorus Isurenus Morya Nylghara Rakoczy Kuthumi Krishnamurti Ashram Jerram Akasha Aum Ultimus Rufinorum Jancsi Janko Diamond Hu Ziv Zane Zeke Wakeman Wye Muo Teletai Chohkmah Nesethrah Mercavah Nigel Seven Morningstar”

I think that is fiction! :smile:

Are you trolling us?

It is not fiction. I pasted a link as proof. I shouldn’t have used an exaggerated example. But whether you believe it or not, there are instances that given names can exceed the 50 character count.

But anyway, I just wanted to know if changing of the character count is allowed, and if it will work or not. I also want to know that if I change it, would there be any bad effects?

No sir, I am not trolling anyone. The example that I used might have been an exaggeration, but it is true.

Anyway, I was just asking a simple question on the possibility of changing the character count of a column in a database table, and wondering if it will work, and would there be any bad effects if ever I did.

My recommendation is that do not do anything. Assume all names will fit in the current character limit. If a time comes when you have a name which does not fit, then get back to us for advice. :slight_smile:

One of the lessons i have learn’t over time is that some times we waste time doing certain things in anticipation of what never actually happens.

1 Like

Changing a database column to make it wider almost always requires a UI change. But even if that person (whose parent should be sent to prison) is a OpenMRS patient, just put Ratziel as first name and it’ll be ok because it’s not an identifier.

1 Like

And this will also get in your way:

Together with: https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/validator/PersonNameValidator.java#L154-L155

1 Like

@zachraduban is that multiple given names or just one given name? In other words, in a normal conversation does anyone refer to this guy using all those names at once? Like for example “HEY Ratziel Timshel Ismail Zerubbabel Zabud Zimry Pike Blavatsky Philo Judaeus Polidorus Isurenus Morya Nylghara Rakoczy Kuthumi Krishnamurti Ashram Jerram Akasha Aum Ultimus Rufinorum Jancsi Janko Diamond Hu Ziv Zane Zeke Wakeman Wye Muo Teletai Chohkmah Nesethrah Mercavah Nigel Seven Morningstar DID YOU HAVE YOUR BREAKFAST?”. (I had to cap and bold to separate the name from other non-name words).

Since this conversation got a bit sidetracked by the example you gave…

The specific answer is what Daniel said in post 18: Modifying OpenMRS database table column character count

Changing the database column is not sufficient, you would also need to fork openmrs-core and make a matching change in the hibernate configuration.

I agree in principle that we should have wider DB columns for names. Out of 7 billion people in the world, there are some cultures with very long names. And an individual implementation can enforce shorter names via the name validation regex setting. In practice I wouldn’t prioritize this change unless there’s a non-hypothetical request for it. (Of course PRs are always welcome if you’re inspired to address this!)

1 Like