I can’t get database migrations to run. I followed the instructions on Database migrations | Strapi Documentation but they don’t get triggered.
I can see that the changes aren’t applied, the log statements in the migrations don’t run, the migrations aren’t added to the migrations table. Basically, they don’t run at all.
I also tried to enable runMigrations
in the settings even thought it’s supposed to default to true
and that didn’t help either.
I created a migration file named 2024.05.16T00.00.00.migration-test-01.ts
in database/migrations
.
This is my test migration:
export async function up(knex) {
console.log('Migration started')
try {
console.log('Migration done')
}
catch (e) {
console.log('An error occurred in knex', e)
}
}
Note that I’m on strapi 4.15.5 and using typescript.
This topic has been created from a Discord post (1240704006343491727) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord