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

DropSchema related changes for issue #1595 #1607

Merged
merged 4 commits into from
Oct 21, 2020
Merged

DropSchema related changes for issue #1595 #1607

merged 4 commits into from
Oct 21, 2020

Conversation

lmsurpre
Copy link
Member

@lmsurpre lmsurpre commented Oct 20, 2020

Previously, if --drop-schema was used without --drop-schema-fhir, --drop-schema-oauth, or --drop-schema-jbatch then it completed with success without actually doing anything.

I think what happened is that we were debating two different options for these args:
A. passing some kind of argument to --drop-schema, so it might be like --drop-schema fhir or --drop-schema oauth jbatch; or
B. using explicit flags for dropping the fhir, schema, or oauth tables, so usage would be like --drop-schema-fhir --drop-schema-oauth

But somehow we ended up with a combination of the two which I hope we can all agree is not very good.
This pull request modifies the current behavior and turns it into option B, removing support for the --drop-schema action.

Note: this PR does not actually address issue #1595 ...it only reworks the user experience of the cli so that others can avoid the error that I made initially.

This is only a partial fix. More work needs to happen for drop-schema to
work on PostgreSQL.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Also added try/catch for dropping undefined indexes

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Copy link
Contributor

@prb112 prb112 left a comment

Choose a reason for hiding this comment

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

Left comments that I want to confirm before LGTM

Copy link
Collaborator

@punktilious punktilious left a comment

Choose a reason for hiding this comment

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

LGTM, subject to Paul's comments.

Permission objects are not used in our use of PostgreSQL

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
@lmsurpre lmsurpre merged commit 971490c into master Oct 21, 2020
@lmsurpre lmsurpre deleted the issue-1595 branch October 21, 2020 14:47
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.

None yet

3 participants