mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-24 07:53:33 +00:00
fix(core): allow skipping migration execution
This commit is contained in:
parent
02edad83b2
commit
a69b70d5ca
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ export function applyOnly(db: Database, input: Migration[]) {
|
|||
if (completed.has(migration.id)) continue
|
||||
yield* db.transaction((tx) =>
|
||||
Effect.gen(function* () {
|
||||
yield* migration.up(tx)
|
||||
if (!process.env.OPENCODE_SKIP_MIGRATIONS) yield* migration.up(tx)
|
||||
yield* tx.run(
|
||||
sql`INSERT INTO ${sql.identifier("migration")} (id, time_completed) VALUES (${migration.id}, ${Date.now()})`,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue