Skip to content

Commit

Permalink
fix loaded extensions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgul committed May 20, 2024
1 parent 8e61f93 commit 6795a54
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/server/utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,18 @@ export async function runMigrations(runSeeds = true, convertToJs = true) : Promi
}

// Run the migrations
await db.migrate.latest({ directory: './dist/server/knex/migrations' });
await db.migrate.latest({
directory: './dist/server/knex/migrations',
loadExtensions: [ '.js' ]
});

// Run the seeds
if(runSeeds)
{
await db.seed.run({ directory: './dist/server/knex/seeds' });
await db.seed.run({
directory: './dist/server/knex/seeds',
loadExtensions: [ '.js' ]
});
}
}

Expand Down

0 comments on commit 6795a54

Please sign in to comment.