Quantcast
Channel: MySQL Forums - MySQL Workbench - Database Migration
Viewing all articles
Browse latest Browse all 561

Extend MySQL Workbench to handle PostgreSQL sequences (no replies)

$
0
0
Background:

Using MySQL Workbench 6.3 Migration Wizard for a PostgreSQL 9.6 to MySQL 5.6 migration:

Psql DDL:

CREATE SEQUENCE public."AO_seq";

ALTER SEQUENCE public."AO_seq"
OWNER TO dbuser;

CREATE TABLE public."AO"
(
"ID" integer NOT NULL DEFAULT nextval('"AO_seq"'::regclass)
CONSTRAINT "AO_pkey" PRIMARY KEY ("ID")
)
WITH (
OIDS = FALSE
)
TABLESPACE pg_default;

Problem:
MySQL Workbench migration wizard issued thousands of warnings like the following: "Warning Default value nextval('"AO_seq"' is not supported. Removed!" The wizard produced script has the following DDL

CREATE TABLE IF NOT EXISTS 'jdb'.'AO' (
'ID' INT NOT NULL,
PRIMARY KEY ('ID')
)


Question: Is there a better solution than the following:

Extend the migration tool per "Appendix C Extending Workbench" section in the reference manual for mySQL Workbench.

Superficially modify the following script: mysql-workbench-community-8.0.12-src\modules\db.postgresql to produce DDL like the following:
CREATE TABLE 'AO' (
'ID' bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY ('ID')
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

Viewing all articles
Browse latest Browse all 561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>