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

[V4.25.0] CreateViewGenerator issue #5353

Open
1 of 2 tasks
adamjones0101 opened this issue Dec 11, 2023 · 6 comments
Open
1 of 2 tasks

[V4.25.0] CreateViewGenerator issue #5353

adamjones0101 opened this issue Dec 11, 2023 · 6 comments

Comments

@adamjones0101
Copy link

Search first

  • I searched and no similar issues were found

Description

CreateViewGenerator.generateSql is not creating the correct SQL when isFullDefinition is false and replaceIfExists is true.

Code should read something like this around line 81:

.prepend("VIEW")
.prepend(" ");
if (statement.isReplaceIfExists()) {
viewDefinition.prepend("CREATE OR REPLACE");
}
else {
viewDefinition.prepend("CREATE");
}

Steps To Reproduce

use fullDefinition false and replaceIfExists true on a view that exists

Expected/Desired Behavior

SQL should be CREATE OR REPLACE

Liquibase Version

4.25.0

Database Vendor & Version

Oracle 19.3

Liquibase Integration

No response

Liquibase Extensions

No response

OS and/or Infrastructure Type/Provider

No response

Additional Context

Oracle 19.3

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@kevin-atx
Copy link
Contributor

@adamjones0101 - thank you for this issue. Since you already identified the code that would need to change, would you be willing to submit the change as a PR?

@adamjones0101
Copy link
Author

I could. I had to make a little more change to CreateViewGenerator.java to get it to work right. However, I have not been able to fully test our changesets because of #5359 which is a serious regression. Therefore I hesitate to submit the PR at this time.

@adamjones0101
Copy link
Author

I do not have a Git environment from which I can create a PR, I only download the zip, build it and use it within our product.
However, I am attaching my changed file for anybody to review and push
CreateViewGenerator.zip

@MalloD12
Copy link
Contributor

Hi @adamjones0101,

I think this issue could have already been fixed by #5304. Would you mind trying on the latest liquibase version?

Thanks,
Daniel.

@adamjones0101
Copy link
Author

It's not a high priority because we are still blocked by Issue 5359. In fact we are considering using Version 4.15.0 with the hope that the issue had not yet been introduced.

@MalloD12
Copy link
Contributor

If it becomes something required to fix, could you please expand a little bit more on the steps performed to reproduce this issue? Which command were you trying to execute when you faced this issue, changelog example, etc? If you were trying to execute a generate-changelog or diff command I would recommend you to try with latest version when you have some time.

Thanks,
Daniel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Discussion
Development

No branches or pull requests

3 participants