Database Changes After Adding Liferay Page
Created: 20 December 2024 Modified:What data changes occur when adding a Page to the Types of Rocks site. Pages in liferay are correllated to layouts in the database. This information was added by administrator user Test Test with email test@test.com. Keep in mind that Liferay doesn’t enforce referential integrity in the database. Instead it is “enforced” in the code.
Many tables have columns classNameId and classPK. These act as a psuedo foreign key to the ClassName_ table. The ClassName_ table basically references Java classes. These Java classes have associated database tables. ClassPK contains an identifier that references a row in the table. This seems to be used to add levels of abstraction for second order relationships. In the diagram these columns are referred to as Psuedo Foreign Keys (PFK).
The following table was modified but appears not to be strongly relevant.
- PortalPreferenceValue
Tables that were changed after adding the Page “Types of Rocks”. This page was added to the “All About Rocks” site with GroupId 32925.
- Layout
- Table to page data. Layouts are effectively web pages in Liferay.
- Primary key is plId and ctCollectionId.
- Plids had values 25 and 26.
- LayoutIds had values 5 and 6.
- Names had values Types of Rocks.
- Hidden_ had values were 0 and 1.
- FriendlyUrls had values /types-of-rocks and /b3922f50-9dc0-896d-5522-c3fd538a5f1e.
- GroupIds had values 32925.
- ClassNameIds had values 0 and 20031. Which points to nothing and the com.liferay.portal.kernel.model.Layout in the ClassName_ table.
- ClassPks was 0 and 25.
- The second Layout uses classNameId to self reference to the first layout.
- Unclear why two layout entries exist for one page. Only for the different private/public URLs?
- LayoutFriendlyURL
- Table to store human readable URL data for various languages.
- Primary key is layoutFriendlyURLId and ctCollectionId.
- LayoutFriendlyURLId had value 33072 and 33078.
- FriendlyUrls had values /types-of-rocks and /b3922f50-9dc0-896d-5522-c3fd538a5f1e.
- Plids were values 25 and 26.
- GroupIds had value 32925.
- LayoutPageTemplateStructure
- Primary key is layoutPageTemplateStructureId and ctCollectionId.
- LayoutPageTemplateStructureIds had values 33070 and 33076.
- GroupIds had values 32925.
- Plids were values 25 and 26.
- LayoutPageTemplateStructureRel
- Primary key is lPageTemplateStructureRelId and ctCollectionId.
- LPageTemplateStructureRelId had values 33071 and 33077.
- LayoutPageTemplateStructureIds had values 33070 and 33076.
- SegmentsExperienceIds had value 33069.
- GroupIds had value 32925.
- SegmentsExperience
- Two rows containing default SegmentsExperience entries.
- Primary key is segmentsExperienceId and ctCollectionId.
- SegmentsExperienceId had value 33069.
- Plid had value 25. Pointing to the public layout.
- GroupIds had value 32925.
- SegmentEntryId had value 0.
- SegmentsExperienceKey had value DEFAULT.
- FriendlyURLEntry
- Table to store human readable URL data.
- Primary key is friendlyURLEntryId and ctCollectionId.
- FriendlyURLEntryId had values 33074 and 33080.
- GroupIds had value 32925.
- ClassNameIds had value 20031 which points to com.liferay.portal.kernel.model.Layout.
- ClassPKs had values 25 and 26.
- FriendlyURLEntryLocalization
- Table to store human readable URL data for various languages.
- Primary key is friendlyURLEntryLocalizationId and ctCollectionId.
- FriendlyURLEntryLocalizationIds had values 310 and 311.
- UrlTitles had value /types-of-rocks and /69390bca-ca33-b988-7a51-7f72fcc9f615
- FriendlyURLEntryIds had values 33074 and 33080.
- GroupIds had value 32925.
- ClassNameIds had value 31694 which points to com.liferay.portal.kernel.model.Layout-false.
- ClassPKs had values 25 and 26.
- Why the duplication between FriendlyUrl, LayoutFriendlyURl and Layout in URL fields?
- FriendlyURLEntryMapping
- Table to store human readable URL data for various languages.
- Primary key is friendlyURLEntryMappingId and ctCollectionId.
- FriendlyURLEntryMappingIds had values 33073 and 33079.
- FriendlyURLEntryIds had values 33074 and 33080.
- ClassNameIds had value 31694 which points to com.liferay.portal.kernel.model.Layout-false.
- ClassPKs had values 25 and 26.
- What is the purpose of this table that isn’t covered by FriendlyURLEntryLocalization?
- AssetEntry
- Table to track assets. In Liferay pretty much anything can be an asset.
- Primary key is entryId and ctCollectionId.
- EntryIds had values 33075 and 33081.
- UserId had value 20123. Test Test admin user.
- GroupIds had value 32925.
- ClassNameIds had value 20031 which points to com.liferay.portal.kernel.model.Layout.
- ClassPKs had values 25 and 26.
- ResourcePermission
- Primary key is resourcePermissionId and ctCollectionId.
- ResourcePermissionIds had values 3646, 3647, 3648, 3649, 3650 and 3651.
- Names had value com.liferay.portal.kernel.model.Layout.
- PrimKeys had values 25 and 26. Three records each.
- RoleIds had values 20103, 20111 and 20102. Which points to Owner, Site Member and Guest roles.
- OwnerIds had value 20123, 0 and 0.
- PortletPreferences
- Primary key is portletPreferencesId and ctCollectionId.
- PortletPreferencesId had values 33082, 33083, 33084, 33085, 33086, 33087, 33088, 33089 and 33090.
- portletPreferencesId, plid, portletId
- 33082, 0, com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet
- 33083, 26, com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet
- 33084, 26, com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet
- 33085, 0, com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageToolbarPortlet
- 33086, 26, com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageToolbarPortlet
- 33087, 0, com_liferay_portal_search_web_search_bar_portlet_SearchBarPortlet_INSTANCE_templateSearch
- 33088, 26, com_liferay_portal_search_web_search_bar_portlet_SearchBarPortlet_INSTANCE_templateSearch
- 33089, 0, com_liferay_product_navigation_user_personal_bar_web_portlet_ProductNavigationUserPersonalBarPortlet
- 33090, 26, com_liferay_product_navigation_user_personal_bar_web_portlet_ProductNavigationUserPersonalBarPortlet
- PortletPreferenceValue
- Primary key is portletPreferenceValueId and ctCollectionId.
- PortletPreferenceValueIds had values 709, 710, 711 and 712.
- PortletPreferencesIds had values 33087 and 33088. Two rows each.
- Names had values destination and portletSetupPortletDecoratorId.
- Smallvalues had values /search and barebone.
Diagram is only showing the relationships most relevant.
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - page - 7.4