简体   繁体   English

为 mysql 工作台迁移设置目标数据库版本

[英]setting the target database version for mysql workbench migration

I am running a migration from sql server to mariadb 10.0 and the generated code keeps failing due to a syntax error in the create table statements.我正在运行从 sql server 到 mariadb 10.0 的迁移,由于 create table 语句中的语法错误,生成的代码一直失败。

Specifcally it doesn't like the INDEX lines of the create table statements.特别是它不喜欢 create table 语句的INDEX行。 And example of a statement it chokes on is它窒息的声明的例子是

CREATE TABLE t1 (
  `fk_manager` varchar(255),
  INDEX `imgr` (`fk_manager` ASC) visible
);

This is the error I get这是我得到的错误

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'INDEX 
`imgr` (`fk_manager` ASC) visible)' 
at line 3

If i remove the visible keyword the same command works, so I assume this is syntax valid on newer versions of mysql but not mine.如果我删除了visible关键字,同样的命令会起作用,所以我认为这在较新版本的 mysql 上是有效的语法,但不是我的。 Is there any way I can tell mysql workbench to exclude it?有什么办法可以告诉 mysql workbench 排除它吗?

In the top menu click Model > Model Options在顶部菜单中单击模型 > 模型选项

In the dialogue that pops up, select MySQL on the left side在弹出的对话框中,选择左侧的MySQL

Change Target MySQL Version to 5.7Target MySQL Version更改为 5.7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM