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:
authorTortue Torche <tortuetorche@users.noreply.github.com>2019-12-11 12:19:37 +0300
committerTortue Torche <tortuetorche@users.noreply.github.com>2019-12-11 12:19:37 +0300
commit8124688958c04871ab30dafaeb0ae9760c77de90 (patch)
tree1eb5ccbf1d4252aa2c2bb552c7a724440cd0cc62 /lib/Migration
parentbb507dce72eee076dc08d6fe902765e963a738ae (diff)
SQLite can't have a NOT NULL constraint without DEFAULT value.
I understand the need to require a value for 'delete_date' column, but it should be done on the application level to support SQLite. FYI, Nextcloud Server doesn't have any DATETIME column with a NOT NULL constraint, see: https://github.com/nextcloud/server/blob/v17.0.1/core/Migrations/Version13000Date20170718121200.php#L752 Here the SQLite error message: An exception occurred while executing 'ALTER TABLE oc_polls_events ADD COLUMN delete_date DATETIME NOT NULL': SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version0010Date20190801063812.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Migration/Version0010Date20190801063812.php b/lib/Migration/Version0010Date20190801063812.php
index c6c2fecd..f17e8ab8 100644
--- a/lib/Migration/Version0010Date20190801063812.php
+++ b/lib/Migration/Version0010Date20190801063812.php
@@ -76,7 +76,7 @@ class Version0010Date20190801063812 extends SimpleMigrationStep {
}
if (!$table->hasColumn('delete_date')) {
$table->addColumn('delete_date', Type::DATETIME, [
- 'notnull' => true
+ 'notnull' => false
]);
}
if (!$table->hasColumn('vote_limit')) {