This chapter covers how IDENTITY columns, generated/computed columns, DEFAULT expressions, EDB-specific functions, referential actions, and collation are handled during schema conversion.
Each section states clearly whether conversion is automatic or requires manual follow-up.
Automatic. EDB IDENTITY columns are
converted to AUTO_INCREMENT. The following edge cases emit
a warning and may require manual intervention:
GENERATED BY DEFAULT AS IDENTITY —
EDB supports two IDENTITY forms:
GENERATED ALWAYS AS IDENTITY (value always auto-generated)
and GENERATED BY DEFAULT AS IDENTITY (explicit value
allowed on INSERT). MySQL and MariaDB have no equivalent of the
BY DEFAULT form — both EDB variants are converted
identically to AUTO_INCREMENT. The BY DEFAULT
distinction is silently dropped; no additional warning is emitted beyond
the standard IDENTITY conversion notes below.
Multiple IDENTITY columns — MySQL/MariaDB allow
only one AUTO_INCREMENT column per table. A second IDENTITY
column is converted to a plain integer with a warning; a trigger or
application-side sequence must be added manually.
Non-default seed — preserved as
AUTO_INCREMENT = seed in the table options. No manual
action needed unless the starting value must be adjusted after data
migration.
Non-default increment — EDB
INCREMENT BY n (n ≠ 1) has no per-table equivalent in
MySQL/MariaDB. A warning is emitted; set
@@auto_increment_increment at session or global level if
needed.
Index requirement — AUTO_INCREMENT
must be the leading column of at least one index. If the IDENTITY column
is not part of the primary key, the converter adds a
KEY (col) automatically.
Automatic, but expressions may need manual adjustment.
| EDB syntax | MySQL / MariaDB output | Notes |
|---|---|---|
GENERATED ALWAYS AS (expr) |
GENERATED ALWAYS AS (expr) STORED |
STORED added by converter |
COMPUTED ALWAYS AS (expr) |
GENERATED ALWAYS AS (expr) VIRTUAL |
NOT NULL omitted — not valid on
VIRTUAL |
Note: In EDB,
GENERATEDcolumns are physically stored;COMPUTEDcolumns are computed on read (virtual). EDB uses different keywords in place of MySQL/MariaDB’sSTORED/VIRTUALqualifiers, hence the mapping above.GENERATED BY DEFAULTexists in EDB only for identity columns (BY DEFAULT AS IDENTITY); there is noGENERATED BY DEFAULT AS (expr)form.
The following expression-level transformations are applied automatically:
"ColName") are converted
to MySQL backtick identifiers (`ColName`). Without this
step, "ColName" would be interpreted as a string literal in
MySQL.|| → CONCAT(...) for MySQL (MariaDB
supports || natively).+ between string operands → CONCAT(...)
(heuristic; ambiguous cases are left as-is with a warning).EDB-specific functions inside GENERATED /
COMPUTED expressions are not substituted
automatically — see EDB-Only Functions
below.
A warning is always emitted for every GENERATED and
COMPUTED column.
Automatic. The converter substitutes EDB default
expressions with their MySQL/MariaDB equivalents. The table shows the
expression only; in the generated DDL it appears as
DEFAULT <expression> within the column
definition.
| EDB expression | MySQL / MariaDB expression | Notes |
|---|---|---|
CURRENT_TIMESTAMP |
CURRENT_TIMESTAMP |
|
CURRENT_DATE |
(CURDATE()) |
Requires MySQL 8.0.13+ / MariaDB 10.2+ |
CURRENT_TIME |
(CURTIME()) |
Requires MySQL 8.0.13+ / MariaDB 10.2+ |
TRUE / FALSE |
1 / 0 |
BOOLEAN columns |
CURRENT_GUID() |
(UUID()) |
Warning emitted — format differs (lowercase, no braces); requires MySQL 8.0.13+ / MariaDB 10.2+ |
CURRENT_USER() |
(CURRENT_USER()) |
Warning emitted — returns user@host in MySQL; requires
MySQL 8.0.13+ / MariaDB 10.2+ |
CURRENT_DATABASE() |
(DATABASE()) |
Warning emitted — requires MySQL 8.0.13+ / MariaDB 10.2+ |
CURRENT_SESSIONID() |
(CONNECTION_ID()) |
Warning emitted — requires MySQL 8.0.13+ / MariaDB 10.2+ |
LASTIDENTITY() |
(DEFAULT clause removed) | No equivalent — warning emitted in script and log |
CURRENT_COMPUTER() |
(DEFAULT clause removed) | No equivalent — warning emitted in script and log |
| (other) | <expr> or (<expr>) |
|| and + translated; EDB-only functions
detected (warnings); wrapped in () if the expression was
modified — see note below |
The parenthesised expression default syntax
DEFAULT (expr) requires MySQL 8.0.13+ or MariaDB 10.2+.
Earlier versions do not support it.
Other DEFAULT expressions: For expressions not
listed in the table above, the converter applies the same
|| / + → CONCAT translations used
for GENERATED and COMPUTED columns, and detects EDB-only functions (with
warnings). If the expression is modified, it is wrapped in
() to comply with the MySQL/MariaDB expression-default
syntax. Column identifier substitution (" → `)
is not applied to DEFAULT expressions because a DEFAULT
cannot reference other columns in the same row.
EDB-specific functions are detected automatically in the following contexts: GENERATED columns, COMPUTED columns, CHECK constraint expressions, and DEFAULT passthrough expressions (those not matched by the explicit mapping table above).
When any of the functions listed below is found, the converter names
each one in a warning in the script and in the log. The expression
itself is still passed through (with || / + →
CONCAT translations applied where applicable), so the
converted script will not execute correctly until the flagged functions
are rewritten manually.
Use the table below as a reference when rewriting:
Scope by expression type: - GENERATED / COMPUTED / CHECK — identifier conversion (
"→`), line-break normalisation,||/+translation, and EDB-only detection. - DEFAULT passthrough — line-break normalisation,||/+translation, and EDB-only detection. Identifier conversion is not applied (DEFAULT cannot reference other columns).
| EDB function | MySQL / MariaDB equivalent |
|---|---|
OCCURS(s, sub) |
(LENGTH(s)-LENGTH(REPLACE(s,sub,'')))/LENGTH(sub) |
QUOTEDSTR(v) |
CONCAT('''',REPLACE(v,'''',''''''),'''') |
CURRENT_GUID() |
UUID() |
CURRENT_USER() |
CURRENT_USER() |
CURRENT_DATABASE() |
DATABASE() |
CURRENT_COMPUTER() |
No equivalent |
LASTIDENTITY() |
LAST_INSERT_ID() |
CURRENT_SESSIONID() |
CONNECTION_ID() |
RUNSUM(col) |
SUM() OVER (ORDER BY ...) — MySQL 8.0+ / MariaDB
10.2+ |
LIST(col, delim) |
GROUP_CONCAT(col SEPARATOR delim) |
Same treatment as GENERATED / COMPUTED, including
the identifier conversion: EDB double-quoted identifiers
("ColName") are converted to backticks before the
expression is processed. || is translated to
CONCAT() for MySQL (left as-is for MariaDB), +
between string operands is translated to CONCAT()
(heuristic), and EDB-only functions are detected and named in the
warnings. A generic “verify before running” warning is always emitted;
additional specific warnings are emitted when an ambiguous
+ or EDB-only functions are found.
Automatic, but verify manually. EDB stores only
NO ACTION in its Information Schema regardless of the
referential action originally defined. As a result, all FK
ON UPDATE and ON DELETE actions are emitted as
NO ACTION in the converted schema.
If the original design used CASCADE,
SET NULL, or RESTRICT, those actions are lost
and must be restored manually after conversion.
Automatic. CHAR, VARCHAR,
and CLOB collation is resolved via the collation map. A
COLLATE clause is emitted only when the resolved collation
differs from the table default.