Skip to content

MYSQL TO POSTGRES comment not work? #66

@zfha

Description

@zfha

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions