0

I understand you must be extremely busy with your new project, so I will just be brief.

​ I'm trying to convert my MySQL database to PostgreSQL using EnterpriseDB Migration Tool. My setup is as follows:

  • Windows 10 x64
  • MySQL 5.6.33
  • EDB PostgreSQL 10.12
  • EnterpriseDB Migration Toolkit 53.0.2
  1. I want change char type in Mysql to character varying to postgresql ddl;
  2. And some col in Mysql like userId to postgres, but expected "userId" in pg ddl;

Here is an example in mysql:

create table test
(
    testcol char(2),
    userId  varchar(32)
);

conver by Toolkit:

create table test
(
    testcol char(2),
    "userId" varchar(32)
);

I expect:

create table test
(
    testcol varchar(2),
    userid varchar(32)
);

​ I found command -customColTypeMapping in docs, but it perhaps not works in my scenario.

​ So, is there any solutions to resolve this problem. Thanks!

ysth
  • 96,171
  • 6
  • 121
  • 214
  • why do you expect 'userId' to change to 'userid'? customColTypeMapping lets you specify a regular expression for column names to change to a given type; it doesn't seem to let you change all of a particular type to another type – ysth Dec 15 '20 at 05:11
  • When i have "userId" in postgresql, some other problem occured.Like select this column or use mybatis to maaping database.So lower case is my expect – shaking Dec 15 '20 at 05:39
  • as shown in the conversion, you need to put mixed case column/table names in double quotes to use them. – ysth Dec 15 '20 at 06:36
  • @shaking Can you please share me a command used to migrate, i am facing issue while adding sourcetype in command – umeshkumar sohaliya Jun 24 '22 at 05:23

0 Answers0