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

When SQL update scripts splitted to transactions, commented lines are not ignored #3302

Open
VitaliiEv opened this issue Aug 20, 2023 · 0 comments

Comments

@VitaliiEv
Copy link

  • Platform version: 7.2.19
    As it's stated in documentation, transactions are separated with "^"
    Sometimes CUBA Platform generates scripts, which contains commented out SQL statements.
    Commented lines are not ignored when it comes to splitting update scripts to transactions.
    A real life example shown below caused that only third line of script was rolled back.

  • Minimal reproducible example:
    Create update script with commented out lines:

  1. alter table A add column B bigint;
  2. -- commented out line^
  3. alter table A add column C bigint not null;
  • Expected behaviour
    all statements are executed in one transaction line 2 ignored

  • Actual behaviour
    statements are executed in two transactions

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

No branches or pull requests

1 participant