Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]:(0 , import_pg_core.enum) is not a function #3825

Open
1 task done
DavidHombe96 opened this issue Dec 23, 2024 · 0 comments
Open
1 task done

[BUG]:(0 , import_pg_core.enum) is not a function #3825

DavidHombe96 opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working priority Will be worked on next

Comments

@DavidHombe96
Copy link

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.38.2

What version of drizzle-kit are you using?

0.30.1

Other packages

No response

Describe the Bug

1-Does not generate tables
2-just create a user schema and add an enum role that can be user or admin and run npx drizzle-kit generate
import { pgTable, serial, varchar, text, timestamp, pgEnum } from "drizzle-orm/pg-core";
const roleEnum = pgEnum("roles", ["client", "profissional"])

export const users = pgTable(
"users", // Nome da tabela
{
id: serial("id").primaryKey(),
name: varchar("name", { length: 100 }).notNull(),
email: varchar("email", { length: 100 }).notNull().unique(),
passwordHash: varchar("password_hash", { length: 255 }).notNull(),
phone: varchar("phone", { length: 15 }),
address: text("address"),
userType: roleEnum("roles").notNull(),
createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
updatedAt: timestamp("updated_at", { withTimezone: true })
.defaultNow()
.$onUpdateFn(() => new Date()),
}
);

3- user table created
4- Postgres
5-It only happens when I work with node and express, in nextjs it works fine, (pg and neon )
6- I'm not using monorepo
7- I'm using javascript
8- using node

@DavidHombe96 DavidHombe96 added the bug Something isn't working label Dec 23, 2024
@L-Mario564 L-Mario564 added the priority Will be worked on next label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Will be worked on next
Projects
None yet
Development

No branches or pull requests

2 participants