go-xorm / xorm

Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm
BSD 3-Clause "New" or "Revised" License
6.67k stars 757 forks source link

xorm reverse doesn't support postgresql inet type #1330

Open tossp opened 5 years ago

tossp commented 5 years ago

When I use xorm reverse tools to reverse my database tables, It occured that "[Error] reverse.go:160 Unknown colType: inet", not support postgresql inet?

-- Table: public.logs

-- DROP TABLE public.logs;

CREATE TABLE public.logs
(
    uid uuid NOT NULL DEFAULT uuid_generate_v4(),
    meta_data jsonb,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    deleted_at timestamp with time zone,
    created_user_uid uuid DEFAULT uuid_nil(),
    updated_user_uid uuid DEFAULT uuid_nil(),
    comment text COLLATE pg_catalog."default",
    ip inet,
    client_refer uuid,
    src_addr inet,
    CONSTRAINT logs_pkey PRIMARY KEY (uid)
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public.logs
    OWNER to tsl;
lunny commented 5 years ago

Currently not supported yet.