Skip to content

Commit 500d4ad

Browse files
authored
feat: migrations lock (#9660)
* feat: migrations lock * cs fix * update phpstan baseline * add upgrading notes * apply suggestions from code review
1 parent 5d8baed commit 500d4ad

File tree

9 files changed

+368
-121
lines changed

9 files changed

+368
-121
lines changed

app/Config/Migrations.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,19 @@ class Migrations extends BaseConfig
4747
* - Y_m_d_His_
4848
*/
4949
public string $timestampFormat = 'Y-m-d-His_';
50+
51+
/**
52+
* --------------------------------------------------------------------------
53+
* Enable/Disable Migration Lock
54+
* --------------------------------------------------------------------------
55+
*
56+
* Locking is disabled by default.
57+
*
58+
* When enabled, it will prevent multiple migration processes
59+
* from running at the same time by using a lock mechanism.
60+
*
61+
* This is useful in production environments to avoid conflicts
62+
* or race conditions during concurrent deployments.
63+
*/
64+
public bool $lock = false;
5065
}

0 commit comments

Comments
 (0)