掲示板

How to add a new column to a custom service entity without losing data

9年前 に Muhammad Taha によって更新されました。

How to add a new column to a custom service entity without losing data

Junior Member 投稿: 63 参加年月日: 12/05/01 最新の投稿
Hi All,

I have a custom service already generated using LR SB. now I have to add a new column to the existing entity, data should not be deleted. How can I achieve this??

Thank you
Taha
thumbnail
9年前 に Pierpaolo Cira によって更新されました。

RE: How to add a new column to a custom service entity without losing data (回答)

Regular Member 投稿: 141 参加年月日: 10/02/26 最新の投稿
Hi,
just add the column and redeploy your server (make sure to first backup your data, because LR deletes your table, then creates new one and refills it with your data).

Another option consists to:
- disable automatic service building ( "build.auto.upgrade=false" inside your service-ext.properties)
- modify and rebuild your service
- modify the table (by hand, adding new column)
- redeploy your plugin

Bye
9年前 に Muhammad Taha によって更新されました。

RE: How to add a new column to a custom service entity without losing data

Junior Member 投稿: 63 参加年月日: 12/05/01 最新の投稿
Thank you Cira, Bye.