From 1aef6c0e7a05ae1f3c0b86a627b94f7df37f5609 Mon Sep 17 00:00:00 2001 From: Anoop Kumar Date: Fri, 5 May 2023 17:36:16 +0530 Subject: [PATCH 1/2] Added column type binary(${number}) --- src/operation-node/data-type-node.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/operation-node/data-type-node.ts b/src/operation-node/data-type-node.ts index b537beaf2..9d20f331a 100644 --- a/src/operation-node/data-type-node.ts +++ b/src/operation-node/data-type-node.ts @@ -22,6 +22,7 @@ export type ColumnDataType = | 'numeric' | `numeric(${number}, ${number})` | 'binary' + | `binary(${number})` | 'date' | 'datetime' | `datetime(${number})` From a0712a9e0fe3072d8430e46333ff54cda9c1dc2d Mon Sep 17 00:00:00 2001 From: Anoop Kumar Date: Sat, 6 May 2023 02:10:55 +0530 Subject: [PATCH 2/2] Updated unit tests --- test/node/src/schema.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/node/src/schema.test.ts b/test/node/src/schema.test.ts index 8213eb648..a42882cc6 100644 --- a/test/node/src/schema.test.ts +++ b/test/node/src/schema.test.ts @@ -176,6 +176,7 @@ for (const dialect of DIALECTS) { ) .addColumn('t', 'char(4)') .addColumn('u', 'char') + .addColumn('v', 'binary(16)') testSql(builder, dialect, { mysql: { @@ -201,7 +202,8 @@ for (const dialect of DIALECTS) { '`r` datetime(6),', '`s` timestamp(6) default current_timestamp(6) not null,', '`t` char(4),', - '`u` char)' + '`u` char,', + '`v` binary(16))' ], parameters: [], },