This module uses TypeORM and ts-mysql-migrate. Bun currently has several issues running it:
-
Geometrytype not recognized
Geometrymust be imported as type:import type { Geometry } from 'typeorm'
-
Circular imports between entities Bun fails when two entities import each other (e.g., via @ManyToOne / @OneToMany). Node.js tolerates this, Bun does not.
-
ts-mysql-migrate breaks Bun crashes due to unsupported module.parent.parent.require():
TypeError: undefined is not an object (evaluating 'module.parent.parent.require')turbo upturbo downturbo resetRuns all down migrations and after this all up migrations.
call truncate for all tables
turbo clearDBCurrently written for vitest, but can be transformed into bun test after switching out TypeORM with DrizzleORM