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 11:27:26 +0300
committerTortue Torche <tortuetorche@users.noreply.github.com>2019-12-11 11:40:53 +0300
commitbb507dce72eee076dc08d6fe902765e963a738ae (patch)
tree7f923970365c3f41eb2677456df7c365013812b0 /lib/Migration
parentc344e17844e98b41ed769739c26151104bd76b65 (diff)
Fix tests according to @dartcafe comments
Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r--lib/Migration/Version0010Date20190801063812.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Migration/Version0010Date20190801063812.php b/lib/Migration/Version0010Date20190801063812.php
index 7c699b6e..c6c2fecd 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' => false
+ 'notnull' => true
]);
}
if (!$table->hasColumn('vote_limit')) {
@@ -86,9 +86,9 @@ class Version0010Date20190801063812 extends SimpleMigrationStep {
]);
}
if (!$table->hasColumn('show_results')) {
- $table->addColumn('show_results', Type::BOOLEAN, [
+ $table->addColumn('show_results', Type::STRING, [
'notnull' => true,
- 'default' => 0
+ 'lenght' => 64
]);
}
@@ -160,29 +160,29 @@ class Version0010Date20190801063812 extends SimpleMigrationStep {
while ($row = $result->fetch()) {
if ($row['access'] == 'public') {
- // copy the token to a public share
+ // copy the hash to a public share
$insert
- ->setParameter('token', $row['token'])
+ ->setParameter('token', $row['hash'])
->setParameter('type', 'public')
->setParameter('poll_id', $row['id'])
->setParameter('user_id', null)
->setParameter('user_email', null);
$insert->execute();
} elseif ($row['access'] == 'hidden') {
- // copy the token to a public share
+ // copy the hash to a public share
// poll stays hidden for registered users
$insert
- ->setParameter('token', $row['token'])
+ ->setParameter('token', $row['hash'])
->setParameter('type', 'public')
->setParameter('poll_id', $row['id'])
->setParameter('user_id', null)
->setParameter('user_email', null);
$insert->execute();
} elseif ($row['access'] == 'registered') {
- // copy the token to a public share
- // to keep the token
+ // copy the hash to a public share
+ // to keep the hash
$insert
- ->setParameter('token', $row['token'])
+ ->setParameter('token', $row['hash'])
->setParameter('type', 'public')
->setParameter('poll_id', $row['id'])
->setParameter('user_id', null)