为 mysql 工作台迁移设置目标数据库版本 [英] setting the target database version for mysql workbench migration

查看:51
本文介绍了为 mysql 工作台迁移设置目标数据库版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行从 sql server 到 mariadb 10.0 的迁移,由于 create table 语句中的语法错误,生成的代码一直失败.

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.

特别是它不喜欢 create table 语句的 INDEX 行.它窒息的语句示例是

Specifcally it doesn't like the INDEX lines of the create table statements. And example of a statement it chokes on is

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

这是我得到的错误

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

如果我删除 visible 关键字,同样的命令会起作用,所以我认为这在较新版本的 mysql 上是有效的语法,但不是我的.有什么办法可以告诉mysql工作台排除它吗?

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. Is there any way I can tell mysql workbench to exclude it?

推荐答案

在顶部菜单中单击模型 > 模型选项

In the top menu click Model > Model Options

在弹出的对话框中,选择左侧的MySQL

In the dialogue that pops up, select MySQL on the left side

目标 MySQL 版本更改为 5.7

这篇关于为 mysql 工作台迁移设置目标数据库版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆