Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use Doctrine\DBAL\Connection;
use Ibexa\Core\FieldType\Url\UrlStorage\Gateway as UrlGateway;
use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway;
use Ibexa\FieldTypeRichText\FieldType\RichText\RichTextStorage\Gateway;

class DoctrineStorage extends Gateway
Expand Down Expand Up @@ -42,7 +43,7 @@ public function getContentIds(array $remoteIds): array
$this->connection->quoteIdentifier('id'),
$this->connection->quoteIdentifier('remote_id')
)
->from('ezcontentobject')
->from(ContentGateway::CONTENT_ITEM_TABLE)
->where($query->expr()->in('remote_id', ':remoteIds'))
->setParameter('remoteIds', $remoteIds, Connection::PARAM_STR_ARRAY)
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

use Doctrine\DBAL\Connection;
use Ibexa\Contracts\FieldTypeRichText\Persistence\Legacy\MigrateRichTextNamespaces\AbstractGateway;
use Ibexa\Core\Persistence\Legacy\Content\Gateway;

/**
* @internal
*/
final class DoctrineDatabase extends AbstractGateway
{
private const TABLE_CONTENT_ATTRIBUTE = 'ezcontentobject_attribute';
private const COLUMN_DATA_TEXT = 'data_text';
private const FIELD_TYPE_IDENTIFIER = 'ezrichtext';

Expand All @@ -31,7 +31,7 @@ public function migrate(array $values): int
{
$queryBuilder = $this->connection->createQueryBuilder();
$queryBuilder
->update(self::TABLE_CONTENT_ATTRIBUTE)
->update(Gateway::CONTENT_FIELD_TABLE)
->set(
self::COLUMN_DATA_TEXT,
$this->addReplaceStatement($queryBuilder, self::COLUMN_DATA_TEXT, $values)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ private function getUrlIdsForContentObjectAttributeIdAndVersionNo(
->select(
$connection->quoteIdentifier('url_id')
)
->from('ezurl_object_link')
->from(DoctrineDatabase::URL_LINK_TABLE)
->where('contentobject_attribute_id = :contentobject_attribute_id')
->andWhere('contentobject_attribute_version = :contentobject_attribute_version')
->setParameter('contentobject_attribute_version', $versionNo, ParameterType::INTEGER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
*/
declare(strict_types=1);

use Ibexa\Core\Persistence\Legacy\Content\Gateway;

return [
'ezcontentobject' => [
Gateway::CONTENT_ITEM_TABLE => [
0 => [
'contentclass_id' => '3',
'current_version' => '1',
Expand Down
Loading