Database Changes After Adding Liferay Web Content
Created: 19 December 2024 Modified:What data changes occur when adding Web Content to Liferay. 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 Web Content “Igneous Rocks”.
- JournalArticle
- Primary key is id_ and ctCollectionId.
- Id_ was 33013.
- ResourcePrimKey had value 33014.
- GroupId had value 20117. Which is the Guest site/group.
- Userid had value 20123. Test Test Admin user.
- ArticleId had value 33012.
- DDMStructureId had value 30029. Which points to the BASIC-WEB-CONTENT DDMStructure.
- ClassNameId and ClassPK were 0.
- JournalArticleLocalization
- Primary key is articleLocalizationId and ctCollectionId.
- ArticleLocalizationId was 33017.
- ArticlePK had value 33013.
- JournalArticleResource
- Primary key is resourcePrimKey and ctCollectionId.
- ResourcePrimKey was 33014.
- GroupId had value 20117. Which is the Guest site/group.
- ArticleId had value 33012.
- DDMStructureLink
- Primary key is structureLinkId and ctCollectionId.
- StructureLinkId was 33020.
- StructureId was 30029. Which points to the BASIC-WEB-CONTENT DDMStructure.
- ClassNameId was 28838 which points to com.liferay.journal.model.JournalArticle in the ClassName_ table.
- ClassPk was 33013.
- DDMTemplateLink
- Primary key is templateLinkId and ctCollectionId.
- TemplateLinkId was 33021.
- TemplateId was 30033.
- ClassNameId was 28838 which points to com.liferay.journal.model.JournalArticle in the ClassName_ table.
- ClassPk was 33013.
- DDMStorageLink
- Primary key is storageLinkId and ctCollectionId.
- StorageLinkId had value 31728.
- StructureId was 30603. Which points to DDMStructure TIKARAWMETADATA.
- StructureVersionId was 30604.
- ClassNameId was 28436 which points to com.liferay.dynamic.data.mapping.model.DDMContent in the ClassName_ table.
- ClassPk was 31725.
- DDMContent table was empty. That begs the question as to what this is pointing to.
- DDMField
- Primary key is fieldId and ctCollectionId.
- FieldId had values 101 and 102.
- StorageIds had value 33013.
- StructureVersionIds had value 30030.
- FieldTypes had values rich_text and null.
- DDMFieldAttribute
- Primary key is fieldAttributeId and ctCollectionId.
- FieldAttributeIds had values 101, 102 and 103.
- FieldIds had values 101, 101 and 102.
- StorageIds had value 33013.
- SocialActivity
- Primary key is activityId and ctCollectionId.
- ActivityIds had values 101 and 102.
- UserIds had values 20096 and 20123.
- GroupIds had values 32925 and 20117. Pointing to All About Rocks and Guest sites.
- ActivitySetIds had values 33006 and 33022.
- ClassNameIds were 28809 and 28838. Which points to com.liferay.wiki.model.WikiPage and com.liferay.journal.model.JournalArticle in the ClassName_ table.
- ClassPks were 33004 and 33014.
- SocialActivitySet
- Primary key is activitySetId and ctCollectionId.
- ActivitySetId had value 33022.
- GroupId had value 20117. Pointing to Guest site.
- UserId had value 20123.
- ActivitySetIds had values 33006 and 33022.
- ClassNameId had value 28838. Which points to com.liferay.journal.model.JournalArticle in the ClassName_ table.
- ClassPks had value 33014.
- ResourcePermission
- Primary key is resourcePermissionId and ctCollectionId.
- ResourcePermissionIds had values 3632, 3633 and 3634.
- Names had value com.liferay.journal.model.JournalArticle.
- PrimKeys had value 33014.
- RoleIds had values 20103, 20111 and 20102. Which points to Owner, Site Member and Guest roles.
- OwnerIds had value 20123, 0 and 0.
- FriendlyURLEntry
- Table to store human readable URL data.
- Primary key is friendlyURLEntryId and ctCollectionId.
- FriendlyURLEntryId had values 33016.
- GroupId had value 20117.
- ClassNameId had value 28838 which points to com.liferay.journal.model.JournalArticle.
- ClassPK had value 33014.
- FriendlyURLEntryLocalization
- Table to store human readable URL data for various languages.
- Primary key is friendlyURLEntryLocalizationId and ctCollectionId.
- FriendlyURLEntryLocalizationId had value 306.
- FriendlyURLEntryId had value 33016.
- GroupId had value 20117.
- ClassNameId had value 28838 which points to com.liferay.journal.model.JournalArticle.
- ClassPK had value 33014.
- FriendlyURLEntryMapping
- Table to store human readable URL data for various languages.
- Primary key is friendlyURLEntryMappingId and ctCollectionId.
- FriendlyURLEntryMappingId had value 33015.
- FriendlyURLEntryId had value 33016.
- ClassNameId had value 28838 which points to com.liferay.journal.model.JournalArticle.
- ClassPK had value 33014.
- AssetEntry
- Table to track assets. In Liferay pretty much anything can be an asset.
- Primary key is entryId and ctCollectionId.
- EntryId had value 33018.
- UserId had value 20123. Test Test admin user.
- ClassNameId had value 28838 which points to com.liferay.journal.model.JournalArticle.
- ClassPK had value 33014.
Diagram is only showing the relationships most relevant.
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - web content - 7.4