chore: update table var to follow table name in db
This commit is contained in:
parent
a6fc74e851
commit
52bfa28fcd
6 changed files with 18 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { faker } from "@faker-js/faker";
|
||||
import { db } from "../database";
|
||||
import { product } from "../schema/products";
|
||||
import { products } from "../schema/products";
|
||||
import type { SeedFunction } from "./seed";
|
||||
|
||||
type ProductRow = {
|
||||
|
|
@ -23,7 +23,7 @@ export const seedProducts: SeedFunction = async () => {
|
|||
isPublished: faker.datatype.boolean(),
|
||||
}));
|
||||
|
||||
await db.insert(product).values(data);
|
||||
await db.insert(products).values(data);
|
||||
|
||||
return `${data.length} Products seeded successfully`;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { faker } from "@faker-js/faker";
|
||||
import { db } from "../database";
|
||||
import { user } from "../schema/users";
|
||||
import { users } from "../schema/users";
|
||||
import type { SeedFunction } from "./seed";
|
||||
|
||||
type UserRow = {
|
||||
|
|
@ -17,7 +17,7 @@ export const seedUsers: SeedFunction = async () => {
|
|||
email: faker.internet.email(),
|
||||
}));
|
||||
|
||||
await db.insert(user).values(data);
|
||||
await db.insert(users).values(data);
|
||||
|
||||
return `${data.length} Users seeded successfully`;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue