From e51a2e587f18726028bd707b39bfbe74a9fc547c Mon Sep 17 00:00:00 2001 From: "francesco.spilla" Date: Thu, 14 Jan 2021 14:17:53 +0100 Subject: [PATCH] do not specify @index (primary keys only) --- src/drivers/MssqlDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/MssqlDriver.ts b/src/drivers/MssqlDriver.ts index cdae412..968a9f5 100644 --- a/src/drivers/MssqlDriver.ts +++ b/src/drivers/MssqlDriver.ts @@ -340,7 +340,7 @@ export default class MssqlDriver extends AbstractDriver { records.forEach((record) => { indexInfo.columns.push(record.ColumnName); }); - ent.indices.push(indexInfo); + if (indexInfo.primary) ent.indices.push(indexInfo); }); });