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

[DbUp.Oracle] Script fail when comment at end #3

Open
Orkad opened this issue Jan 21, 2020 · 5 comments
Open

[DbUp.Oracle] Script fail when comment at end #3

Orkad opened this issue Jan 21, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@Orkad
Copy link

Orkad commented Jan 21, 2020

Don't know if its only oracle related but in fact, if you try to run the following scripts :
create table FOO (myid INT NOT NULL); -- this comment will fail the script
create table FOO (myid INT NOT NULL); /* this comment will fail the script too */

the scripts will fail according to the oracle exception ORA-00900 invalid SQL statement.

DbUp consider the comment as SQL instruction in each cases.

@sungam3r
Copy link
Member

What version do you use?

@Orkad
Copy link
Author

Orkad commented Jan 21, 2020

4.3.0 (current latest)

@Orkad
Copy link
Author

Orkad commented Jan 21, 2020

image

Actualy this simple test fail. Do you want a PR of that ?

@sungam3r
Copy link
Member

Interesting. Perhaps this is due to \r\n absence at the end of script? It looks like a bug.

@Orkad
Copy link
Author

Orkad commented Jan 22, 2020

Same problem with Environnement.NewLine at the end of script. I think the sql parser just split our script relative to the dialect delimiters. It will be interresting to remove comment from script before execution, or maybe detect if parsed text is a command.

@sungam3r sungam3r added the bug Something isn't working label Aug 21, 2023
@droyad droyad transferred this issue from DbUp/DbUp Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Bugs
Development

No branches or pull requests

2 participants