NetPad icon indicating copy to clipboard operation
NetPad copied to clipboard

PostgreSQL columns with custom enum types are not being derived.

Open antonklimov opened this issue 1 year ago • 3 comments

The columns which have enum type in Postgres like CREATE TYPE t1 as ENUM ('V1', 'V2') do not appear in the generated schemas.

antonklimov avatar Sep 27 '23 17:09 antonklimov

@antonklimov can you please provide a SQL script to reproduce the issue?

tareqimbasher avatar Oct 28 '23 23:10 tareqimbasher

@tareqimbasher

CREATE TYPE t1 as ENUM ('V1', 'V2');
CREATE TABLE test1 (
    id int,
    enum_column t1

);
INSERT INTO test1 values (1, 'V1');
SELECT * FROM test1;
image

antonklimov avatar Nov 03 '23 15:11 antonklimov

Update: It looks like EF Core's scaffolding tool skips ENUM type columns and does not generate CLR properties for them. Since NetPad uses the same EF Core tooling to scaffold your database, it will have the same limitations. I will keep this ticket open however as I believe we could still find a solution around this.

tareqimbasher avatar Nov 15 '23 23:11 tareqimbasher