dolthub / dolthub/pg2mysql

fields named serial are incorrectly converted

Open
#50 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
54
Forks
12
PR merge metrics
No merged PRs in 30d

Description

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,
);
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect pg2mysql.pl around line 167, then run the provided test.pgsql input through `perl pg2mysql.pl`. Confirm that a field named serial remains named `serial` with its declared varchar type, rather than becoming an auto-increment integer, and add or update coverage if the repository provides tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, perl, postgresql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.