Skip to content

Commit

Permalink
Merge #43087
Browse files Browse the repository at this point in the history
43087: docs: include the optional validation syntax to add-constraint diagram r=RaduBerinde a=RaduBerinde

Release note: None

Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
  • Loading branch information
craig[bot] and RaduBerinde committed Dec 11, 2019
2 parents 632cfa3 + 0d1d2a0 commit 6f5de7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/generated/sql/bnf/add_constraint.bnf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
alter_onetable_stmt ::=
'ALTER' 'TABLE' table_name 'ADD' 'CONSTRAINT' constraint_name constraint_elem
| 'ALTER' 'TABLE' 'IF' 'EXISTS' table_name 'ADD' 'CONSTRAINT' constraint_name constraint_elem
'ALTER' 'TABLE' table_name 'ADD' 'CONSTRAINT' constraint_name constraint_elem opt_validate_behavior
| 'ALTER' 'TABLE' 'IF' 'EXISTS' table_name 'ADD' 'CONSTRAINT' constraint_name constraint_elem opt_validate_behavior
2 changes: 1 addition & 1 deletion pkg/cmd/docgen/diagrams.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ var specs = []stmtSpec{
{
name: "add_constraint",
stmt: "alter_onetable_stmt",
replace: map[string]string{"relation_expr": "table_name", "alter_table_cmds": "'ADD' 'CONSTRAINT' constraint_name constraint_elem"},
replace: map[string]string{"relation_expr": "table_name", "alter_table_cmds": "'ADD' 'CONSTRAINT' constraint_name constraint_elem opt_validate_behavior"},
unlink: []string{"table_name"},
},
{
Expand Down

0 comments on commit 6f5de7b

Please sign in to comment.