Database Changes After Adding Liferay Regular Role
Created: 26 November 2024 Modified:What data changes occur when a role is added to Liferay. Added role Laborer. 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
- Counter
There are different types of roles. The type_ column is where the role type is recorded. The following is roughly correct.
- Regular roles are type_ 1
- Site roles are type_ 2
- Organization roles are type_ 3
- Asset roles are type_ 5
- Account roles are type_ 6
- Publication roles are type_ 7
Tables that were changed after adding the new role Laborer.
- Role_
- Table to store role data.
- Primary key is roleId.
- Row was added for Laborer
- RoleId for Laborer is 32403.
- Type_ for laborer is 1
- ResourcePermission
- Table to track permissions to resources such as portlets and models.
- Row added for Laborer role.
- OwnerId was 20123 which points to the Test Test user.
- Name is com.liferay.portal.kernel.model.Role.
- PrimKey and PrimKeyID were 32403
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux - regular role - role - regular