Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicGBauer committed Aug 28, 2024
1 parent 67c0a61 commit c3edb1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demos/react-multi-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ yarn-error.log*
.vercel

# typescript
*.tsbuildinfo
*.tsbuildinfo
6 changes: 3 additions & 3 deletions packages/common/src/db/schema/Table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class Table<Columns extends ColumnsType = ColumnsType> {

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!)) {
Expand Down Expand Up @@ -213,10 +213,10 @@ export class Table<Columns extends ColumnsType = ColumnsType> {
const indexNames = new Set<string>();
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) {
Expand Down

0 comments on commit c3edb1b

Please sign in to comment.