Page 1 of 1

I don't see a field of enum type for pgsql

Posted: Tue Mar 28, 2023 12:59 pm
by btrade

Hello

I have a Table.

CREATE TYPE day_of_week_enum AS ENUM ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun');

CREATE TABLE work_schedule (
    id SERIAL PRIMARY KEY,
    accounts_id INT8 NOT NULL,
    stores_id INT8 NOT NULL,
    day_of_week day_of_week_enum NOT NULL,
    open_time TIME NOT NULL,
    close_time TIME NOT NULL,
    lunch_start_time TIME,
    lunch_end_time TIME,
    FOREIGN KEY (stores_id) REFERENCES stores(id)
);

In phpmaker I don't see a field of Enum type.

How can I do it?


Re: I don't see a field of enum type for pgsql

Posted: Tue Mar 28, 2023 2:16 pm
by arbei

I don't think it is supported by PHPMaker yet, since unlike MySQL, enum types are created by CREATE TYPE command.


Re: I don't see a field of enum type for pgsql

Posted: Tue Mar 28, 2023 6:45 pm
by btrade

I understood you.
I created an additional table for list .