Page 1 of 1

Is it safe to directly modify SQL fields?

Posted: Fri Dec 21, 2018 4:33 pm
by mark.grimes
We would like to change the filename and an attribute for a large number of documents. I am tempted to make the change directly in the logicaldoc MySQL database. I realize doing so skips recording the history and versioning, but that is not important for us in this case (the data was incorrect during the initial bulk import of the documents).

Are there any concerns we should be aware of before modifying the SQL data? Will this cause any issues with the full-text indexing? etc?

Re: Is it safe to directly modify SQL fields?

Posted: Thu Dec 27, 2018 4:34 pm
by agaspa
Hi Mark,
it is OK, you can do it, but it is not recommended.

In order to change the filename, you can just update the field "ld_filename" in table ld_document, then if you need it to be searchable I suggest you also to update the field ld_indexed to 0

Code: Select all

UPDATE ld_document SET ld_filename = 'NEW-FILENAME.jpg', ld_indexed = 0 WHERE ld_filename LIKE '%FILE-TO-UPDATE.jpg';
If instead you need to change an attribute you will need to update the table 'ld_document_ext'