You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
581 B
25 lines
581 B
import './env';
|
|
import { seed } from "drizzle-seed";
|
|
import { usersTable } from "./lib/schema/auth";
|
|
import { dbGlobal } from "./lib/db";
|
|
|
|
async function main() {
|
|
await seed(dbGlobal, { usersTable }).refine((f) => ({
|
|
usersTable: {
|
|
columns: {
|
|
name: f.fullName(),
|
|
age: f.int({ minValue: 18, maxValue: 60 }),
|
|
email: f.email(),
|
|
},
|
|
count: 10,
|
|
},
|
|
}));
|
|
console.log('Seed complete!');
|
|
process.exit(0);
|
|
}
|
|
|
|
main().catch(e => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|
|
|
|
|