MCPcopy
hub / github.com/prisma/prisma / migrateDiff

Method migrateDiff

packages/migrate/src/SchemaEngineWasm.ts:243–253  ·  view source on GitHub ↗

* 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'>)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

runCommandMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected