fix(migration): disable transaction for concurrent index creation
PostgreSQL does not allow CREATE INDEX CONCURRENTLY to run inside a transaction block. This migration now sets $withinTransaction = false to allow the concurrent index creation to succeed. Fixes the error: "CREATE INDEX CONCURRENTLY cannot run inside a transaction block" when running migrations in dev environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9481247ef4
commit
9c2ef0aa21
1 changed files with 6 additions and 0 deletions
|
|
@ -6,6 +6,12 @@
|
|||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Disable transactions for this migration because CREATE INDEX CONCURRENTLY
|
||||
* cannot run inside a transaction block in PostgreSQL.
|
||||
*/
|
||||
public bool $withinTransaction = false;
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue