Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MYSQL TO POSTGRES comment not work? #66

Open
zfha opened this issue Jul 16, 2024 · 0 comments
Open

MYSQL TO POSTGRES comment not work? #66

zfha opened this issue Jul 16, 2024 · 0 comments

Comments

@zfha
Copy link

zfha commented Jul 16, 2024

MYSQL DDL convert to postgres, comment convert error ?
original mysql ddl:

CREATE TABLE `sys_perm` (
  `id` varchar(50) NOT NULL,
  `name` varchar(100) NOT NULL,
  `code` varchar(50) NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0-系统 1-产品',
  `client` varchar(10) NOT NULL COMMENT '运营端-op,租户端-tenant,全部-all',
  `product_id` varchar(50) DEFAULT NULL,
  `product_code` varchar(50) DEFAULT NULL,
  `audit` tinyint(4) NOT NULL DEFAULT '1' COMMENT '0-不需要审计 1-需要审计',
  `auth` tinyint(4) NOT NULL DEFAULT 1,
  `kind` varchar(10) NOT NULL COMMENT '读,写',
  `center` varchar(50) DEFAULT NULL,
  `module` varchar(50) NOT NULL,
  `mode` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1-Api, 2-Function, 3-Other',
  `action` varchar(200) NOT NULL,
  `opt_user_id` varchar(50) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `index` (`product_id`,`product_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

postgres sql:

CREATE TABLE sys_perm (
  id varchar(50) NOT NULL,
  name varchar(100) NOT NULL,
  code varchar(50) NOT NULL,
  type smallint NOT NULL DEFAULT '0' COMMENT '0-系统 1-产品',
  client varchar(10) NOT NULL COMMENT '运营端-op,租户端-tenant,全部-all',
  product_id varchar(50) DEFAULT NULL,
  product_code varchar(50) DEFAULT NULL,
  audit smallint NOT NULL DEFAULT '1' COMMENT '0-不需要审计 1-需要审计',
  auth smallint NOT NULL DEFAULT 1,
  kind varchar(10) NOT NULL COMMENT '读,写',
  center varchar(50) DEFAULT NULL,
  module varchar(50) NOT NULL,
  mode smallint NOT NULL DEFAULT '0' COMMENT '1-Api, 2-Function, 3-Other',
  action varchar(200) NOT NULL,
  opt_user_id varchar(50) DEFAULT NULL,
  created_at timestamp(0) NOT NULL,
  updated_at timestamp(0) NOT NULL,
  PRIMARY KEY (id)
) ;

but run postgresql, error is:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant