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

unsupported type TypeJSON #5

Open
zzerjae opened this issue Oct 26, 2021 · 3 comments
Open

unsupported type TypeJSON #5

zzerjae opened this issue Oct 26, 2021 · 3 comments

Comments

@zzerjae
Copy link

zzerjae commented Oct 26, 2021

Hello, Thanks for creating this tool.

For team with DBA, these tool seems to be of great help.

I have the following schema and I'm running into a problem.

create table outbox
(
    id             bigint auto_increment
        primary key,
    aggregate_type varchar(255) not null,
    aggregate_id   varchar(255) not null,
    type           varchar(255) not null,
    payload        json         not null
);

when I tried

go run ariga.io/entimport/cmd/entimport -dialect mysql -dsn "root:root@tcp(localhost:3306)/db"

exit status 1 with

2021/10/26 10:46:12 entimport: schema writing failed - schemast: unsupported type TypeJSON

Am I using it wrong? Or is it a bug?

Mysql: mysql 8
go: 1.17.0
entimport: v0.0.0-20211024085919-20c40b8b2009

@zeevmoney
Copy link
Contributor

zeevmoney commented Oct 26, 2021

Hi @zzerjae 👋🏻
Thanks for reaching out.

Your usage is correct, the error message is related to the fact that I didn't implement all field types yet (JSON in your case).
entimport is missing some field types, because of the underlying schemaast package.

I have plans to add the rest of the field types in the recent future, but please feel free to ping me on ent Slack channel if you'd like to contribute.

@zzerjae
Copy link
Author

zzerjae commented Oct 26, 2021

Thanks for the quick and kind feedback, @zeevmoney !

I'll consider whether I can contribute. Thank you.

@till
Copy link

till commented Jun 7, 2022

Is this a similar "error", or well, unsupported field type? (type postgres, field is a varchar)

2022/06/07 14:51:06 entimport: schema import failed - entimport: unsupported type &{<nil> "varchar[]"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants