Переглянути джерело

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

add a safeguard for Version23000Date20210721100600.php
tags/v26.0.0beta2
Christoph Wurst 1 рік тому
джерело
коміт
d7bd7639c2
Аккаунт користувача з таким Email не знайдено
1 змінених файлів з 19 додано та 17 видалено
  1. 19
    17
      core/Migrations/Version23000Date20210721100600.php

+ 19
- 17
core/Migrations/Version23000Date20210721100600.php Переглянути файл

@@ -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;
}
}
}

Завантаження…
Відмінити
Зберегти