opencats / OpenCATS

Applicant Tracking System (maintained code base)
http://www.opencats.org
Other
532 stars 245 forks source link

how to fix: MySQL Query Failed: Data too long for column 'description' at row 1 #622

Open ichris007 opened 1 year ago

ichris007 commented 1 year ago

What version of opencats are you running?

Version 0.9.4 Countach

Release or downloaded from Git?

yes

WAMP or LAMP?

synology NAS webstation

What version of PHP and MySQL are you running

PHP version 4.9.7, database MariaDB 10

attach appropriate error logs. Please attach [apache/mysql] error/access logs as needed.

MySQL Query Failed: Data too long for column 'description' at row 1 UPDATE joborder SET title = '产业化合伙人', client_job_id = '', company_id = 57, contact_id = -1, start_date = NULL, description = '

RussH commented 1 year ago

I assume you're trying to add too long a description into the joborder description field?

the joborder description field can accommodate 65,535 characters. If you're trying to add more, you'd need to change it to a LONGTEXT type, and likely would need some other changes in opencats, too.

ichris007 commented 1 year ago

I assume you're trying to add too long a description into the joborder description field?

the joborder description field can accommodate 65,535 characters. If you're trying to add more, you'd need to change it to a LONGTEXT type, and likely would need some other changes in opencats, too.

Thanks for your response. I didn't add to tong description, just about 100 characters in Chinese. I opened it in safari and it was an error message, but it was normal in chrome.

RussH commented 1 year ago

Okay, if it's not what the error is actually reporting, it may be something else. I'd start by checking that the database is configured to use Unicode.. as 0.9.4 is fairly old now. Unfortunately it maybe you need to spin up a test box, get the most recent release on it, and import your data there and we can do some better support on v 0.9.7.2

ichris007 commented 1 year ago

Your advice is great. I have also tried to upgrade, but have encountered 2 problems and would like to ask you for advice:

  1. I did [Site Backup] by backing up the whole system and then importing into the upgraded system, but thera were a lot of data lost, I don't how to upgrade properly.
  2. I Chineseized a lot of the content in the files under /modules/, I don't know if the upgrade will overwrite these changes.