Skip to content

Commit

Permalink
feat(db): indexing sellerId on products table
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Nov 12, 2023
1 parent 668df86 commit d2f8bd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/db/schema/products.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { relations, sql } from "drizzle-orm";
import { int, timestamp, uniqueIndex, varchar } from "drizzle-orm/mysql-core";
import { index, int, timestamp, varchar } from "drizzle-orm/mysql-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
import { z } from "zod";

Expand Down Expand Up @@ -28,7 +28,7 @@ export const products = mySqlTable(
},
(products) => {
return {
sellerIdIndex: uniqueIndex("seller_id_idx").on(products.sellerId),
sellerIdIndex: index("seller_id_idx").on(products.sellerId),
};
},
);
Expand Down

0 comments on commit d2f8bd8

Please sign in to comment.