Skip to content

Commit

Permalink
Merge pull request #36468 from nextcloud/backport/36407/stable23
Browse files Browse the repository at this point in the history
[stable23] add a safeguard for Version23000Date20210721100600.php
  • Loading branch information
szaimen authored Feb 3, 2023
2 parents 2da9062 + 006ed2f commit 06b7dfe
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 06b7dfe

Please sign in to comment.