How to use the "data transfer" import when the database is case sensitive
LUY's data transfer feature can be used to transfer LUY data between LUY instances of the same version, even across different database variants. Depending on the database used, the "data transfer" export might be created with lower- or upper-case table names.
This might cause problems on MySQL databases on Linux, when the tables corresponding to the export are not found as they are lower-case in the data transfer but expected to be upper-case. This will reflect in the LUY logs.
Step-by-step guide
Copy the "data transfer" file to a directory
Extract the files "version.txt", "data.dtd" and "data.xml" from the *.luy file
Open the file "data.dtd", for example in Notepad++
Search
"(!ELEMENT|!ATTLIST) (?!dataset|hibernate_sequences)(\w*)"
and replace with"\1 \U\2\E"
(without quotation marks)Search
"(\w*)(?<!hibernate_sequences)\*"
and replace with"\U\1\E*"
(without quotation marks)If you use another editor, the regex replace syntax might be slightly different
Save
Open the data.xml file, for example in Notepad++
Search
"<(?!dataset|hibernate_sequences)(\w*)"
and replace with"<\U\1\E"
(without quotation marks)If you use another editor, the regex replace syntax might be slightly different
Save
The expected result of those replacements: both files contain only upper-case tag name. Except for the dbunit root level <dataset> tag and the tag for the “hibernate_sequences” table.
Create a zip archive from "version.txt", "data.dtd" and "data.xml" files
Rename the zip file to “import.luy”
Import this file in LUY