Skip to content
Snippets Groups Projects
Unverified Commit 9c2e9f26 authored by Julius Härtl's avatar Julius Härtl
Browse files

Add missing table columns


Signed-off-by: default avatarJulius Härtl <jus@bitgrid.net>
parent c8e0f301
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { ...@@ -122,6 +122,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
$table->addIndex(['root_id'], 'mounts_root_index'); $table->addIndex(['root_id'], 'mounts_root_index');
$table->addIndex(['mount_id'], 'mounts_mount_id_index'); $table->addIndex(['mount_id'], 'mounts_mount_id_index');
$table->addUniqueIndex(['user_id', 'root_id'], 'mounts_user_root_index'); $table->addUniqueIndex(['user_id', 'root_id'], 'mounts_user_root_index');
} else {
$table = $schema->getTable('mounts');
$table->addColumn('mount_id', Types::BIGINT, [
'notnull' => false,
'length' => 20,
]);
} }
if (!$schema->hasTable('mimetypes')) { if (!$schema->hasTable('mimetypes')) {
...@@ -416,6 +422,14 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { ...@@ -416,6 +422,14 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
$table->addIndex(['parent'], 'parent_index'); $table->addIndex(['parent'], 'parent_index');
$table->addIndex(['uid_owner'], 'owner_index'); $table->addIndex(['uid_owner'], 'owner_index');
$table->addIndex(['uid_initiator'], 'initiator_index'); $table->addIndex(['uid_initiator'], 'initiator_index');
} else {
$table = $schema->getTable('share');
if (!$table->hasColumn('password')) {
$table->addColumn('password', 'string', [
'notnull' => false,
'length' => 255,
]);
}
} }
if (!$schema->hasTable('jobs')) { if (!$schema->hasTable('jobs')) {
......
...@@ -63,8 +63,17 @@ class Version13000Date20170919121250 extends SimpleMigrationStep { ...@@ -63,8 +63,17 @@ class Version13000Date20170919121250 extends SimpleMigrationStep {
$column->setUnsigned(true); $column->setUnsigned(true);
$column = $table->getColumn('type'); $column = $table->getColumn('type');
$column->setUnsigned(true); $column->setUnsigned(true);
$column = $table->getColumn('remember'); if ($table->hasColumn('remember')) {
$column->setUnsigned(true); $column = $table->getColumn('remember');
$column->setUnsigned(true);
} else {
$table->addColumn('remember', 'smallint', [
'notnull' => true,
'length' => 1,
'default' => 0,
'unsigned' => true,
]);
}
$column = $table->getColumn('last_activity'); $column = $table->getColumn('last_activity');
$column->setUnsigned(true); $column->setUnsigned(true);
$column = $table->getColumn('last_check'); $column = $table->getColumn('last_check');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment