1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-28 10:09:15 +02:00
php-phpbb/phpBB/phpbb/db/doctrine/oci8/schema_manager.php
Máté Bartus a0584b8677 [ticket/16741] Code review fixes
PHPBB3-16741
2021-12-05 11:19:05 +01:00

46 lines
1.0 KiB
PHP

<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\db\doctrine\oci8;
use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\OracleSchemaManager;
use Doctrine\DBAL\Schema\Table;
class schema_manager extends OracleSchemaManager
{
/**
* {@inheritdoc}
*
* Copied from upstream to lowercase 'COMMENTS'
*/
public function listTableDetails($name): Table
{
$table = AbstractSchemaManager::listTableDetails($name);
$platform = $this->_platform;
assert($platform instanceof OraclePlatform);
$sql = $platform->getListTableCommentsSQL($name);
$tableOptions = $this->_conn->fetchAssociative($sql);
if ($tableOptions !== false)
{
$table->addOption('comment', $tableOptions['comments']);
}
return $table;
}
}