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
8 changes: 4 additions & 4 deletions data/mysql/cleandata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ VALUES (1, 1),
INSERT INTO `ibexa_content_language` (`disabled`, `id`, `locale`, `name`)
VALUES (0, 2, 'eng-GB', 'English (United Kingdom)');

INSERT INTO `ibexa_content_type` (`always_available`, `contentobject_name`, `created`, `creator_id`, `id`, `identifier`, `initial_language_id`, `is_container`, `language_mask`, `modified`, `modifier_id`, `remote_id`, `serialized_description_list`, `serialized_name_list`, `sort_field`, `sort_order`, `url_alias_name`, `version`)
INSERT INTO `ibexa_content_type` (`always_available`, `contentobject_name`, `created`, `creator_id`, `id`, `identifier`, `initial_language_id`, `is_container`, `language_mask`, `modified`, `modifier_id`, `remote_id`, `serialized_description_list`, `serialized_name_list`, `sort_field`, `sort_order`, `url_alias_name`, `status`)
VALUES (1,'<short_name|name>',1024392098,14,1,'folder',2,1,2,1448831672,14,'a3d405b81be900468eb153d774f4f0d2','a:0:{}','a:1:{s:6:\"eng-GB\";s:6:\"Folder\";}',1,1,NULL,0),
(0,'<short_title|title>',1024392098,14,2,'article',2,1,3,1082454989,14,'c15b600eb9198b1924063b5a68758232',NULL,'a:2:{s:6:\"eng-GB\";s:7:\"Article\";s:16:\"always-available\";s:6:\"eng-GB\";}',1,1,NULL,0),
(1,'<name>',1024392098,14,3,'user_group',2,1,3,1048494743,14,'25b4268cdcd01921b808a0d854b877ef',NULL,'a:2:{s:6:\"eng-GB\";s:10:\"User group\";s:16:\"always-available\";s:6:\"eng-GB\";}',1,1,NULL,0),
(1,'<first_name> <last_name>',1024392098,14,4,'user',2,0,3,1082018364,14,'40faa822edc579b02c25f6bb7beec3ad',NULL,'a:2:{s:6:\"eng-GB\";s:4:\"User\";s:16:\"always-available\";s:6:\"eng-GB\";}',1,1,NULL,0),
(1,'<name>',1031484992,14,5,'image',2,0,3,1048494784,14,'f6df12aa74e36230eb675f364fccd25a',NULL,'a:2:{s:6:\"eng-GB\";s:5:\"Image\";s:16:\"always-available\";s:6:\"eng-GB\";}',1,1,NULL,0),
(1,'<name>',1052385472,14,12,'file',2,0,3,1052385669,14,'637d58bfddf164627bdfd265733280a0',NULL,'a:2:{s:6:\"eng-GB\";s:4:\"File\";s:16:\"always-available\";s:6:\"eng-GB\";}',1,1,NULL,0);

INSERT INTO `ibexa_content_type_field_definition` (`can_translate`, `category`, `content_type_id`, `data_float1`, `data_float2`, `data_float3`, `data_float4`, `data_int1`, `data_int2`, `data_int3`, `data_int4`, `data_text1`, `data_text2`, `data_text3`, `data_text4`, `data_text5`, `data_type_string`, `id`, `identifier`, `is_information_collector`, `is_required`, `is_searchable`, `is_thumbnail`, `placement`, `serialized_data_text`, `serialized_description_list`, `serialized_name_list`, `version`)
INSERT INTO `ibexa_content_type_field_definition` (`can_translate`, `category`, `content_type_id`, `data_float1`, `data_float2`, `data_float3`, `data_float4`, `data_int1`, `data_int2`, `data_int3`, `data_int4`, `data_text1`, `data_text2`, `data_text3`, `data_text4`, `data_text5`, `data_type_string`, `id`, `identifier`, `is_information_collector`, `is_required`, `is_searchable`, `is_thumbnail`, `placement`, `serialized_data_text`, `serialized_description_list`, `serialized_name_list`, `status`)
VALUES (1,'',2,0,0,0,0,255,0,0,0,'New article','','','','','ezstring',1,'title',0,1,1,1,0,NULL,NULL,'a:2:{s:6:\"eng-GB\";s:5:\"Title\";s:16:\"always-available\";s:6:\"eng-GB\";}',0),
(1,'',1,NULL,NULL,NULL,NULL,255,0,NULL,NULL,'Folder',NULL,NULL,NULL,NULL,'ezstring',4,'name',0,1,1,0,1,'N;','a:0:{}','a:1:{s:6:\"eng-GB\";s:4:\"Name\";}',0),
(1,'',3,0,0,0,0,255,0,0,0,'','','','',NULL,'ezstring',6,'name',0,1,1,0,1,NULL,NULL,'a:2:{s:6:\"eng-GB\";s:4:\"Name\";s:16:\"always-available\";s:6:\"eng-GB\";}',0),
Expand All @@ -63,15 +63,15 @@ VALUES (1,'',2,0,0,0,0,255,0,0,0,'New article','','','','','ezstring',1,'title',
(1,'',4,0,0,0,0,10,0,0,0,'','','','','','eztext',179,'signature',0,0,1,0,4,NULL,NULL,'a:2:{s:6:\"eng-GB\";s:9:\"Signature\";s:16:\"always-available\";s:6:\"eng-GB\";}',0),
(1,'',4,10.0,0,0,0,0,0,0,0,'MB','','','','','ezimage',180,'image',0,0,0,1,5,NULL,NULL,'a:2:{s:6:\"eng-GB\";s:5:\"Image\";s:16:\"always-available\";s:6:\"eng-GB\";}',0);

INSERT INTO `ibexa_content_type_group_assignment` (`content_type_id`, `contentclass_version`, `group_id`, `group_name`)
INSERT INTO `ibexa_content_type_group_assignment` (`content_type_id`, `content_type_status`, `group_id`, `group_name`)
VALUES (1, 0, 1, 'Content'),
(2, 0, 1, 'Content'),
(3, 0, 2, 'Users'),
(4, 0, 2, 'Users'),
(5, 0, 3, 'Media'),
(12, 0, 3, 'Media');

INSERT INTO `ibexa_content_type_name` (`content_type_id`, `contentclass_version`, `language_id`, `language_locale`, `name`)
INSERT INTO `ibexa_content_type_name` (`content_type_id`, `content_type_status`, `language_id`, `language_locale`, `name`)
VALUES (1, 0, 2, 'eng-GB', 'Folder'),
(2, 0, 3, 'eng-GB', 'Article'),
(3, 0, 3, 'eng-GB', 'User group'),
Expand Down
8 changes: 4 additions & 4 deletions data/postgresql/cleandata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ VALUES ( 1, 1),
INSERT INTO "ibexa_content_language" ("disabled", "id", "locale", "name")
VALUES (0, 2, 'eng-GB', 'English (United Kingdom)');

INSERT INTO "ibexa_content_type" ("always_available", "contentobject_name", "created", "creator_id", "id", "identifier", "initial_language_id", "is_container", "language_mask", "modified", "modifier_id", "remote_id", "serialized_description_list", "serialized_name_list", "sort_field", "sort_order", "url_alias_name", "version")
INSERT INTO "ibexa_content_type" ("always_available", "contentobject_name", "created", "creator_id", "id", "identifier", "initial_language_id", "is_container", "language_mask", "modified", "modifier_id", "remote_id", "serialized_description_list", "serialized_name_list", "sort_field", "sort_order", "url_alias_name", "status")
VALUES (1,'<short_name|name>',1024392098,14,1,'folder',2,1,2,1448831672,14,'a3d405b81be900468eb153d774f4f0d2','a:0:{}','a:1:{s:6:"eng-GB";s:6:"Folder";}',1,1,NULL,0),
(0,'<short_title|title>',1024392098,14,2,'article',2,1,3,1082454989,14,'c15b600eb9198b1924063b5a68758232',NULL,'a:2:{s:6:"eng-GB";s:7:"Article";s:16:"always-available";s:6:"eng-GB";}',1,1,NULL,0),
(1,'<name>',1024392098,14,3,'user_group',2,1,3,1048494743,14,'25b4268cdcd01921b808a0d854b877ef',NULL,'a:2:{s:6:"eng-GB";s:10:"User group";s:16:"always-available";s:6:"eng-GB";}',1,1,NULL,0),
(1,'<first_name> <last_name>',1024392098,14,4,'user',2,0,3,1082018364,14,'40faa822edc579b02c25f6bb7beec3ad',NULL,'a:2:{s:6:"eng-GB";s:4:"User";s:16:"always-available";s:6:"eng-GB";}',1,1,NULL,0),
(1,'<name>',1031484992,14,5,'image',2,0,3,1048494784,14,'f6df12aa74e36230eb675f364fccd25a',NULL,'a:2:{s:6:"eng-GB";s:5:"Image";s:16:"always-available";s:6:"eng-GB";}',1,1,NULL,0),
(1,'<name>',1052385472,14,12,'file',2,0,3,1052385669,14,'637d58bfddf164627bdfd265733280a0',NULL,'a:2:{s:6:"eng-GB";s:4:"File";s:16:"always-available";s:6:"eng-GB";}',1,1,NULL,0);

INSERT INTO "ibexa_content_type_field_definition" ("can_translate", "category", "content_type_id", "data_float1", "data_float2", "data_float3", "data_float4", "data_int1", "data_int2", "data_int3", "data_int4", "data_text1", "data_text2", "data_text3", "data_text4", "data_text5", "data_type_string", "id", "identifier", "is_information_collector", "is_required", "is_searchable", "is_thumbnail", "placement", "serialized_data_text", "serialized_description_list", "serialized_name_list", "version")
INSERT INTO "ibexa_content_type_field_definition" ("can_translate", "category", "content_type_id", "data_float1", "data_float2", "data_float3", "data_float4", "data_int1", "data_int2", "data_int3", "data_int4", "data_text1", "data_text2", "data_text3", "data_text4", "data_text5", "data_type_string", "id", "identifier", "is_information_collector", "is_required", "is_searchable", "is_thumbnail", "placement", "serialized_data_text", "serialized_description_list", "serialized_name_list", "status")
VALUES (1,'',2,0,0,0,0,255,0,0,0,'New article','','','','','ezstring',1,'title',0,1,1,FALSE,1,NULL,NULL,'a:2:{s:6:"eng-GB";s:5:"Title";s:16:"always-available";s:6:"eng-GB";}',0),
(1,'',1,NULL,NULL,NULL,NULL,255,0,NULL,NULL,'Folder',NULL,NULL,NULL,NULL,'ezstring',4,'name',0,1,1,FALSE,1,'N;','a:0:{}','a:1:{s:6:"eng-GB";s:4:"Name";}',0),
(1,'',3,0,0,0,0,255,0,0,0,'','','','',NULL,'ezstring',6,'name',0,1,1,FALSE,1,NULL,NULL,'a:2:{s:6:"eng-GB";s:4:"Name";s:16:"always-available";s:6:"eng-GB";}',0),
Expand All @@ -63,15 +63,15 @@ VALUES (1,'',2,0,0,0,0,255,0,0,0,'New article','','','','','ezstring',1,'title',
(1,'',4,0,0,0,0,10,0,0,0,'','','','','','eztext',179,'signature',0,0,1,FALSE,4,NULL,NULL,'a:2:{s:6:"eng-GB";s:9:"Signature";s:16:"always-available";s:6:"eng-GB";}',0),
(1,'',4,10.0,0,0,0,0,0,0,0,'MB','','','','','ezimage',180,'image',0,0,0,TRUE,5,NULL,NULL,'a:2:{s:6:"eng-GB";s:5:"Image";s:16:"always-available";s:6:"eng-GB";}',0);

INSERT INTO "ibexa_content_type_group_assignment" ("content_type_id", "contentclass_version", "group_id", "group_name")
INSERT INTO "ibexa_content_type_group_assignment" ("content_type_id", "content_type_status", "group_id", "group_name")
VALUES (1,0,1,'Content'),
(2,0,1,'Content'),
(3,0,2,'Users'),
(4,0,2,'Users'),
(5,0,3,'Media'),
(12,0,3,'Media');

INSERT INTO "ibexa_content_type_name" ("content_type_id", "contentclass_version", "language_id", "language_locale", "name")
INSERT INTO "ibexa_content_type_name" ("content_type_id", "content_type_status", "language_id", "language_locale", "name")
VALUES (1,0,2,'eng-GB','Folder'),
(2,0,3,'eng-GB','Article'),
(3,0,3,'eng-GB','User group'),
Expand Down
14 changes: 7 additions & 7 deletions src/bundle/Core/Resources/config/storage/legacy/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ tables:
ibexa_content_bookmark_user_fk: { fields: [user_id], foreignTable: ibexa_user, foreignFields: [contentobject_id], options: { onDelete: CASCADE, onUpdate: 'NO ACTION' } }
ibexa_content_type:
indexes:
ibexa_content_type_version: { fields: [version] }
ibexa_content_type_identifier: { fields: [identifier, version] }
ibexa_content_type_status: { fields: [status] }
ibexa_content_type_identifier: { fields: [identifier, status] }
id:
id: { type: integer, nullable: false, options: { autoincrement: true } }
version: { type: integer, nullable: false, options: { default: '0' } }
status: { type: integer, nullable: false, options: { default: '0' } }
fields:
always_available: { type: integer, nullable: false, options: { default: '0' } }
contentobject_name: { type: string, nullable: true, length: 255 }
Expand All @@ -144,7 +144,7 @@ tables:
ibexa_content_type_field_definition_dts: { fields: [data_type_string] }
id:
id: { type: integer, nullable: false, options: { autoincrement: true } }
version: { type: integer, nullable: false, options: { default: '0' } }
status: { type: integer, nullable: false, options: { default: '0' } }
fields:
can_translate: { type: integer, nullable: true, options: { default: '1' } }
category: { type: string, nullable: false, length: 25, options: { default: '' } }
Expand Down Expand Up @@ -177,7 +177,7 @@ tables:
ibexa_content_type_field_definition_ml_lang_fk: { fields: [language_id] }
id:
contentclass_attribute_id: { type: integer, nullable: false }
version: { type: integer, nullable: false }
status: { type: integer, nullable: false }
language_id: { type: bigint, nullable: false }
fields:
name: { type: string, nullable: false, length: 255 }
Expand All @@ -189,14 +189,14 @@ tables:
ibexa_content_type_group_assignment:
id:
content_type_id: { type: integer, nullable: false, options: { default: '0' } }
contentclass_version: { type: integer, nullable: false, options: { default: '0' } }
content_type_status: { type: integer, nullable: false, options: { default: '0' } }
group_id: { type: integer, nullable: false, options: { default: '0' } }
fields:
group_name: { type: string, nullable: true, length: 255 }
ibexa_content_type_name:
id:
content_type_id: { type: integer, nullable: false, options: { default: '0' } }
contentclass_version: { type: integer, nullable: false, options: { default: '0' } }
content_type_status: { type: integer, nullable: false, options: { default: '0' } }
language_id: { type: bigint, nullable: false, options: { default: '0' } }
fields:
language_locale: { type: string, nullable: false, length: 20, options: { default: '' } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ protected function getRelationXmlHashFromDB(array $destinationContentIds)
$query->expr()->and(
'ct.id = c.content_type_id',
// in Legacy Storage ibexa_content_type.version contains status (draft, defined)
'ct.version = :content_type_status'
'ct.status = :content_type_status'
)
)
->where(
Expand Down
3 changes: 3 additions & 0 deletions src/lib/Persistence/Legacy/Content/Type/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ abstract public function removeFieldDefinitionTranslation(
): void;

/**
* @deprecated 5.0.0. Use removeByUserAndStatus() instead.
* Remove items created or modified by User.
*/
abstract public function removeByUserAndVersion(int $userId, int $version): void;

abstract public function removeByUserAndStatus(int $userId, int $status): void;
}
Loading
Loading