-
Notifications
You must be signed in to change notification settings - Fork 164
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
#1978 HasDatabaseUpgradeTag #2061
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,16 @@ codeunit 9999 "Upgrade Tag" | |
exit(UpgradeTagImpl.HasUpgradeTag(Tag, TagCompanyName)); | ||
end; | ||
|
||
/// <summary> | ||
/// Verifies if the database upgrade tag exists. | ||
/// </summary> | ||
/// <param name="Tag">Tag code to check</param> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a comment that the developer can use HasUpgradeTag if it is called from the upgrade context? If it is called from upgrade context e.g. OnUpgradePerDatabase we will automatically use perdatabase check and similar for percompany? Nothing wrong with using this one directly but it could be confusing if someone is reading the existing code. |
||
/// <returns>True if the Tag with given code exist.</returns> | ||
JesperSchulz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
procedure HasDatabaseUpgradeTag(Tag: Code[250]): Boolean | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the idea was to use SetUpgradeTag and HasUpgradeTag only, the code will find out from the context if the tag is per database or per company. Approving since we already have the SetDatabaseUpgradeTag, which is wrongly named IMO. It should be PerDatabaseUpgradeTag |
||
begin | ||
exit(UpgradeTagImpl.HasDatabaseUpgradeTag(Tag)); | ||
end; | ||
|
||
/// <summary> | ||
/// Sets the upgrade tag for database upgrades. | ||
/// </summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per-databse