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

[SQL] Adding directories to separate new patches from clean-up patches from Archives #3531

Merged
merged 5 commits into from
Mar 12, 2018

Conversation

ridz1208
Copy link
Collaborator

@ridz1208 ridz1208 commented Mar 2, 2018

This creates 2 new directories in the /SQL/ folder:

  • Cleanup_patches: Directory where release clean-ups should be made to. to replace putting SQL code in PHP tools scripts and/or commenting out clean-up commands in the release scripts (See README.md for more details)
  • New_patches: Directory where new SQL scripts go instead of putting them in Archives which should contain archives and not patches that have not yet been ran... This directory contains any and all new sql scripts no matter the branch (See README.md for more details)

@ridz1208 ridz1208 added Cleanup PR or issue introducing/requiring at least one clean-up operation [branch] major labels Mar 2, 2018
@ridz1208
Copy link
Collaborator Author

ridz1208 commented Mar 2, 2018

@driusan please review grammar :S

@@ -0,0 +1,3 @@
This directory contains SQL patches written as a post-release clean-up. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does that mean someone could include the following instruction in such cleanup patches?
ALTER TABLE ADD COLUMN ....

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@PapillonMcGill they could include whatever they want as long as its not critical to the functioning of the code.

things that go here are things that usually are commented out in the release patches

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a line to explain

@@ -0,0 +1,3 @@
This directory contains SQL patches written as a post-release clean-up. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements.

These patches should be run at the discretion of the projects with the full knowledge of the possible side effects of these.
Copy link
Contributor

Choose a reason for hiding this comment

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

What would happen if a project decide not to run those cleanup patches?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

theoretically everything should still work fine in their codebase/database, these should only be clean-up

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a line to explain

@PapillonMcGill PapillonMcGill added the State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed label Mar 5, 2018
Copy link
Collaborator

@driusan driusan left a comment

Choose a reason for hiding this comment

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

as requested

@@ -0,0 +1,3 @@
This directory contains SQL patches written as a post-release clean-up. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we call it CleanupPatches instead of Cleanup_patches? I don't like the mixed case and underscore.

Copy link
Collaborator

Choose a reason for hiding this comment

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

s/as a/for/

Copy link
Collaborator

Choose a reason for hiding this comment

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

s/clean-up/cleanup/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i was just being consistent with Release_patches.

I dont mind the change if you approve having Release_patces and CleanupPatches in the same directory

@@ -0,0 +1,3 @@
This directory contains SQL patches written as a post-release clean-up. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements.

These patches should be run at the discretion of the projects with the full knowledge of the possible side effects of these.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"of the patches" or "of these patches"

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is also part of the first paragraph and not a second paragraph too

Copy link
Contributor

Choose a reason for hiding this comment

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

I like "of these patches"

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another option is to just leave off the "of these"

@@ -0,0 +1,3 @@
This directory contains SQL patches necessary during the upgrade of loris. Upon release, the SQL patches concerned will be concatenated into a single release patch stored under the `SQL/Release_patches` directory. The files used for the concatenation are then moved to the `SQL/Archive/X.Y` directory.
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment about the directory name, and LORIS should be uppercase.

@ridz1208
Copy link
Collaborator Author

ridz1208 commented Mar 5, 2018

@driusan @PapillonMcGill please re-review

This directory contains SQL patches written for post-release cleanup. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements.

These patches should be run at the discretion of the projects with the full knowledge of the possible side effects of these patches.
This directory contains SQL patches written for post-release cleanup. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements. These patches should be run at the discretion of the projects with the full knowledge of the possible side effects of these patches. The content of these patches should not be mandotory for proper functioning of the database, they should be run for the sole purpose of removing unused tables, columns or fields; any mandatory cleanup should be added to the release patches.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 +1

@@ -0,0 +1 @@
This directory contains SQL patches written for post-release cleanup. These patches can contain `ALTER TABLE`, `DELETE` and/or `DROP` statements. These patches should be run at the discretion of the projects with the full knowledge of the possible side effects of these patches. The content of these patches should not be mandotory for proper functioning of the database, they should be run for the sole purpose of removing unused tables, columns or fields; any mandatory cleanup should be added to the release patches.
Copy link
Contributor

Choose a reason for hiding this comment

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

You mention DELETE statement but near the end of the paragraph, you mention removing columns or fields, not rows.

Could you add precision about when DELETE could be used? or remove DELETE statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

rows should be there as well, adding it to the readme

@PapillonMcGill PapillonMcGill removed the State: Discussion required PR or issue that requires the resolution of a discussion with the relevant parties to proceed label Mar 5, 2018
@driusan driusan merged commit 88b4b32 into aces:major Mar 12, 2018
@ridz1208 ridz1208 added this to the 20.0 milestone Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup PR or issue introducing/requiring at least one clean-up operation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants