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

feat(occ): add possibility to edit indices #43209

Merged
merged 1 commit into from
Feb 28, 2024
Merged

feat(occ): add possibility to edit indices #43209

merged 1 commit into from
Feb 28, 2024

Conversation

JohannesGGE
Copy link
Contributor

@JohannesGGE JohannesGGE commented Jan 30, 2024

  • Resolves: #

Summary

To be able to edit indices, this pr extend the occ db:add-missing-indices by the this possibility.
This is important if there is an index that need to be edited (deleting and right after that adding indices).

Use cases:

  • Extend index with new column(s)
  • Make index unique / not unique
  • Change index name

Contributes to: nextcloud/mail#9162

TODO

  • ...

Checklist

@JohannesGGE
Copy link
Contributor Author

JohannesGGE commented Feb 5, 2024

Note to myself: Somehow we have to make clear that it is mandatory to change the name of the index to prevent execution on every db:add-missing-indices.

@ChristophWurst
Copy link
Member

We could call it replace instead of edit to make the intent clear :)

@JohannesGGE
Copy link
Contributor Author

I changed the output of dry-run to improve readability:

before:

Adding additional INDEX index to the TABLE table, this can take some time...
SQL_1;


TABLE table updated successfully.
Adding additional INDEX index to the TABLE table, this can take some time...
SQL_1;

SQL_2;


TABLE table updated successfully.
Adding additional INDEX index to the TABLE table, this can take some time...
SQL_3;

SQL_1;

SQL_2;


TABLE table updated successfully.
Adding additional INDEX index to the TABLE table, this can take some time...
SQL_3;

SQL_1;

SQL_4;

SQL_2;


TABLE table updated successfully.

after:

Adding additional INDEX index to the TABLE table, this can take some time...
TABLE table updated successfully.
Adding additional INDEX index to the TABLE table, this can take some time...
TABLE table updated successfully.
Adding additional INDEX index to the TABLE table, this can take some time...
TABLE table updated successfully.
Adding additional INDEX index to the TABLE table, this can take some time...
TABLE table updated successfully.
SQL_3;

SQL_1;

SQL_4;

SQL_2;

@JohannesGGE JohannesGGE added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 7, 2024
@JohannesGGE JohannesGGE marked this pull request as ready for review February 7, 2024 15:35
@ChristophWurst ChristophWurst added the pending documentation This pull request needs an associated documentation update label Feb 7, 2024
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

🚀

core/Command/Db/AddMissingIndices.php Outdated Show resolved Hide resolved
core/Command/Db/AddMissingIndices.php Outdated Show resolved Hide resolved
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

🚀

lib/public/DB/Events/AddMissingIndicesEvent.php Outdated Show resolved Hide resolved
lib/public/DB/Events/AddMissingIndicesEvent.php Outdated Show resolved Hide resolved
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

😎

@ChristophWurst
Copy link
Member

Conventional commits are now enforced for this repo. Please change the commit title to feat(occ): add possibility to edit indices

Signed-off-by: Johannes Merkel <mail@johannesgge.de>
@ChristophWurst ChristophWurst changed the title enh(occ): add possibility to edit indices feat(occ): add possibility to edit indices Feb 28, 2024
@ChristophWurst ChristophWurst removed the pending documentation This pull request needs an associated documentation update label Feb 28, 2024
@ChristophWurst ChristophWurst removed the request for review from nickvergessen February 28, 2024 06:48
@GretaD GretaD merged commit b2751b5 into master Feb 28, 2024
160 checks passed
@GretaD GretaD deleted the enh/edit-indices branch February 28, 2024 08:05
@blizzz blizzz mentioned this pull request Mar 5, 2024
@joshtrichards joshtrichards added this to the Nextcloud 29 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants