Attempting to use the generate executable on a simple postgres database.
sqlingo-gen-postgres postgresql://postgres:password@localhost:5432/dbname?sslmode=disable > ./internal/gen_models.go
gives:
Generating code for tables...
panic: unknown field type USER-DEFINED
goroutine 1 [running]:
main.main()
/Users/person/go/pkg/mod/github.com/lqs/sqlingo@v0.13.1/sqlingo-gen-postgres/main.go:12 +0x90
The database schema:
CREATE TYPE COLORS AS ENUM('red', 'green', 'blue');
CREATE TABLE accounts (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
email VARCHAR(50) UNIQUE NOT NULL,
active BOOLEAN NOT NULL,
fav_color COLORS,
fav_numbers INTEGER[],
properties JSONB,
created_at TIMESTAMP WITH TIME ZONE NOT NULL
);
Attempting to use the generate executable on a simple postgres database.
sqlingo-gen-postgres postgresql://postgres:password@localhost:5432/dbname?sslmode=disable > ./internal/gen_models.go
gives:The database schema: