diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Migrations/Version23000Date20210721100600.php | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/core/Migrations/Version23000Date20210721100600.php b/core/Migrations/Version23000Date20210721100600.php index 99353819f60..1169ca4039e 100644 --- a/core/Migrations/Version23000Date20210721100600.php +++ b/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; + } } } |