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

sea-orm-cli generate --expanded-format panic when postgres table contains enum type #614

Closed
pymongo opened this issue Mar 16, 2022 · 4 comments · Fixed by #624
Closed

sea-orm-cli generate --expanded-format panic when postgres table contains enum type #614

pymongo opened this issue Mar 16, 2022 · 4 comments · Fixed by #624
Assignees

Comments

@pymongo
Copy link

pymongo commented Mar 16, 2022

Description

2022-03-15T08:45:09.769986Z DEBUG sea_schema::postgres::discovery: PrimaryKey(PrimaryKey { name: "meal_price_pkey", columns: ["id"] })    
thread 'main' panicked at 'not implemented', /home/w/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/sea-orm-codegen-0.6.0/src/entity/column.rs:120:18

Steps to Reproduce

  1. postgres table with enum type field create type status as enum('ok', 'error');
  2. sea-orm-cli generate --expanded-format

Expected Behavior

no panic

Actual Behavior

thread 'main' panicked at 'not implemented'

Reproduces How Often

always

Versions

sea-orm-cli 0.6.0

postgres version 13.6

Additional Information

@billy1624
Copy link
Member

Hey @pymongo, thank for the report! Nice catch! Please try #624

@alexander-cingolani
Copy link

I've been experiencing this issue as well, using sea-orm-cli v0.11.2 and postgres 15.2.. Tried installing past versions, but either they didn't compile (versions < 0.9) or they just showed the same error.

@billy1624
Copy link
Member

Hey @alexander-cingolani, could you please submit a new issues with a detailed error report?

@alexander-cingolani
Copy link

Sorry, my bad.. after looking into the issue further it turns out it was entirely my fault. (I wasn't running the tool in the correct directory.. 😬) I also found out that the panic was caused by an interval, not an enum as I first thought.

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

Successfully merging a pull request may close this issue.

3 participants