Browse Source

Change further columns to be nullable with a default of 0

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v21.0.0beta1
Julius Härtl 3 years ago
parent
commit
0befe07127
No account linked to committer's email address

+ 4
- 10
core/Migrations/Version13000Date20170718121200.php View File

]); ]);
$table->setPrimaryKey(['id']); $table->setPrimaryKey(['id']);
$table->addIndex(['class'], 'job_class_index'); $table->addIndex(['class'], 'job_class_index');
} else {
$table = $schema->getTable('jobs');
$table->changeColumn('execution_duration', [
'notnull' => true,
'default' => 0,
]);
} }


if (!$schema->hasTable('users')) { if (!$schema->hasTable('users')) {
'default' => '', 'default' => '',
]); ]);
$table->addColumn('type', 'smallint', [ $table->addColumn('type', 'smallint', [
'notnull' => true,
'notnull' => false,
'length' => 2, 'length' => 2,
'default' => 0, 'default' => 0,
'unsigned' => true, 'unsigned' => true,
]); ]);
$table->addColumn('remember', 'smallint', [ $table->addColumn('remember', 'smallint', [
'notnull' => true,
'notnull' => false,
'length' => 1, 'length' => 1,
'default' => 0, 'default' => 0,
'unsigned' => true, 'unsigned' => true,
]); ]);
$table->addColumn('last_activity', 'integer', [ $table->addColumn('last_activity', 'integer', [
'notnull' => true,
'notnull' => false,
'length' => 4, 'length' => 4,
'default' => 0, 'default' => 0,
'unsigned' => true, 'unsigned' => true,
]); ]);
$table->addColumn('last_check', 'integer', [ $table->addColumn('last_check', 'integer', [
'notnull' => true,
'notnull' => false,
'length' => 4, 'length' => 4,
'default' => 0, 'default' => 0,
'unsigned' => true, 'unsigned' => true,

+ 1
- 1
core/Migrations/Version13000Date20170919121250.php View File

$column->setUnsigned(true); $column->setUnsigned(true);
} else { } else {
$table->addColumn('remember', 'smallint', [ $table->addColumn('remember', 'smallint', [
'notnull' => true,
'notnull' => false,
'length' => 1, 'length' => 1,
'default' => 0, 'default' => 0,
'unsigned' => true, 'unsigned' => true,

+ 20
- 0
core/Migrations/Version21000Date20201120141228.php View File

if ($loginNameColumn->getLength() !== 255) { if ($loginNameColumn->getLength() !== 255) {
$loginNameColumn->setLength(255); $loginNameColumn->setLength(255);
} }
$table->changeColumn('type', [
'notnull' => false,
]);
$table->changeColumn('remember', [
'notnull' => false,
]);
$table->changeColumn('last_activity', [
'notnull' => false,
]);
$table->changeColumn('last_check', [
'notnull' => false,
]);
} }


if ($schema->hasTable('dav_job_status')) { if ($schema->hasTable('dav_job_status')) {
} }
} }


if ($schema->hasTable('jobs')) {
$table = $schema->getTable('jobs');
$table->changeColumn('execution_duration', [
'notnull' => false,
'default' => 0,
]);
}

return $schema; return $schema;
} }
} }

Loading…
Cancel
Save