留言板

How to create a new column into the database table through service.xml?

thumbnail
Abhishek Jain,修改在7 年前。

How to create a new column into the database table through service.xml?

Regular Member 帖子: 226 加入日期: 16-8-20 最近的帖子
I made a custom entity named School3 with some columns like id,name,location,headquarter,place. Now I want to add another column named uuid into the table. For this , I added a column into service.xml and rebuilt the service. Then tables.sql got updated with the new column but there is no effect on the database table(there is no column named uuid in the database table). Please help..thanx in advance..
thumbnail
David H Nebinger,修改在7 年前。

RE: How to create a new column into the database table through service.xml?

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Liferay does not generate table alter scripts, these are totally up to you to alter your own tables post-deployment.
thumbnail
Juan Gonzalez,修改在7 年前。

RE: How to create a new column into the database table through service.xml?

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Abhishek.

Which Liferay version are you using?
thumbnail
Abhishek Jain,修改在7 年前。

RE: How to create a new column into the database table through service.xml?

Regular Member 帖子: 226 加入日期: 16-8-20 最近的帖子
Sorry dear, I forgot to mention the version. The version is 7.0 ga1.
thumbnail
Juan Gonzalez,修改在7 年前。

RE: How to create a new column into the database table through service.xml?

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Abhishek Jain:
Sorry dear, I forgot to mention the version. The version is 7.0 ga1.


Ok so this feature had been implemented in master branch under this LPS: https://issues.liferay.com/browse/LPS-67688.

There a Maven plugin had been created so you could add to your projects and execute tasks for cleaning your development database.