(migration: Migration, method: 'up' | 'down')
| 88 | } |
| 89 | |
| 90 | private async getQueries(migration: Migration, method: 'up' | 'down') { |
| 91 | await migration[method](); |
| 92 | const charset = this.config.get('charset')!; |
| 93 | let queries = migration.getQueries(); |
| 94 | queries.unshift(...this.#helper.getSchemaBeginning(charset, this.options.disableForeignKeys).split('\n')); |
| 95 | |
| 96 | if (this.#runSchema) { |
| 97 | queries.unshift(this.#helper.getSetSchemaSQL(this.#runSchema)); |
| 98 | } |
| 99 | |
| 100 | queries.push(...this.#helper.getSchemaEnd(this.options.disableForeignKeys).split('\n')); |
| 101 | queries = queries.filter(sql => typeof sql !== 'string' || sql.trim().length > 0); |
| 102 | |
| 103 | return queries; |
| 104 | } |
| 105 | } |
no test coverage detected