Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ protected function schemaToMigration(Schema $schema) {
EOT
);
}
if ($column->getUnsigned()) {
$content .= <<<'EOT'
'unsigned' => true,

EOT;
}

$content .= <<<'EOT'
]);

Expand Down
36 changes: 19 additions & 17 deletions core/Migrations/Version13000Date20170718121200.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@

class Version13000Date20170718121200 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
Expand Down Expand Up @@ -416,6 +407,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('class', 'string', [
'notnull' => true,
Expand Down Expand Up @@ -472,6 +464,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('uid', 'string', [
'notnull' => true,
Expand Down Expand Up @@ -499,21 +492,25 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'notnull' => true,
'length' => 2,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('remember', 'smallint', [
'notnull' => true,
'length' => 1,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('last_activity', 'integer', [
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('last_check', 'integer', [
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('scope', 'text', [
'notnull' => false,
Expand All @@ -529,6 +526,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('action', 'string', [
'notnull' => true,
Expand All @@ -539,6 +537,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('ip', 'string', [
'notnull' => true,
Expand Down Expand Up @@ -566,6 +565,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('uid', 'string', [
'notnull' => true,
Expand Down Expand Up @@ -594,11 +594,13 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('categoryid', 'integer', [
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('type', 'string', [
'notnull' => true,
Expand All @@ -615,6 +617,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('name', 'string', [
'notnull' => true,
Expand Down Expand Up @@ -651,6 +654,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping');
}
Expand All @@ -661,6 +665,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('gid', 'string', [
'notnull' => true,
Expand All @@ -674,6 +679,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('lock', 'integer', [
'notnull' => true,
Expand All @@ -700,21 +706,25 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
'length' => 4,
'unsigned' => true,
]);
$table->addColumn('parent_id', 'integer', [
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('topmost_parent_id', 'integer', [
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('children_count', 'integer', [
'notnull' => true,
'length' => 4,
'default' => 0,
'unsigned' => true,
]);
$table->addColumn('actor_type', 'string', [
'notnull' => true,
Expand Down Expand Up @@ -905,12 +915,4 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
return $schema;
}

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}
}
102 changes: 102 additions & 0 deletions core/Migrations/Version13000Date20170919121250.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php
namespace OC\Core\Migrations;

use Doctrine\DBAL\Schema\Schema;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;

/**
* Auto-generated migration step: Please modify to your needs!
*/
class Version13000Date20170919121250 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @return null|Schema
* @since 13.0.0
*/
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
/** @var Schema $schema */
$schema = $schemaClosure();

$table = $schema->getTable('jobs');
$column = $table->getColumn('id');
$column->setUnsigned(true);

$table = $schema->getTable('authtoken');
$column = $table->getColumn('id');
$column->setUnsigned(true);
$column = $table->getColumn('type');
$column->setUnsigned(true);
$column = $table->getColumn('remember');
$column->setUnsigned(true);
$column = $table->getColumn('last_activity');
$column->setUnsigned(true);
$column = $table->getColumn('last_check');
$column->setUnsigned(true);

$table = $schema->getTable('bruteforce_attempts');
$column = $table->getColumn('id');
$column->setUnsigned(true);
$column = $table->getColumn('occurred');
$column->setUnsigned(true);

$table = $schema->getTable('comments');
$column = $table->getColumn('id');
$column->setUnsigned(true);
$column = $table->getColumn('parent_id');
$column->setUnsigned(true);
$column = $table->getColumn('topmost_parent_id');
$column->setUnsigned(true);
$column = $table->getColumn('children_count');
$column->setUnsigned(true);

$table = $schema->getTable('file_locks');
$column = $table->getColumn('id');
$column->setUnsigned(true);

$table = $schema->getTable('systemtag');
$column = $table->getColumn('id');
$column->setUnsigned(true);

$table = $schema->getTable('systemtag_object_mapping');
$column = $table->getColumn('systemtagid');
$column->setUnsigned(true);

$table = $schema->getTable('systemtag_group');
$column = $table->getColumn('systemtagid');
$column->setUnsigned(true);

$table = $schema->getTable('vcategory');
$column = $table->getColumn('id');
$column->setUnsigned(true);

$table = $schema->getTable('vcategory_to_object');
$column = $table->getColumn('objid');
$column->setUnsigned(true);
$column = $table->getColumn('categoryid');
$column->setUnsigned(true);

return $schema;
}

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}
}
1 change: 1 addition & 0 deletions lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@
'OC\\Core\\Migrations\\Version13000Date20170705121758' => $baseDir . '/core/Migrations/Version13000Date20170705121758.php',
'OC\\Core\\Migrations\\Version13000Date20170718121200' => $baseDir . '/core/Migrations/Version13000Date20170718121200.php',
'OC\\Core\\Migrations\\Version13000Date20170814074715' => $baseDir . '/core/Migrations/Version13000Date20170814074715.php',
'OC\\Core\\Migrations\\Version13000Date20170919121250' => $baseDir . '/core/Migrations/Version13000Date20170919121250.php',
'OC\\DB\\Adapter' => $baseDir . '/lib/private/DB/Adapter.php',
'OC\\DB\\AdapterMySQL' => $baseDir . '/lib/private/DB/AdapterMySQL.php',
'OC\\DB\\AdapterOCI8' => $baseDir . '/lib/private/DB/AdapterOCI8.php',
Expand Down
1 change: 1 addition & 0 deletions lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Core\\Migrations\\Version13000Date20170705121758' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170705121758.php',
'OC\\Core\\Migrations\\Version13000Date20170718121200' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170718121200.php',
'OC\\Core\\Migrations\\Version13000Date20170814074715' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170814074715.php',
'OC\\Core\\Migrations\\Version13000Date20170919121250' => __DIR__ . '/../../..' . '/core/Migrations/Version13000Date20170919121250.php',
'OC\\DB\\Adapter' => __DIR__ . '/../../..' . '/lib/private/DB/Adapter.php',
'OC\\DB\\AdapterMySQL' => __DIR__ . '/../../..' . '/lib/private/DB/AdapterMySQL.php',
'OC\\DB\\AdapterOCI8' => __DIR__ . '/../../..' . '/lib/private/DB/AdapterOCI8.php',
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.

$OC_Version = array(13, 0, 0, 3);
$OC_Version = array(13, 0, 0, 4);

// The human readable string
$OC_VersionString = '13.0.0 alpha';
Expand Down