Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d289b2b
IBX-9941: Renamed ezbinaryfile to ibexa_binaryfile
ViniTou May 16, 2025
f6dedad
IBX-9941: Renamed ezcobj_state to ibexa_cobj_state
ViniTou May 16, 2025
af54318
IBX-9941: Renamed ezcobj_state_group to ibexa_cobj_state_group
ViniTou May 16, 2025
b728bd4
IBX-9941: Renamed ezcobj_state_group_language to ibexa_cobj_state_gro…
ViniTou May 16, 2025
292bfb1
IBX-9941: Renamed ezcobj_state_language to ibexa_cobj_state_language
ViniTou May 16, 2025
4bf8368
IBX-9941: Renamed ezcobj_state_link to ibexa_cobj_state_link
ViniTou May 16, 2025
ea81c5b
IBX-9941: Renamed object state related select values names
ViniTou May 16, 2025
08d2f6a
IBX-9941: Renamed ezcontent_language into ibexa_content_language
ViniTou May 19, 2025
68ed470
IBX-9941: Renamed ezcontentbrowsebookmark into ibexa_content_browsebo…
ViniTou May 19, 2025
9f09893
IBX-9941: Renamed ezcontentclass into ibexa_content_type
ViniTou May 19, 2025
7617c53
IBX-9941: Renamed ezcontentobject into ibexa_content
ViniTou May 20, 2025
d2ba6c5
IBX-9941: Renamed ibexa_cobj_state into ibexa_object_state
ViniTou May 20, 2025
4fa0826
IBX-9941: Renamed ezdfsfile into ibexa_dfs_file
ViniTou May 20, 2025
e21d9df
IBX-9941: Renamed ibexa_binaryfile into ibexa_binary_file
ViniTou May 20, 2025
2d20c98
IBX-9941: Renamed ezgmaplocation into ibexa_map_location
ViniTou May 21, 2025
84d011e
IBX-9941: Renamed ezimagefile into ibexa_image_file
ViniTou May 21, 2025
36c6efc
IBX-9941: Renamed ezkeyword into ibexa_keyword
ViniTou May 21, 2025
5505d7e
IBX-9941: Renamed ezmedia into ibexa_media
ViniTou May 21, 2025
d4b73fb
IBX-9941: Renamed eznode_assignment into ibexa_node_assignment
ViniTou May 21, 2025
df69f18
IBX-9941: Renamed eznotification into ibexa_notification
ViniTou May 21, 2025
e8bb8a9
IBX-9941: Renamed ezpackage into ibexa_package
ViniTou May 21, 2025
34454d5
IBX-9941: Renamed ezpolicy into ibexa_policy
ViniTou May 21, 2025
1413a40
IBX-9941: Renamed ezpreferences into ibexa_preferences
ViniTou May 21, 2025
e87ff74
IBX-9941: Renamed ezrole into ibexa_role
ViniTou May 21, 2025
f40f4c8
IBX-9941: Renamed ezsearch into ibexa_search
ViniTou May 21, 2025
a80f117
IBX-9941: Renamed ezsection into ibexa_section
ViniTou May 21, 2025
47f04eb
IBX-9941: Renamed ezsite_data into ibexa_site_data
ViniTou May 21, 2025
fb8cffd
IBX-9941: Renamed ezurl into ibexa_url
ViniTou May 21, 2025
8f02a53
IBX-9941: Renamed ezuser into ibexa_user
ViniTou May 22, 2025
d5ebfae
IBX-9941: Imported classes with table names
ViniTou May 23, 2025
9ba3641
IBX-9941: Renamed ibexa_content_type_attribute into ibexa_content_typ…
ViniTou May 26, 2025
c830e74
IBX-9941: Replaced ibexa_content_trash with const
ViniTou May 27, 2025
b583010
IBX-9941: Replaced ibexa_content_attribute with ibexa_content_field &…
ViniTou May 27, 2025
714182c
IBX-9941: Renamed ibexa_keyword_attribute_link to ibexa_keyword_field…
ViniTou May 27, 2025
ffdf9e7
IBX-9941: Renamed ibexa_content_browsebookmark to ibexa_content_bookmark
ViniTou May 29, 2025
16cd3ef
IBX-9941: Renamed ibexa_content_link to ibexa_content_relation
ViniTou May 29, 2025
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
62 changes: 31 additions & 31 deletions data/mysql/cleandata.sql

Large diffs are not rendered by default.

124 changes: 62 additions & 62 deletions data/postgresql/cleandata.sql

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/bundle/Core/Command/CleanupVersionsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo;
use Ibexa\Core\Base\Exceptions\InvalidArgumentException;
use Ibexa\Core\Persistence\Legacy\Content\Gateway;
use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway as ContentTypeGateway;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
Expand Down Expand Up @@ -247,9 +249,9 @@ protected function getObjectsIds($keep, $status, $excludedContentTypes = [])
{
$query = $this->connection->createQueryBuilder()
->select('c.id')
->from('ezcontentobject', 'c')
->join('c', 'ezcontentobject_version', 'v', 'v.contentobject_id = c.id')
->join('c', 'ezcontentclass', 'cl', 'cl.id = c.contentclass_id')
->from(Gateway::CONTENT_ITEM_TABLE, 'c')
->join('c', Gateway::CONTENT_VERSION_TABLE, 'v', 'v.contentobject_id = c.id')
->join('c', ContentTypeGateway::CONTENT_TYPE_TABLE, 'cl', 'cl.id = c.contentclass_id')
->groupBy('c.id', 'v.status')
->having('count(c.id) > :keep');
$query->setParameter('keep', $keep);
Expand Down
11 changes: 6 additions & 5 deletions src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use DateTime;
use DateTimeZone;
use Doctrine\DBAL\Connection;
use Ibexa\Core\Persistence\Legacy\Content\Gateway;
use RuntimeException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
Expand Down Expand Up @@ -295,8 +296,8 @@ protected function getTimestampBasedFields($offset, $limit)
$query = $this->connection->createQueryBuilder();
$query
->select('a.id, a.version, a.data_int')
->from('ezcontentobject_attribute', 'a')
->join('a', 'ezcontentobject_version', 'v', 'a.contentobject_id = v.contentobject_id')
->from(Gateway::CONTENT_FIELD_TABLE, 'a')
->join('a', Gateway::CONTENT_VERSION_TABLE, 'v', 'a.contentobject_id = v.contentobject_id')
->where(
$query->expr()->in(
'a.data_type_string',
Expand Down Expand Up @@ -335,8 +336,8 @@ protected function countTimestampBasedFields(): int
$query = $this->connection->createQueryBuilder();
$query
->select('count(*) as count')
->from('ezcontentobject_attribute', 'a')
->join('a', 'ezcontentobject_version', 'v', 'a.contentobject_id = v.contentobject_id')
->from(Gateway::CONTENT_FIELD_TABLE, 'a')
->join('a', Gateway::CONTENT_VERSION_TABLE, 'v', 'a.contentobject_id = v.contentobject_id')
->where(
$query->expr()->in(
'a.data_type_string',
Expand Down Expand Up @@ -462,7 +463,7 @@ protected function updateTimestampToUTC(
) {
$query = $this->connection->createQueryBuilder();
$query
->update('ezcontentobject_attribute', 'a')
->update(Gateway::CONTENT_FIELD_TABLE, 'a')
->set('a.data_int', $newTimestamp)
->set('a.sort_key_int', $newTimestamp)
->where('a.id = :id')
Expand Down
9 changes: 5 additions & 4 deletions src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Ibexa\Bundle\Core\Command;

use Doctrine\DBAL\Connection;
use Ibexa\Core\Persistence\Legacy\Content\Gateway;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -162,7 +163,7 @@ private function getDuplicatedAttributeTotalCount(
$query = $this->connection->createQueryBuilder()
->select('COUNT(a.id) as instances')
->groupBy('version', 'contentclassattribute_id', 'contentobject_id', 'language_id')
->from('ezcontentobject_attribute', 'a')
->from(Gateway::CONTENT_FIELD_TABLE, 'a')
->having('instances > 1');

$count = (int) $query->executeQuery()->rowCount();
Expand Down Expand Up @@ -195,7 +196,7 @@ private function getDuplicatedAttributesBatch(int $batchSize): array
$query
->select('version', 'contentclassattribute_id', 'contentobject_id', 'language_id')
->groupBy('version', 'contentclassattribute_id', 'contentobject_id', 'language_id')
->from('ezcontentobject_attribute')
->from(Gateway::CONTENT_FIELD_TABLE)
->having('COUNT(id) > 1')
->setFirstResult(0)
->setMaxResults($batchSize);
Expand All @@ -219,7 +220,7 @@ private function getDuplicatedAttributeIds(array $attribute): array

$query
->select('id')
->from('ezcontentobject_attribute')
->from(Gateway::CONTENT_FIELD_TABLE)
->andWhere('version = :version')
->andWhere('contentclassattribute_id = :contentclassattribute_id')
->andWhere('contentobject_id = :contentobject_id')
Expand Down Expand Up @@ -256,7 +257,7 @@ private function deleteAttributes(array $ids): int
$query = $this->connection->createQueryBuilder();

$query
->delete('ezcontentobject_attribute')
->delete(Gateway::CONTENT_FIELD_TABLE)
->andWhere($query->expr()->in('id', array_map('strval', $ids)));

return (int)$query->executeStatement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Ibexa\Core\IO\IOConfigProvider;

/**
* Iterator for entries in legacy's ezimagefile table.
* Iterator for entries in legacy's ibexa_image_file table.
*
* The returned items are id of Image BinaryFile (ibexa-mountains/mount-aconcagua/605-1-eng-GB/Mount-Aconcagua.jpg).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Result;
use Ibexa\Core\FieldType\Image\ImageStorage\Gateway\DoctrineStorage;
use LogicException;

class LegacyStorageImageFileRowReader implements ImageFileRowReader
Expand All @@ -26,7 +27,7 @@ public function __construct(Connection $connection)
public function init()
{
$selectQuery = $this->connection->createQueryBuilder();
$selectQuery->select('filepath')->from('ezimagefile');
$selectQuery->select('filepath')->from(DoctrineStorage::IMAGE_FILE_TABLE);
$this->result = $selectQuery->executeQuery();
}

Expand Down
Loading
Loading