cant insert after using drizzle-seed

schema
const usersTable = pgTable('users', {
    id: integer().primaryKey().generatedAlwaysAsIdentity(),
    email: varchar({ length: 255 }).notNull().unique(),
    password: varchar({ length: 255 }).notNull(),
})


seed code
    const password = await hash('password')
    await seed(db, schema, { count: 20 }).refine((f) => ({
        usersTable: {
            columns: {
                password: f.default({ defaultValue: password }),
            },
        },
    }))


after seeding i cant insert any new rows because the id is already exists even though am not specifying it explicitly
Was this page helpful?