goctl generate model with postgresql engine unsupported enum data type.
So what should we do temporarily ?
"status" "oauth"."user_status" DEFAULT 'normal'::oauth.user_status, CREATE INDEX "users_status_k" ON "oauth"."users" USING btree ( "status" "pg_catalog"."enum_ops" ASC NULLS LAST );
Can you please provide a specific data type or table definition?
Hi there @kesonan ! I had the same issue. And I can provide an example of this. goctl command usage is below:
goctl model pg datasource -url="postgres://user:[email protected]:5454/database?sslmode=disable" --schema="public" -style go_zero --table="videos" --dir ./models
Video table definition:
create table videos
(
id bigserial
primary key,
title varchar(255) not null,
description text default ''::text not null,
thumbnails jsonb default '{}'::jsonb not null,
duration bigint,
process_type video_process_type_enum,
process_status video_process_status_enum default 'pending'::video_process_status_enum,
process_exception varchar(255) default ''::character varying,
created_at timestamp(0) default now() not null,
deleted_at timestamp(0),
access_type content_access_type_enum default 'opened'::content_access_type_enum
);
Custom enum type definition:
CREATE TYPE video_process_type_enum AS ENUM ('download', 'transcode', 'upload');
Error message:
unsupported database type: video_process_type_enum
goctl command doesn't recognize custom enum types of database. how can i resolve this issue for datasource model generation ?
Thanks in advance.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.