From c3edb1be893a154cf58179be2ab971a20c996190 Mon Sep 17 00:00:00 2001 From: DominicGBauer Date: Wed, 28 Aug 2024 14:51:56 +0200 Subject: [PATCH] chore: clean up --- demos/react-multi-client/.gitignore | 2 +- packages/common/src/db/schema/Table.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/react-multi-client/.gitignore b/demos/react-multi-client/.gitignore index d857f4f0..7d8c0c88 100644 --- a/demos/react-multi-client/.gitignore +++ b/demos/react-multi-client/.gitignore @@ -35,4 +35,4 @@ yarn-error.log* .vercel # typescript -*.tsbuildinfo \ No newline at end of file +*.tsbuildinfo diff --git a/packages/common/src/db/schema/Table.ts b/packages/common/src/db/schema/Table.ts index 1286e71a..0ee28e55 100644 --- a/packages/common/src/db/schema/Table.ts +++ b/packages/common/src/db/schema/Table.ts @@ -181,7 +181,7 @@ export class Table { validate() { if (InvalidSQLCharacters.test(this.name)) { - throw new Error(`Invalid characters in table name ${this.name ?? ""}`); + throw new Error(`Invalid characters in table`); } if (this.viewNameOverride && InvalidSQLCharacters.test(this.viewNameOverride!)) { @@ -213,10 +213,10 @@ export class Table { const indexNames = new Set(); for (const index of this.indexes) { if (indexNames.has(index.name)) { - throw new Error(`Duplicate index ${index}`); + throw new Error(`Duplicate index ${index.name}`); } if (InvalidSQLCharacters.test(index.name)) { - throw new Error(`Invalid characters in index name: ${index}`); + throw new Error(`Invalid characters in index name: ${index.name}`); } for (const column of index.columns) {