I want to convert a MySQL database to PostgreSQL.
In MySQL, ENUM data type allows by default empty fields, which seems not to work with PostgreSQL. Therefore, I can't cast from VARCHAR to ENUM with PostgreSQL because I have a lot of empty fields in my database that PgSQL does not allow.
What may I do ? Allow NULL and set empty fields to NULL ? Add an empty value in PostgreSQL's ENUM when creating the type (something like ENUM('A','B','C','')) ? Stop using this ugly and incongruous ENUM data type (and use a constraint on varchar instead or another table and a foreign key) ?
Thank you :)
user1527491