Forums de discussion
Customizing Liferay Database Tables
Sakshi Saxena, modifié il y a 9 années.
Customizing Liferay Database Tables
New Member Publications: 2 Date d'inscription: 18/02/15 Publications récentes
Hello Everyone...
I want to remove some columns from table "User_" of Liferay Database (Lportal) as I don't want to store user's last login IP address...
How can I do that??
I want to remove some columns from table "User_" of Liferay Database (Lportal) as I don't want to store user's last login IP address...
How can I do that??
David H Nebinger, modifié il y a 9 années.
RE: Customizing Liferay Database Tables (Réponse)
Liferay Legend Publications: 14916 Date d'inscription: 02/09/06 Publications récentesSakshi Saxena:
I want to remove some columns from table "User_" of Liferay Database (Lportal) as I don't want to store user's last login IP address... How can I do that??
never ever ever do this. You shouldn't even be looking in the database. You should just forget that it's there and what all of the tables and columns are. Seriously, if you monkey with the database you risk severely breaking your system. for example, to drop this column you'd have to modify all of the Liferay entities, all of the Hibernate mappings, all of the code in Liferay that use this column, ... Seriously, do not do this. Close your database browsing tool now and delete it from your system and never go back to the database again.
If I haven't already emphasized this enough, let me bolden it: DO NOT EVER DO ANYTHING AT ALL IN THE LIFERAY DATABASE! IT IS NOT YOURS, DO NOT LOOK AT IT AGAIN!
Any possible addition, change, tweak, whatever you do can break your system, and in some cases the breakages might not be recoverable.
Now if you had instead asked "How can I avoid populating the user's last login IP addresses?" then my response would be quite different. Create a ModelListener for the User entity and, in the onBeforeCreate and onBeforeUpdate methods just blank out the field. This is gets invoked right before the database is updated. You can't remove the column, but you can certainly block populating it.
mohammad azaruddin, modifié il y a 9 années.
RE: Customizing Liferay Database Tables
Expert Publications: 492 Date d'inscription: 17/09/12 Publications récentesDavid H Nebinger:
DO NOT EVER DO ANYTHING AT ALL IN THE LIFERAY DATABASE! IT IS NOT YOURS, DO NOT LOOK AT IT AGAIN!
lol
Sakshi Saxena, modifié il y a 9 années.
RE: Customizing Liferay Database Tables
New Member Publications: 2 Date d'inscription: 18/02/15 Publications récentes
Thank You David..
Avoiding entry of user's last login IP addresses would work for me....
Avoiding entry of user's last login IP addresses would work for me....