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
583 B

import './env';
import { seed } from "drizzle-seed";
import { usersTable } from "./lib/schema/schema";
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);
});