(schema?: DatabaseSchema)
| 358 | } |
| 359 | |
| 360 | protected async storeCurrentSchema(schema?: DatabaseSchema): Promise<void> { |
| 361 | if (!this.options.snapshot) { |
| 362 | return; |
| 363 | } |
| 364 | |
| 365 | const snapshotPath = await this.getSnapshotPath(); |
| 366 | schema ??= this.#schemaGenerator.getTargetSchema(); |
| 367 | const { fs } = await import('@mikro-orm/core/fs-utils'); |
| 368 | await fs.writeFile(snapshotPath, JSON.stringify(schema, null, 2)); |
| 369 | } |
| 370 | |
| 371 | private async getSchemaDiff(blank: boolean, initial: boolean): Promise<{ up: string[]; down: string[] }> { |
| 372 | const up: string[] = []; |
no test coverage detected