From 09ae7f8b60610d8c415fe649d4732bb271aaa848 Mon Sep 17 00:00:00 2001 From: Neographer Date: Thu, 18 May 2023 17:51:51 +0530 Subject: [PATCH] add 'bytea' to column data types. (#499) Co-authored-by: Igal Klebanov --- src/operation-node/data-type-node.ts | 1 + test/node/src/schema.test.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/operation-node/data-type-node.ts b/src/operation-node/data-type-node.ts index 9d20f331a..0ff743053 100644 --- a/src/operation-node/data-type-node.ts +++ b/src/operation-node/data-type-node.ts @@ -23,6 +23,7 @@ export type ColumnDataType = | `numeric(${number}, ${number})` | 'binary' | `binary(${number})` + | 'bytea' | 'date' | 'datetime' | `datetime(${number})` diff --git a/test/node/src/schema.test.ts b/test/node/src/schema.test.ts index 877015bf0..0ac4f0b39 100644 --- a/test/node/src/schema.test.ts +++ b/test/node/src/schema.test.ts @@ -73,6 +73,7 @@ for (const dialect of DIALECTS) { .addColumn('v', 'timestamptz(6)') .addColumn('w', 'char(4)') .addColumn('x', 'char') + .addColumn('y', 'bytea') testSql(builder, dialect, { postgres: { @@ -101,7 +102,8 @@ for (const dialect of DIALECTS) { '"u" timestamp(6) default current_timestamp not null,', '"v" timestamptz(6),', '"w" char(4),', - '"x" char)' + '"x" char,', + '"y" bytea)' ], parameters: [], },