files.id migration in one transaction
A failure after the old parent is dropped would leave files half-converted; in one transaction it rolls back completely. Tested on a fresh Postgres 17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9201e1200e
commit
ef09c07d6e
1 file changed
+1
-1
@@ -18,7 +18,7 @@ const TRIGGERS = [
|
|||||||
* rewrite also goes through the WAL (LOG.md 2026-10-05 (8)).
|
* rewrite also goes through the WAL (LOG.md 2026-10-05 (8)).
|
||||||
*/
|
*/
|
||||||
export default class extends BaseSchema {
|
export default class extends BaseSchema {
|
||||||
static disableTransactions = true
|
// One transaction: a failure anywhere leaves files as it was (it drops and recreates the parent).
|
||||||
|
|
||||||
async up() {
|
async up() {
|
||||||
const q = (sql: string) => this.db.rawQuery(sql)
|
const q = (sql: string) => this.db.rawQuery(sql)
|
||||||
|
|||||||
Reference in new issue
Block a user