Skip to content

Commit cb645fa

Browse files
committed
refactor: update pg definition
1 parent b8152d6 commit cb645fa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ast/postgresql.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,16 @@ export type create_table_definition = create_definition[];
234234

235235
export type create_definition = create_column_definition | create_index_definition | create_fulltext_spatial_index_definition | create_constraint_definition;
236236

237-
export type column_definition_opt = column_constraint | { auto_increment: 'auto_increment'; } | { unique_or_primary: 'unique' | 'primary key'; } | { comment: keyword_comment; } | { collate: collate_expr; } | { column_format: column_format; } | { storage: storage } | { reference_definition: reference_definition; } | { character_set: collate_expr };
237+
export type column_definition_opt = column_constraint | { auto_increment: 'auto_increment'; } | { unique: 'unique' | 'unique key'; } | { unique: 'key' | 'primary key'; } | { comment: keyword_comment; } | { collate: collate_expr; } | { column_format: column_format; } | { storage: storage } | { reference_definition: reference_definition; } | { character_set: collate_expr };
238238

239239

240240

241241
export type column_definition_opt_list = {
242242
nullable?: column_constraint['nullable'];
243243
default_val?: column_constraint['default_val'];
244244
auto_increment?: 'auto_increment';
245-
unique_or_primary?: 'unique' | 'primary key';
245+
unique?: 'unique' | 'unique key';
246+
primary?: 'key' | 'primary key';
246247
comment?: keyword_comment;
247248
collate?: collate_expr;
248249
column_format?: column_format;
@@ -258,7 +259,8 @@ export type create_column_definition = {
258259
nullable: column_constraint['nullable'];
259260
default_val: column_constraint['default_val'];
260261
auto_increment?: 'auto_increment';
261-
unique_or_primary?: 'unique' | 'primary key';
262+
unique?: 'unique' | 'unique key';
263+
primary?: 'key' | 'primary key';
262264
comment?: keyword_comment;
263265
collate?: collate_expr;
264266
column_format?: column_format;
@@ -1741,7 +1743,7 @@ export type boolean_type = data_type;
17411743

17421744
export type binary_type = data_type;
17431745

1744-
1746+
export type character_varying = string;
17451747

17461748

17471749

0 commit comments

Comments
 (0)