diff options
author | dartcafe <github@dartcafe.de> | 2018-12-18 09:46:16 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2018-12-18 09:46:16 +0300 |
commit | 501510635a755348adc6f6f9c1f8e3fce2863632 (patch) | |
tree | 50e237c2efb25efbb15aacd1507d48b25746b974 /lib/Migration | |
parent | 08ee39fdcf3ade2dcc1ecd426e80d780339fd9e8 (diff) |
Fix migration to handle problem after migration error
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/Version0009Date20181125061900.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Migration/Version0009Date20181125061900.php b/lib/Migration/Version0009Date20181125061900.php index c3e5c17d..bcd282e7 100644 --- a/lib/Migration/Version0009Date20181125061900.php +++ b/lib/Migration/Version0009Date20181125061900.php @@ -117,11 +117,12 @@ class Version0009Date20181125061900 extends SimpleMigrationStep { } else { $table = $schema->getTable('polls_events'); - - $table->addColumn('allow_maybe', Type::INTEGER, [ - 'notnull' => false, - 'default' => 1, - ]); + if(!$table->hasColumn('allow_maybe')) { + $table->addColumn('allow_maybe', Type::INTEGER, [ + 'notnull' => false, + 'default' => 1, + ]); + } } |