drizzle-kit generate not generating sql file anymore?

hello, is there a way to regenerate a deleted sql file? I tried doing drizzle-kit generate and it only says No schema changes, nothing to migrate 😴 I already ran generate once but I accidentally deleted it. Is there a way to regenerate it? Thanks!
1 Reply
ice cream
ice creamOP•3w ago
This is the error when I run drizzle-kit migrate
> [email protected] db:migrate
> drizzle-kit migrate

No config path provided, using default 'drizzle.config.ts'
Reading config file '/path/to/drizzle.config.ts'
[⣷] applying migrations...Error: No file ./drizzle/0002_blue_payback.sql found in ./drizzle folder
at readMigrationFiles (/path/to/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/src/migrator.ts:55:10)
at migrate (/path/to/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/src/mysql2/migrator.ts:9:21)
at migrateFn (/path/to/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:79015:18)
at Object.handler (/path/to/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:92033:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (/path/to/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:90501:7)
> [email protected] db:migrate
> drizzle-kit migrate

No config path provided, using default 'drizzle.config.ts'
Reading config file '/path/to/drizzle.config.ts'
[⣷] applying migrations...Error: No file ./drizzle/0002_blue_payback.sql found in ./drizzle folder
at readMigrationFiles (/path/to/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/src/migrator.ts:55:10)
at migrate (/path/to/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/src/mysql2/migrator.ts:9:21)
at migrateFn (/path/to/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:79015:18)
at Object.handler (/path/to/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:92033:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (/path/to/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:90501:7)

Did you find this page helpful?