summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-08-31 16:49:01 +0200
committerJoas Schilling <coding@schilljs.com>2021-08-31 16:49:01 +0200
commit7be5d64cec14992620ce2909e6719ff149463acb (patch)
treebe043fa6327ad6168a5b2e25df8b931467a54a5c
parente88492084ce88dca36b91024a483b79cfa20dc02 (diff)
Make migration repeatable
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/Migration/Version10000Date20201012144235.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Migration/Version10000Date20201012144235.php b/lib/Migration/Version10000Date20201012144235.php
index f7d22cb51..3705cbebd 100644
--- a/lib/Migration/Version10000Date20201012144235.php
+++ b/lib/Migration/Version10000Date20201012144235.php
@@ -43,11 +43,13 @@ class Version10000Date20201012144235 extends SimpleMigrationStep {
$schema = $schemaClosure();
$table = $schema->getTable('talk_rooms');
- $table->addColumn('sip_enabled', Types::SMALLINT, [
- 'notnull' => true,
- 'default' => 0,
- 'unsigned' => true,
- ]);
+ if (!$table->hasColumn('sip_enabled')) {
+ $table->addColumn('sip_enabled', Types::SMALLINT, [
+ 'notnull' => true,
+ 'default' => 0,
+ 'unsigned' => true,
+ ]);
+ }
return $schema;
}