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

Add serverPath column to db metadata table #12033

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

erikjv
Copy link
Collaborator

@erikjv erikjv commented Jan 15, 2025

This is a first step to fix issues where file names are normalized differently on the server vs. the client.

This is a first step to fix issues where file names are normalized
differently on the server vs. the client.
@erikjv erikjv self-assigned this Jan 15, 2025
@erikjv erikjv marked this pull request as draft January 15, 2025 13:49
@@ -72,6 +72,7 @@ SyncFileItemPtr SyncFileItem::fromSyncJournalFileRecord(const SyncJournalFileRec
item->_remotePerm = rec._remotePerm;
item->_serverHasIgnoredFiles = rec._serverHasIgnoredFiles;
item->_checksumHeader = rec._checksumHeader;
item->_remoteName = QString::fromUtf8(rec._serverPath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have the same name remoteName for DB as well? Just to be consistent ...


if (columns.indexOf("remoteName") == -1) {
SqlQuery query(_db);
query.prepare("ALTER TABLE blacklist ADD COLUMN remoteName VARCHAR(4096);");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a central mechanism taking care of db migrations? This feels so wrong

In follow-up commits, handling for different normalizations between the
server and the client is added. So when doing a server request, the
recorded remote name has to be used.

This also adds a bit of documentation to clarify what the propagator
jobs do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants