Database Changes After Adding Liferay Site
Created: 16 December 2024 Modified:What data changes occur when a Site is added to Liferay. In the database sites are stored in the Group_ table.
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.
Tables that were changed after adding the Site “All About Rocks”.
- Group_
- Table to store site data.
- Row added for account All About Rocks.
- GroupId was 32925.
- Foreign key userId has value 20123. This references the Adminstrator account that added the data.
- ClassNameId was 20029 which points to com.liferay.portal.kernel.model.Group in the ClassName_ table.
- ClassPk was 32925 which self referentially points to itself.
- AssetEntry
- Table to store asset relationships.
- Primary key is entryId and ctCollectionId.
- EntryIds had values 32973, 32967, 32941, 32935 and 32926.
- One row was added for All About Rocks site.
- Four rows were added for layouts.
- All five rows are associated using ClassNameId and ClassPK.
- Layout
- Table to page data. Layouts are effectively web pages in Liferay.
- Primary key is plId and ctCollectionId.
- Plids had values 21, 20, 19 and 18.
- All four groupIds had value 32925.
- These represent four error pages. Two 500 and two 404.
- One 500 and one 404 layout were self referential using ClassNameId and ClassPK.
- In the interface these are classified as Utility Pages.
- SegmentsExperience
- Two rows containing default SegmentsExperience entries.
- Primary key is segmentsExperienceId and ctCollectionId.
- SegmentsExperienceId had values 32961 and 32929.
- Plids had values 20 and 18.
- GroupIds had value 32925.
- SegmentEntryIds had value 0.
- FragmentEntryLink
- Primary key is fragmentEntryLinkId and ctCollectionId.
- FragmentEntryLinkId had value 32987, 32986, 32985, 32984, 32983, 32978, 32977, 32976, 32975, 32974, 32955, 32954, 32953, 32952, 32951, 32946, 32945, 32944, 32943 and 32942.
- All twenty groupIds had value 32925.
- SegmentsExperienceIds had values 32961 and 32929. 10 rows for each SegmentsExperience.
- FragmentEntryIds had value 0.
- ClassNameId and ClassPK point to the above layouts. 5 fragment links for each of the four layouts.
- FriendlyURLEntry
- Table to store human readable URL data.
- Primary key is friendlyURLEntryId and ctCollectionId.
- FriendlyURLEntryIds had values 32972, 32966, 32940 and 32934.
- GroupIds had value 32925.
- FragmentEntryIds had value 0.
- ClassNameIds were 31694 which points com.liferay.portal.kernel.model.Layout-false.
- ClassPKs point to the above layouts with values 21, 20, 19 and 18.
- FriendlyURLEntryLocalization
- Table to store human readable URL data for various languages.
- Primary key is friendlyURLEntryLocalizationId and ctCollectionId.
- FriendlyURLEntryLocalizationId had value 304, 303, 302 and 301.
- GroupIds had value 32925.
- FriendlyURLEntryIds had values 32972, 32966, 32940 and 32934.
- ClassNameIds were 31694 which points com.liferay.portal.kernel.model.Layout-false.
- ClassPKs point to the above layouts with values 21, 20, 19 and 18.
- FriendlyURLEntryMapping
- Table to store human readable URL data for various languages.
- Primary key is friendlyURLEntryMappingId and ctCollectionId.
- FriendlyURLEntryMappingId had value 32971, 32965, 32939 and 32933.
- FriendlyURLEntryIds had values 32972, 32966, 32940 and 32934.
- ClassNameIds were 31694 which points com.liferay.portal.kernel.model.Layout-false.
- ClassPKs point to the above layouts with values 21, 20, 19 and 18.
- LayoutFriendlyURL
- Table to store human readable URL data for various languages.
- Primary key is layoutFriendlyURLId and ctCollectionId.
- LayoutFriendlyURLId had value 32970, 32964, 32938 and 32932.
- Plids were values 21, 20, 19 and 18.
- LayoutPageTemplateStructure
- Primary key is layoutPageTemplateStructureId and ctCollectionId.
- LayoutPageTemplateStructureIds had values 32990, 32981, 32958 and 32949.
- GroupIds had values 32925.
- Plids were values 21, 20, 19 and 18.
- LayoutPageTemplateStructureRel
- Primary key is lPageTemplateStructureRelId and ctCollectionId.
- LPageTemplateStructureRelId had values 32991, 32982, 32959 and 32950.
- LayoutPageTemplateStructureIds had values 32990, 32981, 32958 and 32949.
- SegmentsExperienceIds had values 32961 and 32929.
- GroupIds had values 32925.
- LayoutUtilityPageEntry
- Primary key is LayoutUtilityPageEntryId and ctCollectionId.
- LayoutUtilityPageEntryId had values 32960 and 32928.
- Plids had values 20 and 18.
- GroupIds had values 32925.
- PortletPreferences
- Primary key is PortletPreferencesId and ctCollectionId.
- PortletPreferencesId had values 32993 and 32992.
- PortletIds were value com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet.
- Plids had values 1 and 0.
- GroupIds had values 32925 and 0.
- PortletPreferences
- Primary key is PortletPreferencesId and ctCollectionId.
- PortletPreferencesId had values 32993 and 32992.
- PortletIds were value com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet.
- Plids had values 1 and 0.
- GroupIds had values 32925 and 0.
- SystemEvent
- Primary key is systemEventId and ctCollectionId.
- This data appears to have been ephemeral and was gone after 24 hours.
- SystemEventId had values 32947, 32956, 32979 and 32988.
- GroupIds were value 32925.
- Plids had values 1 and 0.
- ClassNameIds were 28981 which points com.liferay.layout.page.template.model.LayoutPageTemplateStructure.
- ClassPKs point to the above template structures with values 32936, 32930, 32968 and 32962.
- UserGroupRole
- Primary key is userGroupRoleId and ctCollectionId.
- UserGroupRoleId had value 101.
- GroupId had value 32925.
- RoleId had value 20112. Site Owner Role.
- UserId had value 20123. Test Test admin user.
- Users_Groups
- Primary key is groupId, userId and ctCollectionId.
- GroupId had value 32925.
- UserId had value 20123. Test Test admin user.
Diagram is only showing the relationships most relevant.
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - site