-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.44.7
What version of drizzle-kit are you using?
0.31.5
Other packages
No response
Describe the Bug
When using Drizzle with generated (e.g. from Better Auth), you can't add indexes inline as they would be overwritten on next generate, so I exported standalone index() definitions from my schema entrypoint. However, drizzle-kit generate does not create migrations for these indexes.
Example:
// auth.ts (generated, do not edit)
export const users = sqliteTable('users', {
id: text('id').primaryKey(),
email: text('email').notNull().unique(),
// ...
});
// schema.ts (entrypoint)
import { index } from 'drizzle-orm/sqlite-core';
import { users } from './auth';
export * from './auth';
export const usersEmailIndex = index('users_email_idx').on(users.email);Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working