Skip to content

fix: ubcli ddl - generate SQL for added multilang columns in the same way when base columnd added or just language added

Andrii Bezuglyi requested to merge fix/ubcli_genarateDDL_notNull_multilang into master

Simplify quoteIfNeed cumbersome conditions

  • remove excessive check for column.enumGroup - it is checked at top of the quoteIfNeed function
  • convert some ternary to if for readability
  • the condition !mustBeC.allowNull is already checked in the if, the && guarantees that inside that if it is try. There is no need to check it in the nested if - it is always true, so delayedNotNull is also always true.
  • in the big compareColumns function
    • for multi-language column, remove asIs.columnByName(columnBase) condition check - the main column is always added first, so no need a special treatment the case, when there is no base column
    • reduce scope of the delayedNotNull variable.

Merge request reports

Loading