(body: Effect.Effect<A, E, DbService>)
| 42 | } from "./executor-schema"; |
| 43 | |
| 44 | const program = <A, E>(body: Effect.Effect<A, E, DbService>) => |
| 45 | Effect.runPromise( |
| 46 | body.pipe(Effect.provide(DbService.Live), Effect.scoped) as Effect.Effect<A, E, never>, |
| 47 | ); |
| 48 | |
| 49 | // Insert one row into every tenant table, plus an org- and a user-scoped blob, |
| 50 | // all owned by `tenant`. `tag` keeps unique indexes from colliding across orgs. |