Resolution

ARTIFACTORY: How can I retain the current directory structure (with the same names but different letter casing) and restore any missing subdirectories in the UI after converting the database to be case-sensitive

AuthorFullName__c
Ino Choi
articleNumber
000005978
ft:sourceType
Salesforce
FirstPublishedDate
2024-01-14T15:26:57Z
lastModifiedDate
2024-01-11
VersionNumber
1
In MySQL databases operating in a case-insensitive mode, directory names are not distinguished by letter case. If files were initially uploaded to a directory named “FOLDER”' and subsequent uploads are made to this directory with different letter cases, such as “folder”, the database will associate the uploaded content with the existing directory, regardless of the letter case used (e.g., “Folder”, “foldeR”, etc.). However, the paths for each uploaded file remain distinguishable based on the casing used.

User-added image

Here, we see that only the subdirectory "FOLDER" (line 7) is recorded in the nodes table in the database (where node_type 0 denotes a directory). As mentioned earlier, in a case-insensitive database, it does not generate additional entries to distinguish directories with identical names but different casing. Instead, it utilizes the existing directory as long as the name aligns.

Each uploaded artifact (node_type 1) has distinct paths with varying letter casing. For instance, the artifact "test.0.0.1" is deployed under the directory "path/to/FOLDER/0.0.1”,

User-added image

while the artifact “test.0.0.3” is deployed under the directory “path/to/folder/0.0.3”.

User-added image

Due to the case-insensitive nature of the database, all items are displayed under the "FOLDER" directory in the UI.

User-added image


Following the collation conversion queries, the database is now configured to be case-sensitive. Then, we see that the 0.0.3 and 0.0.4 subdirectories under the "FOLDER" directory are missing.

User-added image


This is due to the fact that the node with the node_name "folder" (node_type 0) is not present in the database. In a case-sensitive database, the absence of this specific node impacts the way subdirectories are displayed in the UI.

To address this issue, you may refer to this KB article and consolidate directories with the same name but different cases into a unified directory with consistent casing. As a result, all paths have been converted to use the “FOLDER” directory.

User-added image

However, if your preference is to preserve the existing structure with directory names maintained in different casings, it is necessary to add the missing nodes to the database. This can be achieved by deploying a new artifact to the specific subdirectory, thereby creating a corresponding entry in the database.

User-added image

Then, the hidden subdirectories, along with newly uploaded artifacts, will become visible again in the UI.

User-added image

And we can see that the subdirectory "folder" (line 5) has been added to the nodes table in the database.

User-added image