X Tutup
Skip to content

Fix occ migrations:status Executed Unavailable Migrations and New Migrations#40085

Merged
phil-davis merged 2 commits intomasterfrom
issue-40084
May 19, 2022
Merged

Fix occ migrations:status Executed Unavailable Migrations and New Migrations#40085
phil-davis merged 2 commits intomasterfrom
issue-40084

Conversation

@phil-davis
Copy link
Contributor

@phil-davis phil-davis commented May 19, 2022

Description

getAvailableVersions() returns an array with the migration date-timestamps as values. The code incorrectly used the keys of the array. This PR removes the incorrect array_keys() in 2 places.

Related Issue

How Has This Been Tested?

Manual run of the command:

Before:

$ php occ migrations:status core
    >> App:                                                core
    >> Version Table Name:                                 oc_migrations
    >> Migrations Namespace:                               OC\Migrations
    >> Migrations Directory:                               /home/phil/git/owncloud/core/core/Migrations
    >> Previous Version:                                   20200610110817
    >> Current Version:                                    20210928123126
    >> Next Version:                                       Already at latest migration step
    >> Latest Version:                                     20210928123126
    >> Executed Migrations:                                28
    >> Executed Unavailable Migrations:                    28
    >> Available Migrations:                               28
    >> New Migrations:                                     28

After:

$ php occ migrations:status core
    >> App:                                                core
    >> Version Table Name:                                 oc_migrations
    >> Migrations Namespace:                               OC\Migrations
    >> Migrations Directory:                               /home/phil/git/owncloud/core/core/Migrations
    >> Previous Version:                                   20200610110817
    >> Current Version:                                    20210928123126
    >> Next Version:                                       Already at latest migration step
    >> Latest Version:                                     20210928123126
    >> Executed Migrations:                                28
    >> Executed Unavailable Migrations:                    0
    >> Available Migrations:                               28
    >> New Migrations:                                     0

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@phil-davis phil-davis self-assigned this May 19, 2022
@phil-davis phil-davis marked this pull request as ready for review May 19, 2022 06:44
@phil-davis phil-davis changed the title Fix occ migrations:status Executed Unavailable Migrations Fix occ migrations:status Executed Unavailable Migrations and New Migrations May 19, 2022
@phil-davis phil-davis requested a review from jvillafanez May 19, 2022 07:30
@phil-davis
Copy link
Contributor Author

https://drone.owncloud.com/owncloud/core/35767/26/8

+ wait-for-it -t 600 fsweb.test.owncloud.com:445
services aren't ready in 10m0s

I hope that fsweb is still working - I restarted CI.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@phil-davis phil-davis marked this pull request as draft May 19, 2022 09:13
@phil-davis
Copy link
Contributor Author

Ready for merge after 10.10.0 release branch is finished and merged back.

@phil-davis phil-davis marked this pull request as ready for review May 19, 2022 16:17
@phil-davis phil-davis merged commit efef3c8 into master May 19, 2022
@delete-merged-branch delete-merged-branch bot deleted the issue-40084 branch May 19, 2022 16:17
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.

Executed Unavailable Migrations and New Migrations are non-zero for occ migrations:status core

2 participants

X Tutup