pg2mysql icon indicating copy to clipboard operation
pg2mysql copied to clipboard

fields named serial are incorrectly converted

Open johanek opened this issue 11 months ago • 0 comments

Likely field name serial is being treated as if it's a serial type https://github.com/dolthub/pg2mysql/blob/main/pg2mysql.pl#L167

$ cat test.pgsql
CREATE TABLE public.dcim_device (
    id uuid NOT NULL,
    created date,
    serial character varying(255) NOT NULL,
);

$ perl pg2mysql.pl < test.pgsql
--
-- Generated by pg2mysql
--
set foreign_key_checks = off;
--
DROP DATABASE IF EXISTS public;
CREATE DATABASE public;
CREATE TABLE public.dcim_device (
    `id` varchar(36) NOT NULL,
    `created` date,
    `integer` auto_increment varchar(255) NOT NULL,
);

johanek avatar Aug 30 '23 10:08 johanek