diff options
author | Joas Schilling <coding@schilljs.com> | 2021-08-31 17:49:01 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-08-31 17:49:01 +0300 |
commit | 7be5d64cec14992620ce2909e6719ff149463acb (patch) | |
tree | be043fa6327ad6168a5b2e25df8b931467a54a5c /lib/Migration | |
parent | e88492084ce88dca36b91024a483b79cfa20dc02 (diff) |
Make migration repeatable
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/Version10000Date20201012144235.php | 12 |
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; } |