Pārlūkot izejas kodu

Merge pull request #36407 from nextcloud/enh/31710/migration-safeguard

add a safeguard for Version23000Date20210721100600.php
tags/v26.0.0beta2
Christoph Wurst pirms 1 gada
vecāks
revīzija
d7bd7639c2
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 19 papildinājumiem un 17 dzēšanām
  1. 19
    17
      core/Migrations/Version23000Date20210721100600.php

+ 19
- 17
core/Migrations/Version23000Date20210721100600.php Parādīt failu

@@ -40,22 +40,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;
}
}
}

Notiek ielāde…
Atcelt
Saglabāt