vramework/schemats

Throws errors when encountering types that cannot be mapped (e.g. `tstzrange`) and does not generate output file

Closed this issue · 2 comments

When encountering a type that cannot be mapped the code throws a warning:

var warning = "Type [".concat(column.udtName, " has been mapped to [any] because no specific type has been found.");
if (config.throwOnMissingType) {
    throw new Error(warning);
}

I believe a warning should be brought to the users attention, but the code shouldn't throw and exit execution with no output file generated

I actually read through the codebase and there is an option: throwOnMissingType (duh!) that is by default set to true. But this option cannot be modified via command line.

Read further and there is a --no-throw-on-missing-type in the bin/schemats-postgres.