Version13000Date20170919121250.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. /**
  3. *
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Morris Jobke <hey@morrisjobke.de>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. *
  9. * @license GNU AGPL version 3 or any later version
  10. *
  11. * This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License as
  13. * published by the Free Software Foundation, either version 3 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. */
  25. namespace OC\Core\Migrations;
  26. use OCP\DB\ISchemaWrapper;
  27. use OCP\Migration\IOutput;
  28. use OCP\Migration\SimpleMigrationStep;
  29. /**
  30. * Auto-generated migration step: Please modify to your needs!
  31. */
  32. class Version13000Date20170919121250 extends SimpleMigrationStep {
  33. /**
  34. * @param IOutput $output
  35. * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  36. * @param array $options
  37. * @since 13.0.0
  38. */
  39. public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
  40. }
  41. /**
  42. * @param IOutput $output
  43. * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  44. * @param array $options
  45. * @return null|ISchemaWrapper
  46. * @since 13.0.0
  47. */
  48. public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
  49. /** @var ISchemaWrapper $schema */
  50. $schema = $schemaClosure();
  51. $table = $schema->getTable('jobs');
  52. $column = $table->getColumn('id');
  53. $column->setUnsigned(true);
  54. $table = $schema->getTable('authtoken');
  55. $column = $table->getColumn('id');
  56. $column->setUnsigned(true);
  57. $column = $table->getColumn('type');
  58. $column->setUnsigned(true);
  59. $column = $table->getColumn('remember');
  60. $column->setUnsigned(true);
  61. $column = $table->getColumn('last_activity');
  62. $column->setUnsigned(true);
  63. $column = $table->getColumn('last_check');
  64. $column->setUnsigned(true);
  65. $table = $schema->getTable('bruteforce_attempts');
  66. $column = $table->getColumn('id');
  67. $column->setUnsigned(true);
  68. $column = $table->getColumn('occurred');
  69. $column->setUnsigned(true);
  70. $table = $schema->getTable('comments');
  71. $column = $table->getColumn('id');
  72. $column->setUnsigned(true);
  73. $column = $table->getColumn('parent_id');
  74. $column->setUnsigned(true);
  75. $column = $table->getColumn('topmost_parent_id');
  76. $column->setUnsigned(true);
  77. $column = $table->getColumn('children_count');
  78. $column->setUnsigned(true);
  79. $table = $schema->getTable('file_locks');
  80. $column = $table->getColumn('id');
  81. $column->setUnsigned(true);
  82. $table = $schema->getTable('systemtag');
  83. $column = $table->getColumn('id');
  84. $column->setUnsigned(true);
  85. $table = $schema->getTable('systemtag_object_mapping');
  86. $column = $table->getColumn('systemtagid');
  87. $column->setUnsigned(true);
  88. $table = $schema->getTable('systemtag_group');
  89. $column = $table->getColumn('systemtagid');
  90. $column->setUnsigned(true);
  91. $table = $schema->getTable('vcategory');
  92. $column = $table->getColumn('id');
  93. $column->setUnsigned(true);
  94. $table = $schema->getTable('vcategory_to_object');
  95. $column = $table->getColumn('objid');
  96. $column->setUnsigned(true);
  97. $column = $table->getColumn('categoryid');
  98. $column->setUnsigned(true);
  99. return $schema;
  100. }
  101. /**
  102. * @param IOutput $output
  103. * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  104. * @param array $options
  105. * @since 13.0.0
  106. */
  107. public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
  108. }
  109. }