sql-lint
sql-lint copied to clipboard
ALTER TYPE for postgres should be valid
An error was raised when encountered ALTER TYPE ..... statement running sql-lint through megalinter
Steps to reproduce
- create some
.sqlfile withALTER TYPE foo RENAME TO bar; - run megaliter with this option
SQL_SQL_LINT_ARGUMENTS: -d postgres
Output
[sql-lint: postgres-invalid-alter-option] Option 'type' is not a valid option, must be one of '["column","online","offline","ignore","database","event","function","procedure","server","table","tablespace","view"]'.
In my case, the --ignore-errors=postgres-invalid-alter-option flag was added as a workaround.
Expected Bahavior
No error from linter. ALTER TYPE ... should be valid. https://www.postgresql.org/docs/current/sql-altertype.html