Skip to content

Commit 3ebb898

Browse files
committed
Pick a shorter name for the transfer ownership table
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 8ccf207 commit 3ebb898

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

apps/files/lib/Db/TransferOwnershipMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
class TransferOwnershipMapper extends QBMapper {
3131
public function __construct(IDBConnection $db) {
32-
parent::__construct($db, 'user_transfer_ownership', TransferOwnership::class);
32+
parent::__construct($db, 'user_transfer_owner', TransferOwnership::class);
3333
}
3434

3535
public function getById(int $id): TransferOwnership {

apps/files/lib/Migration/Version11301Date20191113195931.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
4242
/** @var ISchemaWrapper $schema */
4343
$schema = $schemaClosure();
4444

45-
$table = $schema->createTable('user_transfer_ownership');
46-
$table->addColumn('id', 'integer', [
45+
$table = $schema->createTable('user_transfer_owner');
46+
$table->addColumn('id', 'bigint', [
4747
'autoincrement' => true,
4848
'notnull' => true,
49-
'length' => 4,
49+
'length' => 20,
50+
'unsigned' => true,
5051
]);
5152
$table->addColumn('source_user', 'string', [
5253
'notnull' => true,

lib/private/DB/MigrationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ public function ensureOracleIdentifierLengthLimit(Schema $sourceSchema, Schema $
547547
if (!$isUsingDefaultName && \strlen($indexName) > 30) {
548548
throw new \InvalidArgumentException('Primary index name on "' . $table->getName() . '" is too long.');
549549
}
550-
if ($isUsingDefaultName && \strlen($table->getName()) - $prefixLength > 23) {
550+
if ($isUsingDefaultName && \strlen($table->getName()) - $prefixLength >= 23) {
551551
throw new \InvalidArgumentException('Primary index name on "' . $table->getName() . '" is too long.');
552552
}
553553
}

0 commit comments

Comments
 (0)