File tree Expand file tree Collapse file tree
test/fixtures/dialects/mysql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ class ColumnDefinitionSegment(BaseSegment):
338338 ),
339339 Ref ("NumericLiteralSegment" ),
340340 Ref ("QuotedLiteralSegment" ),
341+ "NULL" ,
341342 ),
342343 optional = True ,
343344 ),
Original file line number Diff line number Diff line change @@ -20,5 +20,6 @@ CREATE TABLE `foo` (
2020 ts12 TIMESTAMP NULL DEFAULT ' 0000-00-00 00:00:00' ,
2121 ts13 TIMESTAMP NULL DEFAULT NOW ON UPDATE NOW,
2222 ts14 TIMESTAMP NULL DEFAULT NOW() ON UPDATE NOW(),
23- ts15 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
23+ ts15 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
24+ ts16 TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
2425)
Original file line number Diff line number Diff line change 33# computed by SQLFluff when running the tests. Please run
44# `python test/generate_parse_fixture_yml.py` to generate them after adding or
55# altering SQL files.
6- _hash : e9c33e67e5d27f30efd11d52a52f8df18d2b949a6a4585b07a9053b6d4e5f1a8
6+ _hash : 7d380062698a45e2def8a6ea2766b072296d0f462727a05fddfceddc50c2e735
77file :
88 statement :
99 create_table_statement :
@@ -137,9 +137,8 @@ file:
137137 - naked_identifier : ts8
138138 - keyword : TIMESTAMP
139139 - keyword : ' NULL'
140- - column_constraint_segment :
141- keyword : DEFAULT
142- null_literal : ' NULL'
140+ - keyword : DEFAULT
141+ - keyword : ' NULL'
143142 - comma : ' ,'
144143 - column_definition :
145144 - naked_identifier : ts9
@@ -208,4 +207,14 @@ file:
208207 - keyword : ' ON'
209208 - keyword : UPDATE
210209 - keyword : CURRENT_TIMESTAMP
210+ - comma : ' ,'
211+ - column_definition :
212+ - naked_identifier : ts16
213+ - keyword : TIMESTAMP
214+ - keyword : ' NULL'
215+ - keyword : DEFAULT
216+ - keyword : ' NULL'
217+ - keyword : ' ON'
218+ - keyword : UPDATE
219+ - keyword : CURRENT_TIMESTAMP
211220 - end_bracket : )
You can’t perform that action at this time.
0 commit comments