Skip to content

Commit

Permalink
Merge pull request #36466 from nextcloud/backport/36407/stable25
Browse files Browse the repository at this point in the history
[stable25] add a safeguard for Version23000Date20210721100600.php
  • Loading branch information
szaimen authored Feb 3, 2023
2 parents b06b3f3 + 69828a5 commit 216a8ba
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions core/Migrations/Version23000Date20210721100600.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,24 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

$table = $schema->createTable('authorized_groups');
$table->addColumn('id', 'integer', [
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('group_id', 'string', [
'notnull' => true,
'length' => 200
]);
$table->addColumn('class', 'string', [
'notnull' => true,
'length' => 200,
]);

$table->setPrimaryKey(['id']);
$table->addIndex(['group_id'], 'admindel_groupid_idx');
return $schema;
if (!$schema->hasTable('authorized_groups')) {
$table = $schema->createTable('authorized_groups');
$table->addColumn('id', 'integer', [
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('group_id', 'string', [
'notnull' => true,
'length' => 200
]);
$table->addColumn('class', 'string', [
'notnull' => true,
'length' => 200,
]);

$table->setPrimaryKey(['id']);
$table->addIndex(['group_id'], 'admindel_groupid_idx');
return $schema;
}
}
}

0 comments on commit 216a8ba

Please sign in to comment.