Skip to content

Cleanup versions entities in versions:clean command - #43263

Merged
artonge merged 1 commit into
masterfrom
artonge/fix/versions_cleanup
Mar 6, 2024
Merged

Cleanup versions entities in versions:clean command#43263
artonge merged 1 commit into
masterfrom
artonge/fix/versions_cleanup

Conversation

@artonge

Copy link
Copy Markdown
Collaborator

Forgoten place where we need to remove versions entities in the database.

Fix#39046

@artongeartonge changed the title Merge pull request #43203 from nextcloud/fix/cleanup-register-command-with-diCleanup versions entity in during versions:clean commandFeb 1, 2024
@artongeartonge changed the title Cleanup versions entity in during versions:clean commandCleanup versions entities in during versions:clean commandFeb 1, 2024
@artongeartonge self-assigned this Feb 1, 2024
@artongeartonge added bug 3. to review Waiting for reviews feature: versions php Pull requests that update Php code labels Feb 1, 2024
@artongeartonge added this to the Nextcloud 29 milestone Feb 1, 2024
@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable28

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable27

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable26

Comment threadapps/files_versions/lib/Command/CleanUp.php Outdated
@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch 2 times, most recently from 9df8844 to b2cc661CompareFebruary 1, 2024 16:51
@artonge

This comment was marked as resolved.

@nickvergessen

Copy link
Copy Markdown
Member
  1. OCA\Files_Versions\Tests\Command\CleanupTest::testDeleteVersions with data set #0 (true)
    ArgumentCountError: Too few arguments to function OCA\Files_Versions\Command\CleanUp::__construct(), 2 passed in /home/runner/work/server/server/apps/files_versions/tests/Command/CleanupTest.php on line 60 and exactly 3 expected

@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch from 0b2b1a9 to b0887c0CompareMarch 4, 2024 14:51
Comment threadapps/files_versions/lib/Command/CleanUp.php
@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch 2 times, most recently from ca4d80b to 94fdd1cCompareMarch 4, 2024 15:05
Comment threadapps/files_versions/lib/Command/CleanUp.php Fixed
Comment threadapps/files_versions/lib/Db/VersionsMapper.php Fixed
Comment threadapps/files_versions/lib/Db/VersionsMapper.php Fixed
@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch 5 times, most recently from 11a31d5 to 915c02bCompareMarch 4, 2024 17:17
Comment threadapps/files_versions/lib/Db/VersionsMapper.php Outdated
@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch from 915c02b to ea4898dCompareMarch 5, 2024 10:39
Comment threadapps/files_versions/lib/Db/VersionsMapper.php Outdated
@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch 2 times, most recently from ad0d158 to aead675CompareMarch 5, 2024 13:56

@icewind1991icewind1991 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For bonus phpoints™ you can split off the fileid chunk fetching into a generator to hopefully make it bit more readable than the mixing of queries

@artonge
artongeforce-pushed the artonge/fix/versions_cleanup branch from aead675 to ed3f4edCompareMarch 5, 2024 15:15
@artonge

Copy link
Copy Markdown
CollaboratorAuthor

For bonus phpoints™ you can split off the fileid chunk fetching into a generator to hopefully make it bit more readable than the mixing of queries

Indeed, improves separation of concern, thanks for the tip :)

@artonge
artonge dismissed nickvergessen’s stale reviewMarch 5, 2024 15:35

Robin reviewed the query :)

@icewind1991

icewind1991 commented Mar 5, 2024

Copy link
Copy Markdown
Member

✨ +1 phpoint™ for Louis ✨

Signed-off-by: Louis Chemineau <louis@chmn.me>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugfeature: versionsphpPull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Versions still appear in the Files view after running php occ files_versions:cleanup

6 participants

@artonge@nickvergessen@icewind1991@ArtificialOwl@github-advanced-security@come-nc