MCPcopy
hub / github.com/anomalyco/opencode / renderMigration

Function renderMigration

packages/core/script/migration.ts:127–140  ·  view source on GitHub ↗
(name: string, sql: string)

Source from the content-addressed store, hash-verified

125}
126
127function renderMigration(name: string, sql: string) {
128 return `import { Effect } from "effect"
129import type { DatabaseMigration } from "../migration"
130
131export default {
132 id: ${JSON.stringify(name)},
133 up(tx) {
134 return Effect.gen(function* () {
135${renderStatements(sql)}
136 })
137 },
138} satisfies DatabaseMigration.Migration
139`
140}
141
142function renderSchema(sql: string) {
143 return `import { Effect } from "effect"

Callers 1

generateFunction · 0.85

Calls 1

renderStatementsFunction · 0.85

Tested by

no test coverage detected