mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-31 03:59:52 +02:00
Merge pull request #4144 from VSEphpbb/ticket/14434
[ticket/14434] Allow non-migration files inside migrations folder (continued) * VSEphpbb/ticket/14434: [ticket/14434] Refactored to check migrations when setting them [ticket/14434] Check migrations in the database updater task [ticket/14434] Do not include non-migrations in CLI list [ticket/14434] Remove redundant conditional [ticket/14434] Fix whitespace mistakes [ticket/14434] Remove recursion to simplify is_migration method [ticket/14434] Extract migration check to a reusable method [ticket/14434] Schema generator should ignore migration helpers
This commit is contained in:
@@ -77,8 +77,15 @@ class schema_generator
|
||||
$check_dependencies = true;
|
||||
while (!empty($migrations))
|
||||
{
|
||||
foreach ($migrations as $migration_class)
|
||||
foreach ($migrations as $key => $migration_class)
|
||||
{
|
||||
// Unset classes that are not a valid migration
|
||||
if (\phpbb\db\migrator::is_migration($migration_class) === false)
|
||||
{
|
||||
unset($migrations[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$open_dependencies = array_diff($migration_class::depends_on(), $tree);
|
||||
|
||||
if (empty($open_dependencies))
|
||||
|
Reference in New Issue
Block a user