Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MYSQL] Text type columns with default value don't export properly #621

Open
shubham-yb opened this issue Nov 23, 2022 · 0 comments
Open
Assignees
Labels
dep-issue Issues with dependencies

Comments

@shubham-yb
Copy link
Contributor

If we have a default value for text type columns in MYSQL, it does not export properly and thus fails during import.

Sample source schema:

drop table if exists text_types;

CREATE TABLE text_types (
                                               id int, 
                                               tt TINYTEXT DEFAULT ('c'), 
                                               te TEXT DEFAULT ('abc'), 
                                               mt MEDIUMTEXT DEFAULT ('abc'), 
                                               lt LONGTEXT DEFAULT ('abc')
                                              );

insert into text_types(id) values(1);

desc text_types;

Exported schema:

CREATE TABLE text_types (
        id numeric(10),
        tt text DEFAULT _utf8mb4\'c\',
        te text DEFAULT _utf8mb4\'abc\',
        mt text DEFAULT _utf8mb4\'abc\',
        lt text DEFAULT _utf8mb4\'abc\'
) ;

Corresponding error:

Image

@shubham-yb shubham-yb self-assigned this Nov 23, 2022
@shubham-yb shubham-yb added the dep-issue Issues with dependencies label Nov 23, 2022
@github-actions github-actions bot added the triage Needs to be triaged label Nov 23, 2022
@shubham-yb shubham-yb removed the triage Needs to be triaged label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dep-issue Issues with dependencies
Projects
None yet
Development

No branches or pull requests

1 participant