(args: Array<string>)
| 36 | > = Migrator.make({ |
| 37 | dumpSchema(path, table) { |
| 38 | const dump = (args: Array<string>) => |
| 39 | Effect.gen(function*() { |
| 40 | const sql = yield* SqliteClient |
| 41 | const dump = yield* pipe( |
| 42 | Command.make("sqlite3", (sql as SqliteClient).config.filename, ...args), |
| 43 | Command.string |
| 44 | ) |
| 45 | return dump.replace(/^create table sqlite_sequence\(.*$/im, "") |
| 46 | .replace(/\n{2,}/gm, "\n\n") |
| 47 | .trim() |
| 48 | }).pipe( |
| 49 | Effect.mapError((error) => new Migrator.MigrationError({ reason: "failed", message: error.message })) |
| 50 | ) |
| 51 | |
| 52 | const dumpSchema = dump([".schema"]) |
| 53 |
no test coverage detected