import { Migrate } from '@prisma/migrate' ; import { createDatabase } from '@prisma/sdk' ; export type MigrateOptions = { connectionString : string ; schemaPath : string ; } ; export async function migrateDb ( { connectionString , schemaPath } ) { await createDatabase ( connectionString ) ; const migrate = new Migrate ( schemaPath ) ; try { await migrate . push ( { force : true , } ) ; } finally { migrate . stop ( ) ; } }