mirror of https://github.com/sualko/cloud_bbb
fix: if block for every table
parent
8218f97e06
commit
b608a17c9f
|
@ -23,19 +23,7 @@ class Version000000Date20220316165602 extends SimpleMigrationStep {
|
||||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
if (!$schema->hasTable('bbb_restrictions') && !$schema->hasTable('bbb_rooms')) {
|
if ($schema->hasTable('bbb_rooms')) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$table = $schema->getTable('bbb_restrictions');
|
|
||||||
|
|
||||||
if (!$table->hasColumn('allow_logout_u_r_l')) {
|
|
||||||
$table->addColumn('allow_logout_u_r_l', 'boolean', [
|
|
||||||
'notnull' => false,
|
|
||||||
'default' => false
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$table = $schema->getTable('bbb_rooms');
|
$table = $schema->getTable('bbb_rooms');
|
||||||
|
|
||||||
if (!$table->hasColumn('logout_u_r_l')) {
|
if (!$table->hasColumn('logout_u_r_l')) {
|
||||||
|
@ -44,8 +32,19 @@ class Version000000Date20220316165602 extends SimpleMigrationStep {
|
||||||
'length' => 200
|
'length' => 200
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($schema->hasTable('bbb_restrictions')) {
|
||||||
|
$table = $schema->getTable('bbb_restrictions');
|
||||||
|
|
||||||
|
if (!$table->hasColumn('allow_logout_u_r_l')) {
|
||||||
|
$table->addColumn('allow_logout_u_r_l', 'boolean', [
|
||||||
|
'notnull' => false,
|
||||||
|
'default' => false
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $schema;
|
return $schema;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue