Skip to content

Commit 597d865

Browse files
committed
Fix: Updated algorithm typo
1 parent 0a4e3b2 commit 597d865

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drizzle-orm/src/mysql-core/indexes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ interface IndexConfig {
1919
using?: 'btree' | 'hash';
2020

2121
/**
22-
* If set, the index will be created as `create index ... algorythm { 'default' | 'inplace' | 'copy' }`.
22+
* If set, the index will be created as `create index ... algorithm { 'default' | 'inplace' | 'copy' }`.
2323
*/
24-
algorythm?: 'default' | 'inplace' | 'copy';
24+
algorithm?: 'default' | 'inplace' | 'copy';
2525

2626
/**
2727
* If set, adds locks to the index creation.
@@ -67,8 +67,8 @@ export class IndexBuilder implements AnyIndexBuilder {
6767
return this;
6868
}
6969

70-
algorythm(algorythm: IndexConfig['algorythm']): this {
71-
this.config.algorythm = algorythm;
70+
algorithm(algorithm: IndexConfig['algorithm']): this {
71+
this.config.algorithm = algorithm;
7272
return this;
7373
}
7474

drizzle-orm/type-tests/mysql/tables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const users = mysqlTable(
5353
uniqueClass: uniqueIndex('uniqueClass')
5454
.on(users.class, users.subClass)
5555
.lock('default')
56-
.algorythm('copy')
56+
.algorithm('copy')
5757
.using(`btree`),
5858
legalAge: check('legalAge', sql`${users.age1} > 18`),
5959
usersClassFK: foreignKey({ columns: [users.subClass], foreignColumns: [classes.subClass] }),

0 commit comments

Comments
 (0)