Database Changes After Adding Liferay Organization
Created: 26 November 2024 Modified:What data changes occur when an organization is added to Liferay. Added organization Bedstone. This user 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.
Liferay has many moving parts. I did not include tables that were changed but did not appear to be associated with adding the new organziation. Original data dumps containing all changes are available. Removed tables are as follows
- ViewCountEntry
- Configuration_
- Contact_
- Counter
Tables that were changed after adding the new organization Bedstone.
- Organziation_
- Table to store organization data.
- Primary key is organizationId.
- Row was added for Bedstone
- OrganizationId for Bedstone is 32306.
- AssetEntry
- Table to track assets. In Liferay pretty much anything can be an asset.
- Row added for Bedstone organization.
- UserId was 20123. Test Test administrative user.
- ClassNameId was 20042 with ClassPk of 32306. Which points to com.liferay.portal.kernel.model.Organization table.
- Audit_AuditEvent
- Table to track actions taken by users.
- Row was added for Test Test user auditing actions.
- Foreign key userId has value 20123. This references the Adminstrator account that peformed the actions.
- ClassName is com.liferay.portal.kernel.model.Organization.
- ClassPk was 32306 which points to the Bedstone organization.
- Group_
- Table to track groups. Groups are effectively sites. This is a site specifically for the Bedstone organization.
- GroupId was 32307
- ClassNameId was 20042 with ClassPk of 32306. Which points to com.liferay.portal.kernel.model.Organization table.
- UserGroupRole
- Table to link users, roles and groups.
- UserId was 20123
- GroupId was 32307
- RoleId was 20108. This is the Organization Owner role.
- ResourcePermission
- Table to track permissions to resources such as portlets and models.
- Row added for Bedstone organization.
- OwnerId was 20123 which points to the Test Test user.
- Name is com.liferay.portal.kernel.model.Organization.
- PrimKey and PrimKeyID were 32306
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - organization