Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2018-12-18 09:46:16 +0300
committerdartcafe <github@dartcafe.de>2018-12-18 09:46:16 +0300
commit501510635a755348adc6f6f9c1f8e3fce2863632 (patch)
tree50e237c2efb25efbb15aacd1507d48b25746b974 /lib/Migration
parent08ee39fdcf3ade2dcc1ecd426e80d780339fd9e8 (diff)
Fix migration to handle problem after migration error
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version0009Date20181125061900.php11
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,
+ ]);
+ }
}