Arnaud Benhamdine
Arnaud Benhamdine
weird IIRC this message is supposed to happen when an unknowned sql type is found in the schema. But the message should display that type.
Good work ! `--exposeConstraintInfo` sounds ok to me. Concerning my comment https://github.com/SweetIQ/schemats/issues/77#issuecomment-353607137, if you plan to add comments and original sql types in output : on second thougth, I think...
> some types (at least in Postgres) are mapped internally to something else. For example, a column with a char type will be mapped to bpchar internally. The output would...
> I don't know if that's a big problem though. Maybe we should add it with those internal Postgres types now and then try fix the library to use more...
FWIW, to retrieve comments with information schema statements : ```sql SELECT obj_description(format('%s.%s',isc.table_schema,isc.table_name)::regclass::oid, 'pg_class') as table_description, pg_catalog.col_description(format('%s.%s',isc.table_schema,isc.table_name)::regclass::oid,isc.ordinal_position) as column_description FROM information_schema.columns isc ```
@vitaly-t Ah yes, you're right : actually, I was reading a SO question about this, and I paste immediatly the code without having read your first link... which turned out...
I was thinking : it would be a good thing to add in the comments the true datatype of the database column, as the ts types are far more limited,...
In the same way, : - it could be useful to have in the comments the default SQL value of the column, if it's different from null. - if there's...
Actually, I'm a big supporter of postgres, so it's perfect for me 😄
@jmealo do you intend to send PR for this ? If not, I can perhaps give it a try next week. Let me know if you have begun to tackle...