Skip to content

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

@VitaliiEv

Description

@VitaliiEv
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions