Database Changes After Adding Liferay User
Created: 22 November 2024 Modified:What data changes occur when a user is added to Liferay. Added user Fred Flint with email fred@fred.com. 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 user. Original data dumps containing all changes are available. Removed tables are as follows
- DispatchLog
- ViewCountEntry
Tables that were changed after adding the new user Fred Flint.
- User_
- Table to store user data.
- Primary key is userId.
- Row was added for Fred Flint
- UserId for Fred Flint is 32220.
- UserId for Test Test is 20123.
- UserId for Default is 20096.
- Contact_
- Table to store contact data.
- Users will have contact data
- Not all contacts will have user data
- Row was added for Fred Flint
- Foreign key userId has value 20123. This references the Adminstrator account that added the data.
- ClassNameId was 20071 which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassPk was 32220 which points to the Fred Flint user.
- User_Roles
- Table to link users with roles.
- Row was added for Fred Flint
- Fred Flint was added to User role.
- Foreign key userId has value 32220
- Audit_AuditEvent
- Table to track actions taken by users.
- Rows were added for Test Test user auditing actions.
- Foreign key userId has value 20123. This references the Adminstrator account that peformed the actions.
- ClassName was com.liferay.portal.kernel.model.User.
- ClassPk was 32220 which points to the Fred Flint user.
- AssetEntry
- Table to track assets. In Liferay pretty much anything can be an asset.
- Rows were added for Fred Flint user. Two assets were layouts and one was user.
- UserId was 20096 and 20123. Test Test and Default users.
- ClassNameId was 20031 with ClassPk of 16 and 17. Which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassNameId was 20071 with ClassPk was 32220 which points to the Fred Flint user.
- Ticket
- Table to track tickets. Whatever that means.
- Row added for Fred Flint user.
- ClassNameId was 20071 which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassPk was 32220 which points to the Fred Flint user.
- Group_
- Table to track groups. Groups are effectively sites. This is a site specifically for the Fred Flint user.
- GroupId was 32222
- ClassNameId was 20071 which points to com.liferay.portal.kernel.model.User in the ClassName_ table.
- ClassPk was 32220 which points to the Fred Flint user.
- ResourcePermission
- Table to track permissions to resources such as portlets and models.
- OwnerId was 20123 which points to the Test Test user.
- Row added for group 32222
- Row added for user 32220
Resources
tags: java - liferay ce - liferay - ce - mariadb - fedora - 41 - fedora 41 - linux