fix: Move to storing the date instead of boolean for done state

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-11-07 21:35:33 +01:00
parent c3b4ed6e1f
commit c2fd5163b0
6 changed files with 18 additions and 43 deletions

View File

@@ -28,6 +28,7 @@ namespace OCA\Deck\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@@ -47,9 +48,9 @@ class Version1011Date20230901010840 extends SimpleMigrationStep {
$table = $schema->getTable('deck_cards');
if (!$table->hasColumn('done')) {
$table->addColumn('done', 'boolean', [
'default' => false,
'notnull' => true,
$table->addColumn('done', Types::DATETIME, [
'default' => null,
'notnull' => false,
]);
return $schema;