Issue #2266: move INVISIBLE clause for MySQL/MariaDB table columns after the virtual and generation clause

This commit is contained in:
Ansgar Becker
2025-10-04 12:23:03 +02:00
parent 173955679b
commit e233d96b44

View File

@@ -10959,10 +10959,6 @@ begin
Result := Result + ' '; // Add space after each part
end;
if InParts(cpInvisible) and Invisible and FConnection.Has(frInvisibleColumns) then begin
Result := Result + 'INVISIBLE ';
end;
if InParts(cpAllowNull) and (not IsVirtual) and (not FConnection.Parameters.IsAnyMSSQL) then begin
if not AllowNull then
Result := Result + 'NOT NULL '
@@ -11012,6 +11008,10 @@ begin
Result := Result + 'AS ('+GenerationExpression+') ' + Virtuality + ' ';
end;
if InParts(cpInvisible) and Invisible and FConnection.Has(frInvisibleColumns) then begin
Result := Result + 'INVISIBLE ';
end;
if InParts(cpComment) then begin
if (Comment <> '') and FConnection.Parameters.IsAnyMySQL then
Result := Result + 'COMMENT ' + FConnection.EscapeString(Comment) + ' ';