0 tables

I don't understand why there is there is 0 tables even tho there are 3 exports for 3 different postgres tables ./project/lib/database/schema.ts
import { pgTable, text, json, integer, date, varchar } from "drizzle-orm/pg-core";

export const roles = pgTable('roles', {
id: varchar('id').primaryKey(),
roles: json('roles').default([]),
})

export const levels = pgTable('levels', {
id: varchar('id').primaryKey(),
level: integer('level'),
currentXp: integer('current_xp'),
totalXp: integer('total_xp'),
})

export const bans = pgTable('bans', {
id: varchar('id').primaryKey(),
banned: integer('banned'),
reason: text('reason'),
expire_date: date('expire_date'),
expire_time: integer('expire_time'),
})
import { pgTable, text, json, integer, date, varchar } from "drizzle-orm/pg-core";

export const roles = pgTable('roles', {
id: varchar('id').primaryKey(),
roles: json('roles').default([]),
})

export const levels = pgTable('levels', {
id: varchar('id').primaryKey(),
level: integer('level'),
currentXp: integer('current_xp'),
totalXp: integer('total_xp'),
})

export const bans = pgTable('bans', {
id: varchar('id').primaryKey(),
banned: integer('banned'),
reason: text('reason'),
expire_date: date('expire_date'),
expire_time: integer('expire_time'),
})
./drizzle.config.ts
import { type Config } from 'drizzle-kit'

export default {
schema: './project/lib/database/schema.ts',
out: './drizzle',
driver: 'pg',
verbose: true,
dbCredentials: {
host: Bun.env.DATABASE_HOST as string,
port: parseInt(Bun.env.DATABASE_PORT as string),
user: Bun.env.DATABASE_USER,
password: Bun.env.DATABASE_PASSWORD,
database: Bun.env.DATABASE_NAME as string,
ssl: true,
},
} satisfies Config
import { type Config } from 'drizzle-kit'

export default {
schema: './project/lib/database/schema.ts',
out: './drizzle',
driver: 'pg',
verbose: true,
dbCredentials: {
host: Bun.env.DATABASE_HOST as string,
port: parseInt(Bun.env.DATABASE_PORT as string),
user: Bun.env.DATABASE_USER,
password: Bun.env.DATABASE_PASSWORD,
database: Bun.env.DATABASE_NAME as string,
ssl: true,
},
} satisfies Config
No description
11 Replies
AlexBrodbelt
AlexBrodbelt4mo ago
I have a similar issue too...
Mario564
Mario5644mo ago
Is this your the first migration you're generating with Drizzle Kit or have you done it succcessfully before with the described settings and project structure?
nubb
nubbOP4mo ago
I fixed this a while back lol By using node It wasn’t working at all with just bun alone
Mario564
Mario5644mo ago
I see, seems strange that the runtime was the issue Recommend filing an issue in the repo if you can so the team can look into solving the issue
nk
nk4mo ago
Drizzle-kit has never worked on Bun It will use node if you don't do --bun or have node installed
AlexBrodbelt
AlexBrodbelt4mo ago
oh so I can't use drizzle-kit unless I am using node?
rphlmr ⚡
rphlmr ⚡4mo ago
with drizzle-kit installed as dev dep:
No description
rphlmr ⚡
rphlmr ⚡4mo ago
I am on latest for both kit and orm drizzle-kit: v0.23.1 drizzle-orm: v0.32.1
nk
nk4mo ago
Still using node Do bunx --bun It will drop everything
rphlmr ⚡
rphlmr ⚡4mo ago
Thx i read too fast.
nk
nk4mo ago
Its okay to make mistakes pumpkin
Want results from more Discord servers?
Add your server