Search before asking
What Happened
When running sqlfluff on the following alter statement:
ALTER TABLE tsADD COLUMNmodified_at timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP;
I get the following error:
Found unparsable section: 'ON UPDATE CURRENT_TIMESTAMP'
Expected Behaviour
Parser should correctly parse the statement.
Observed Behaviour
Parsing fails.
How to reproduce
Run:
sqlfluff lint -d mysql update.sql
Where update.sql contains:
ALTER TABLE tsADD COLUMNmodified_at timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP;
Dialect
MySQL
Version
sqlfluff, version 3.0.3
Configuration
[sqlfluff]
dialect = tsql
max_line_length = 120
large_file_skip_byte_limit = 0
rules = ambiguous.join,
aliasing.table,
layout.select_modifiers,
capitalisation.keywords,
capitalisation.functions,
ics
[sqlfluff:indentation]
indent_unit = tab
indented_then = False
indented_then_contents = False
indented_joins = True
[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = lower
[sqlfluff:rules:capitalisation.functions]
capitalisation_policy = lower
[sqlfluff:layout:type:comma]
spacing_after = any
line_position = any
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
Search before asking
What Happened
When running sqlfluff on the following alter statement:
ALTER TABLEtsADD COLUMNmodified_attimestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP;I get the following error:
Found unparsable section: 'ON UPDATE CURRENT_TIMESTAMP'Expected Behaviour
Parser should correctly parse the statement.
Observed Behaviour
Parsing fails.
How to reproduce
Run:
sqlfluff lint -d mysql update.sqlWhere update.sql contains:
ALTER TABLEtsADD COLUMNmodified_attimestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP;Dialect
MySQL
Version
sqlfluff, version 3.0.3
Configuration
[sqlfluff]
dialect = tsql
max_line_length = 120
large_file_skip_byte_limit = 0
rules = ambiguous.join,
aliasing.table,
layout.select_modifiers,
capitalisation.keywords,
capitalisation.functions,
ics
[sqlfluff:indentation]
indent_unit = tab
indented_then = False
indented_then_contents = False
indented_joins = True
[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = lower
[sqlfluff:rules:capitalisation.functions]
capitalisation_policy = lower
[sqlfluff:layout:type:comma]
spacing_after = any
line_position = any
Are you willing to work on and submit a PR to address the issue?
Code of Conduct