* Compares two databases schemas from two arbitrary sources, * and display the difference as either a human-readable summary, * or an executable script that can be passed to dbExecute. * Connection to a shadow database is only necessary when either the from or the to params is a migrations
(input: SchemaEngineInput<'diff'>)
| 241 | * By default, we output a human-readable diff. If you want an executable script, pass the "script": true param. |
| 242 | */ |
| 243 | public async migrateDiff(input: SchemaEngineInput<'diff'>) { |
| 244 | const { stdout, ...rest } = await this.runCommand('diff', input) |
| 245 | |
| 246 | if (stdout) { |
| 247 | // Here we print the content from the Schema Engine to stdout directly |
| 248 | // (it is not returned to the caller) |
| 249 | process.stdout.write(stdout) |
| 250 | } |
| 251 | |
| 252 | return rest |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Mark a migration as applied in the migrations table. |
nothing calls this directly
no test coverage detected