Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-09-19 15:19:33 +0300
committerJoas Schilling <coding@schilljs.com>2017-09-19 21:09:10 +0300
commitd5c2b98207378e3dc548fc7290fb0d8ebd27188e (patch)
tree03a098044647a89da2254f110ca8f12be6b4c734 /core/Migrations
parent11d2006b44b7d70e11f74e941de52a41d934d5e0 (diff)
Fix missing "unsigned" on integer columns
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Migrations')
-rw-r--r--core/Migrations/Version13000Date20170718121200.php36
-rw-r--r--core/Migrations/Version13000Date20170919121250.php102
2 files changed, 121 insertions, 17 deletions
diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php
index 4e61e3e2814..d8d66696a14 100644
--- a/core/Migrations/Version13000Date20170718121200.php
+++ b/core/Migrations/Version13000Date20170718121200.php
@@ -33,15 +33,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`
- * @param array $options
* @return null|Schema
* @since 13.0.0
*/
@@ -416,6 +407,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
'length' => 4,
+ 'unsigned' => true,
]);
$table->addColumn('class', 'string', [
'notnull' => true,
@@ -472,6 +464,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
'length' => 4,
+ 'unsigned' => true,
]);
$table->addColumn('uid', 'string', [
'notnull' => true,
@@ -499,21 +492,25 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'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,
@@ -529,6 +526,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
'length' => 4,
+ 'unsigned' => true,
]);
$table->addColumn('action', 'string', [
'notnull' => true,
@@ -539,6 +537,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'notnull' => true,
'length' => 4,
'default' => 0,
+ 'unsigned' => true,
]);
$table->addColumn('ip', 'string', [
'notnull' => true,
@@ -566,6 +565,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
'length' => 4,
+ 'unsigned' => true,
]);
$table->addColumn('uid', 'string', [
'notnull' => true,
@@ -594,11 +594,13 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'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,
@@ -615,6 +617,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
'length' => 4,
+ 'unsigned' => true,
]);
$table->addColumn('name', 'string', [
'notnull' => true,
@@ -651,6 +654,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'notnull' => true,
'length' => 4,
'default' => 0,
+ 'unsigned' => true,
]);
$table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping');
}
@@ -661,6 +665,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'notnull' => true,
'length' => 4,
'default' => 0,
+ 'unsigned' => true,
]);
$table->addColumn('gid', 'string', [
'notnull' => true,
@@ -674,6 +679,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'autoincrement' => true,
'notnull' => true,
'length' => 4,
+ 'unsigned' => true,
]);
$table->addColumn('lock', 'integer', [
'notnull' => true,
@@ -700,21 +706,25 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
'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,
@@ -905,12 +915,4 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
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) {
- }
}
diff --git a/core/Migrations/Version13000Date20170919121250.php b/core/Migrations/Version13000Date20170919121250.php
new file mode 100644
index 00000000000..c709875984c
--- /dev/null
+++ b/core/Migrations/Version13000Date20170919121250.php
@@ -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) {
+ }
+}