Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHANGE] Add Parent UUID to Files and Directories #26

Open
dla-kramski opened this issue Feb 13, 2024 · 4 comments
Open

[CHANGE] Add Parent UUID to Files and Directories #26

dla-kramski opened this issue Feb 13, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@dla-kramski
Copy link

Apart from the name, there is currently no connection between the files and their directories.

Files and directories could carry the UUID of their (parent) directories in order to formally map the hierarchy.

@dla-kramski dla-kramski added the enhancement New feature or request label Feb 13, 2024
@steffenfritz
Copy link
Owner

Yes, I like that idea. Milestone for v1.0.0.

@steffenfritz steffenfritz added this to the v1.0.0 milestone Feb 15, 2024
@steffenfritz
Copy link
Owner

As the concatenation of every UUID for every directory might be a very long string and might not add extra value as every directory has its own UUID, I suggest not to add the parent UUID to directories but concatenate SESSION-UUID:DIRECTORY-UUID:FILE-UUID

But: This would take a lot of comparisons and lookups. As the path of the file is in the filepath and a path must be unique in one session, SESSION-UUID:FILE-UUID connects all of the requirements.

As the session UUID is stored in file table the information is already in the database the following sql should be sufficient:

SELECT sessionuuid || ':' || fileuuid FROM files;

Opinions, @dla-kramski ?

@hkramski
Copy link

I'm not sure I understand your suggestion. I just thought of an additional column Parent_UUID for files and directories.

@steffenfritz steffenfritz removed this from the v1.0.0 milestone Apr 1, 2024
@steffenfritz
Copy link
Owner

As this makes only sense after aligning to the Wikidata data model, this will be done after #30 . As absolute paths are used, the parent object, i.e. directory, is clear in the current usage of filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants