help_en: 'convert the conceptual model into a physical model for MySQL'
help_fr: 'convertit le modèle conceptuel en un modèle physique pour MySQL'
help_zh: '将概念模型转换为 MySQL 物理模型'
fr_examples:
  - order: 1
    example: 'mysql'
    explanation: 'version de base'
  - order: 4
    example: 'mysql:b'
    explanation: 'avec _boilerplate_'
parent: 'sql'
stem_suffix: '_ddl_mysql'
transform_label:
  - order: 1100
    comment: 'Protect reserved keywords'
    search: '(?i)^(ACCESS|ALLOCATE|ANALYSE|ANY|ARE|ARRAY|ASSERTION|ASYMMETRIC|AT|AUDIT|AUTHORIZATION|AUTOINCREMENT|AVG|BACKUP|BEGIN|BIT|BOOLEAN|BREAK|BROWSE|BULK|CASCADED|CAST|CHARACTER_LENGTH|CHECKPOINT|CLOSE|CLUSTER|CLUSTERED|COALESCE|COLLATION|COMMENT|COMMIT|COMPRESS|COMPUTE|CONCAT|CONCURRENTLY|CONNECT|CONNECTION|CONSTRAINTS|CONTAINS|CONTAINSTABLE|CORRESPONDING|COUNT|CURRENT|CURRENT_CATALOG|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|DATE|DAY|DAYS|DBCC|DEALLOCATE|DEFERRABLE|DEFERRED|DEFINE|DEFINER|DENY|DIAGNOSTICS|DISCONNECT|DISTRIBUTED|DO|END|ENUM|ERRLVL|ESCAPE|EXCEPTION|EXCLUDE|EXCLUSIVE|EXEC|EXECUTE|EXTERNAL|EXTRACT|FILE|FILLFACTOR|FILTER|FIRST|FOLLOWING|FOUND|FREETEXT|FREETEXTTABLE|FREEZE|FULL|GLOB|GLOBAL|GO|GOTO|HASH|HOLDLOCK|HOUR|HOURS|IDENTIFIED|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|ILIKE|IMMEDIATE|INCREMENT|INDEXED|INDICATOR|INITIAL|INITIALLY|INPUT|INVOKER|ISNULL|ISOLATION|JSON_ARRAYAGG|JSON_EXISTS|JSON_OBJECTAGG|LAST|LEVEL|LINENO|LOWER|LTRIM|MAX|MAXEXTENTS|MEMBER|MERGE|MICROSECOND|MICROSECONDS|MIN|MINUS|MINUTE|MINUTES|MLSLABEL|MODE|MODIFY|MONTH|MONTHS|NATIONAL|NCHAR|NEW|NEXT|NO|NOAUDIT|NOCHECK|NOCOMPRESS|NONCLUSTERED|NONE|NOTHING|NOTNULL|NOWAIT|NULLIF|NULLS|NUMBER|NVARCHAR|OFF|OFFLINE|OFFSET|OFFSETS|ONLINE|ONLY|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OUTPUT|OVERLAPS|PAD|PARTIAL|PCTFREE|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PIVOT|PLACING|PLAN|PORTION|POSITION|PRECEDING|PREPARE|PRESERVE|PRINT|PRIOR|PRIVILEGES|PROC|PUBLIC|RAISE|RAISERROR|RAW|READTEXT|RECONFIGURE|RELATIVE|REPLICATION|RESOURCE|RESPECT|RESTORE|RETURNING|REVERT|ROLLBACK|ROLLUP|ROWCOUNT|ROWGUIDCOL|ROWID|ROWNUM|RTRIM|RULE|SAVE|SCROLL|SECOND|SECONDS|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SESSION|SESSION_USER|SETUSER|SHARE|SHUTDOWN|SIMILAR|SIZE|SOME|SOUNDS|SPACE|SQLCODE|SQLERROR|SQLID|SQL_BUFFER_RESULT|SQL_CACHE|SQL_NO_CACHE|START|STATISTICS|STATS_AUTO_RECALC|STATS_PERSISTENT|STATS_SAMPLE_PAGES|STDDEV_POP|STDDEV_SAMP|SUBSTRING|SUCCESSFUL|SUM|SYMMETRIC|SYNONYM|SYSDATE|SYSTEM_USER|TABLESAMPLE|TEMPORARY|TEXTSIZE|TIMEZONE_HOUR|TIMEZONE_MINUTE|TOP|TRAN|TRANSACTION|TRANSLATE|TRANSLATION|TREAT|TRIM|TRUNCATE|TRY_CONVERT|TSEQUAL|UESCAPE|UID|UNBOUNDED|UNKNOWN|UNNEST|UNPIVOT|UPDATETEXT|UPPER|USER|VALIDATE|VALUE|VARCHAR2|VARIADIC|VAR_POP|VAR_SAMP|VERBOSE|VIEW|WAITFOR|WHENEVER|WITHIN|WITHOUT|WORK|WRITETEXT|XML|XMLCAST|XMLEXISTS|XMLFOREST|XMLPARSE|XMLQUERY|XMLROOT|XMLSERIALIZE|YEAR|YEARS)$'
    replace: '`\1`'
transform_relation_name:
  - order: 1000
    comment: 'Protect reserved keywords'
    search: '(?i)^(ACCESS|ALLOCATE|ANALYSE|ANY|ARE|ARRAY|ASSERTION|ASYMMETRIC|AT|AUDIT|AUTHORIZATION|AUTOINCREMENT|AVG|BACKUP|BEGIN|BIT|BOOLEAN|BREAK|BROWSE|BULK|CASCADED|CAST|CHARACTER_LENGTH|CHECKPOINT|CLOSE|CLUSTER|CLUSTERED|COALESCE|COLLATION|COMMENT|COMMIT|COMPRESS|COMPUTE|CONCAT|CONCURRENTLY|CONNECT|CONNECTION|CONSTRAINTS|CONTAINS|CONTAINSTABLE|CORRESPONDING|COUNT|CURRENT|CURRENT_CATALOG|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|DATE|DAY|DAYS|DBCC|DEALLOCATE|DEFERRABLE|DEFERRED|DEFINE|DEFINER|DENY|DIAGNOSTICS|DISCONNECT|DISTRIBUTED|DO|END|ENUM|ERRLVL|ESCAPE|EXCEPTION|EXCLUDE|EXCLUSIVE|EXEC|EXECUTE|EXTERNAL|EXTRACT|FILE|FILLFACTOR|FILTER|FIRST|FOLLOWING|FOUND|FREETEXT|FREETEXTTABLE|FREEZE|FULL|GLOB|GLOBAL|GO|GOTO|HASH|HOLDLOCK|HOUR|HOURS|IDENTIFIED|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|ILIKE|IMMEDIATE|INCREMENT|INDEXED|INDICATOR|INITIAL|INITIALLY|INPUT|INVOKER|ISNULL|ISOLATION|JSON_ARRAYAGG|JSON_EXISTS|JSON_OBJECTAGG|LAST|LEVEL|LINENO|LOWER|LTRIM|MAX|MAXEXTENTS|MEMBER|MERGE|MICROSECOND|MICROSECONDS|MIN|MINUS|MINUTE|MINUTES|MLSLABEL|MODE|MODIFY|MONTH|MONTHS|NATIONAL|NCHAR|NEW|NEXT|NO|NOAUDIT|NOCHECK|NOCOMPRESS|NONCLUSTERED|NONE|NOTHING|NOTNULL|NOWAIT|NULLIF|NULLS|NUMBER|NVARCHAR|OFF|OFFLINE|OFFSET|OFFSETS|ONLINE|ONLY|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OUTPUT|OVERLAPS|PAD|PARTIAL|PCTFREE|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PIVOT|PLACING|PLAN|PORTION|POSITION|PRECEDING|PREPARE|PRESERVE|PRINT|PRIOR|PRIVILEGES|PROC|PUBLIC|RAISE|RAISERROR|RAW|READTEXT|RECONFIGURE|RELATIVE|REPLICATION|RESOURCE|RESPECT|RESTORE|RETURNING|REVERT|ROLLBACK|ROLLUP|ROWCOUNT|ROWGUIDCOL|ROWID|ROWNUM|RTRIM|RULE|SAVE|SCROLL|SECOND|SECONDS|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SESSION|SESSION_USER|SETUSER|SHARE|SHUTDOWN|SIMILAR|SIZE|SOME|SOUNDS|SPACE|SQLCODE|SQLERROR|SQLID|SQL_BUFFER_RESULT|SQL_CACHE|SQL_NO_CACHE|START|STATISTICS|STATS_AUTO_RECALC|STATS_PERSISTENT|STATS_SAMPLE_PAGES|STDDEV_POP|STDDEV_SAMP|SUBSTRING|SUCCESSFUL|SUM|SYMMETRIC|SYNONYM|SYSDATE|SYSTEM_USER|TABLESAMPLE|TEMPORARY|TEXTSIZE|TIMEZONE_HOUR|TIMEZONE_MINUTE|TOP|TRAN|TRANSACTION|TRANSLATE|TRANSLATION|TREAT|TRIM|TRUNCATE|TRY_CONVERT|TSEQUAL|UESCAPE|UID|UNBOUNDED|UNKNOWN|UNNEST|UNPIVOT|UPDATETEXT|UPPER|USER|VALIDATE|VALUE|VARCHAR2|VARIADIC|VAR_POP|VAR_SAMP|VERBOSE|VIEW|WAITFOR|WHENEVER|WITHIN|WITHOUT|WORK|WRITETEXT|XML|XMLCAST|XMLEXISTS|XMLFOREST|XMLPARSE|XMLQUERY|XMLROOT|XMLSERIALIZE|YEAR|YEARS)$'
    replace: '`\1`'
transform_datatype:
  - order: 300
    comment: '(Meant to replace the parent''s transformation)'
    search: 'UNSIGNED_INT_PLACEHOLDER'
    replace: 'TINYINT UNSIGNED'
