Repository: DerekStride/tree-sitter-sql (language: python)

Issue:
UNIQUE constraint not parsed correctly
I believe the following should be valid sql, but as you can see it isn't correctly parsed:
```sql
CREATE TABLE test (
    name TEXT UNIQUE
);
```
```(program ; [0, 0] - [3, 0]
  (statement ; [0, 0] - [2, 1]
    (create_table ; [0, 0] - [2, 1]
      (keyword_create) ; [0, 0] - [0, 6]
      (keyword_table) ; [0, 7] - [0, 12]
      (object_reference ; [0, 13] - [0, 17]
        name: (identifier)) ; [0, 13] - [0, 17]
      (column_definitions ; [0, 18] - [2, 1]
        (column_definition ; [1, 4] - [1, 13]
          name: (identifier) ; [1, 4] - [1, 8]
          type: (keyword_text)) ; [1, 9] - [1, 13]
        (ERROR))))) ; [1, 14] - [1, 20]
```
UNIQUE constraint not parsed correctly
I believe the following should be valid sql, but as you can see it isn't correctly parsed:
```sql
CREATE TABLE test (
    name TEXT UNIQUE
);
```
```(program ; [0, 0] - [3, 0]
  (statement ; [0, 0] - [2, 1]
    (create_table ; [0, 0] - [2, 1]
      (keyword_create) ; [0, 0] - [0, 6]
      (keyword_table) ; [0, 7] - [0, 12]
      (object_reference ; [0, 13] - [0, 17]
        name: (identifier)) ; [0, 13] - [0, 17]
      (column_definitions ; [0, 18] - [2, 1]
        (column_definition ; [1, 4] - [1, 13]
          name: (identifier) ; [1, 4] - [1, 8]
          type: (keyword_text)) ; [1, 9] - [1, 13]
        (ERROR))))) ; [1, 14] - [1, 20]
```


Discussion / hints:

Fix patch:
diff --git a/grammar.js b/grammar.js
index 46014146..98eef00f 100644
--- a/grammar.js
+++ b/grammar.js
@@ -2553,7 +2553,8 @@ module.exports = grammar({
       choice(
         $.keyword_stored,
         $.keyword_virtual,
-      )
+      ),
+      $.keyword_unique
     )),
 
     _check_constraint: $ => seq(


Test patch:
diff --git a/test/corpus/create.txt b/test/corpus/create.txt
index 2e66be84..3717b38d 100644
--- a/test/corpus/create.txt
+++ b/test/corpus/create.txt
@@ -30,7 +30,8 @@ Create table multiple columns
 
 CREATE TABLE my_table (
   id BIGINT NOT NULL PRIMARY KEY,
-  date DATE DEFAULT NULL ASC
+  date DATE DEFAULT NULL ASC,
+  date2 DATE DEFAULT NULL UNIQUE ASC
 );
 
 --------------------------------------------------------------------------------
@@ -57,6 +58,15 @@ CREATE TABLE my_table (
           (keyword_default)
           (literal
             (keyword_null))
+          (direction
+            (keyword_asc)))
+        (column_definition
+          name: (identifier)
+          type: (keyword_date)
+          (keyword_default)
+          (literal
+            (keyword_null))
+          (keyword_unique)
           (direction
             (keyword_asc)))))))