mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
add a safeguard for Version23000Date20210721100600.php
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
6bb260eb97
commit
dcf8eb591f
1 changed files with 19 additions and 17 deletions
|
|
@ -41,22 +41,24 @@ class Version23000Date20210721100600 extends SimpleMigrationStep {
|
|||
/** @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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue