Skip to content

Commit 92d3520

Browse files
authored
Merge pull request #29996 from zordsdavini/patch-1
2 parents 0e75eab + ac5bc22 commit 92d3520

File tree

5 files changed

+58
-2
lines changed

5 files changed

+58
-2
lines changed

core/Migrations/Version23000Date20210930122352.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
6060
'notnull' => true,
6161
]);
6262
$table->setPrimaryKey(['id']);
63-
$table->addUniqueIndex(['user_id'], 'user_id');
63+
$table->addUniqueIndex(['user_id'], self::TABLE_NAME . '_user_id_idx');
6464
return $schema;
6565
}
6666

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* @copyright 2021 Christopher Ng <[email protected]>
7+
*
8+
* @author Christopher Ng <[email protected]>
9+
*
10+
* @license GNU AGPL version 3 or any later version
11+
*
12+
* This program is free software: you can redistribute it and/or modify
13+
* it under the terms of the GNU Affero General Public License as
14+
* published by the Free Software Foundation, either version 3 of the
15+
* License, or (at your option) any later version.
16+
*
17+
* This program is distributed in the hope that it will be useful,
18+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
* GNU Affero General Public License for more details.
21+
*
22+
* You should have received a copy of the GNU Affero General Public License
23+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
24+
*
25+
*/
26+
27+
namespace OC\Core\Migrations;
28+
29+
use Closure;
30+
use OCP\DB\ISchemaWrapper;
31+
use OCP\Migration\IOutput;
32+
use OCP\Migration\SimpleMigrationStep;
33+
34+
class Version23000Date20211203110726 extends SimpleMigrationStep {
35+
private const TABLE_NAME = 'profile_config';
36+
37+
/**
38+
* @param IOutput $output
39+
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
40+
* @param array $options
41+
* @return null|ISchemaWrapper
42+
*/
43+
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
44+
/** @var ISchemaWrapper $schema */
45+
$schema = $schemaClosure();
46+
47+
$table = $schema->getTable(self::TABLE_NAME);
48+
if ($table->hasIndex('user_id')) {
49+
$table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx');
50+
return $schema;
51+
}
52+
return null;
53+
}
54+
}

lib/composer/composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,7 @@
987987
'OC\\Core\\Migrations\\Version23000Date20210721100600' => $baseDir . '/core/Migrations/Version23000Date20210721100600.php',
988988
'OC\\Core\\Migrations\\Version23000Date20210906132259' => $baseDir . '/core/Migrations/Version23000Date20210906132259.php',
989989
'OC\\Core\\Migrations\\Version23000Date20210930122352' => $baseDir . '/core/Migrations/Version23000Date20210930122352.php',
990+
'OC\\Core\\Migrations\\Version23000Date20211203110726' => $baseDir . '/core/Migrations/Version23000Date20211203110726.php',
990991
'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php',
991992
'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php',
992993
'OC\\DB\\Adapter' => $baseDir . '/lib/private/DB/Adapter.php',

lib/composer/composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
10161016
'OC\\Core\\Migrations\\Version23000Date20210721100600' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20210721100600.php',
10171017
'OC\\Core\\Migrations\\Version23000Date20210906132259' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20210906132259.php',
10181018
'OC\\Core\\Migrations\\Version23000Date20210930122352' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20210930122352.php',
1019+
'OC\\Core\\Migrations\\Version23000Date20211203110726' => __DIR__ . '/../../..' . '/core/Migrations/Version23000Date20211203110726.php',
10191020
'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php',
10201021
'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php',
10211022
'OC\\DB\\Adapter' => __DIR__ . '/../../..' . '/lib/private/DB/Adapter.php',

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
3131
// when updating major/minor version number.
3232

33-
$OC_Version = [24, 0, 0, 0];
33+
$OC_Version = [24, 0, 0, 1];
3434

3535
// The human readable string
3636
$OC_VersionString = '24.0.0 dev';

0 commit comments

Comments
 (0)