Open jin-yuzhe opened 1 year ago
hei guys, have you found a way?
anyone have solution here??
I'm gonna take a look at this if nobody minds, @jin-yuzhe could you provide more details about the issue so I can replicate it?
@AndrewAlizaga, this feature would be nice to have.
Here's how to replicate this issue:
Using Postgres (I'm running Postgres 12), install the extension uuid-ossp.
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
Then, create a table using the extension:
CREATE TABLE table_1(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
email varchar(255) NULL,
created_at timestamp DEFAULT CURRENT_TIMESTAMP
);
Generate the model:
goctl model pg datasource -url="postgres://postgres:postgres@localhost:5432/testdb?connect_timeout=180&sslmode=disable" --schema="public" -style go_zero -table="test_1" -d ./internal/models
Produces the following:
Error: unsupported database type: uuid
Using goctl --version goctl version 1.5.3 darwin/arm64
@localrivet on it
Bot detected the issue body's language is not English, translate it automatically. π―ππ»π§βπ€βπ§π«π§πΏβπ€βπ§π»π©πΎβπ€βπ¨πΏπ¬πΏ
@localrivet on it
I believe the uuid data type is quite popular with Postgres. Please consider providing support for it soon. I apologize for mentioning and bothering you @kevwan. Thank you.
I encountered an error while using goctl to generate a PostgreSQL model. The error message states "unsupported database type: uuid." I am currently using goctl version 1.5.2. I kindly request support for this data type. Thank you very much.