Brian Chan 14年 前 You're funny Ryan I got stuck on "Don't write anything in this method, this method will never ever run ". I was like, what is he talking about... 投票するためにはログインが必要です。 次として送信する: キャンセル
Jonas Yuan 14年 前 Hi Ryan, thank you. One question: how do you handle different DBMS when using same SQL script? Should it know DBMS first?protected void doUpgrade() throws Exception { runSQL("alter table sampleUpgradeTable add sampleUpgradeColumn LONG"); runSQL("update sampleUpgradeTable set sampleUpgradeColumn = 0");} 投票するためにはログインが必要です。 次として送信する: キャンセル
Nagendra Kumar Busam 12年 前 Really good info, thank you very much for sharing 投票するためにはログインが必要です。 次として送信する: キャンセル
Juan Alberto Lopez Cavallotti 12年 前 One question about this, if I'm on a development stage and I want the upgrade process to run always, is there any property for getting this done?Thanks! 投票するためにはログインが必要です。 次として送信する: キャンセル Ryan Park Juan Alberto Lopez Cavallotti 12年 前 Hi Juan,For allowing code to always run, I would not use the upgrade process because it is designed to run only once. If you'd like to run code at the beginning always I would consider using a StartupAction, see http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins. 投票するためにはログインが必要です。 次として送信する: キャンセル
Ryan Park Juan Alberto Lopez Cavallotti 12年 前 Hi Juan,For allowing code to always run, I would not use the upgrade process because it is designed to run only once. If you'd like to run code at the beginning always I would consider using a StartupAction, see http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins. 投票するためにはログインが必要です。 次として送信する: キャンセル
Barry Rowe 11年 前 - 編集済み Does the UpgradeProcess.doUpgrade() method get executed under full control Permissions (ie. Administrator SecurityContext) for purposes of using XXXLocalServiceUtil methods to manipulate data?I'm guessing the answer is yes if it allows access to execute custom SQL statements as in your example, but want to make sure. Thank you 投票するためにはログインが必要です。 次として送信する: キャンセル Ryan Park Barry Rowe 11年 前 Hi Barry, everything called under *LocalService will run with full privilege.If you'd like to access any service with permission checking, you'll need to call the *Service (without Local). However, since there are no users running an upgrade process, you'll likely run in to errors if you do not use *LocalService in your upgrade process. 投票するためにはログインが必要です。 次として送信する: キャンセル
Ryan Park Barry Rowe 11年 前 Hi Barry, everything called under *LocalService will run with full privilege.If you'd like to access any service with permission checking, you'll need to call the *Service (without Local). However, since there are no users running an upgrade process, you'll likely run in to errors if you do not use *LocalService in your upgrade process. 投票するためにはログインが必要です。 次として送信する: キャンセル
Joris Meijer 10年 前 Hello Ryan,Thanks for the blog. I just implemented an Upgrade Hook using 7cogs as an example. My upgrade hook doesn't seem to be "fired". I want to add a structure and a template.Can I do this using the UpgradeProcess, or do I need to use a StartupAction instead?Best regards,Joris 投票するためにはログインが必要です。 次として送信する: キャンセル Ryan Park Joris Meijer 10年 前 Hi Joris,After you've specified the location of your "portal.properties" file in liferay-hook.xml. Make sure that you've specified:release.info.build.number=release.info.previous.build.number=upgrade.processes="release.info.build.number" should be greater than "release.info.previous.build.number" and in your upgrade class the threshold should be set to "release.info.build.number".See Social Office as an example:https://github.com/liferay/liferay-plugins/blob/master/hooks/so-hook/docroot/WEB-INF/src/portal.properties 投票するためにはログインが必要です。 次として送信する: キャンセル Joris Meijer Ryan Park 10年 前 Hi Ryan,Thanks for your quick reply. I already specified those. It turned out I had the directory structure quite wrong. I am using maven artifacts and the structure thus is a little bit different from the plugins SDK structure. I now implemented a startupaction which adds the hook and template.thanks!Joris 投票するためにはログインが必要です。 次として送信する: キャンセル Ryan Park Joris Meijer 10年 前 I glad it worked out for you. 投票するためにはログインが必要です。 次として送信する: キャンセル
Ryan Park Joris Meijer 10年 前 Hi Joris,After you've specified the location of your "portal.properties" file in liferay-hook.xml. Make sure that you've specified:release.info.build.number=release.info.previous.build.number=upgrade.processes="release.info.build.number" should be greater than "release.info.previous.build.number" and in your upgrade class the threshold should be set to "release.info.build.number".See Social Office as an example:https://github.com/liferay/liferay-plugins/blob/master/hooks/so-hook/docroot/WEB-INF/src/portal.properties 投票するためにはログインが必要です。 次として送信する: キャンセル Joris Meijer Ryan Park 10年 前 Hi Ryan,Thanks for your quick reply. I already specified those. It turned out I had the directory structure quite wrong. I am using maven artifacts and the structure thus is a little bit different from the plugins SDK structure. I now implemented a startupaction which adds the hook and template.thanks!Joris 投票するためにはログインが必要です。 次として送信する: キャンセル Ryan Park Joris Meijer 10年 前 I glad it worked out for you. 投票するためにはログインが必要です。 次として送信する: キャンセル
Joris Meijer Ryan Park 10年 前 Hi Ryan,Thanks for your quick reply. I already specified those. It turned out I had the directory structure quite wrong. I am using maven artifacts and the structure thus is a little bit different from the plugins SDK structure. I now implemented a startupaction which adds the hook and template.thanks!Joris 投票するためにはログインが必要です。 次として送信する: キャンセル Ryan Park Joris Meijer 10年 前 I glad it worked out for you. 投票するためにはログインが必要です。 次として送信する: キャンセル
Chris Steinmeyer 10年 前 Is it possible to use a custome spring context xml in an UpgradeProcess? If it is possible, how i can retrieve it? 投票するためにはログインが必要です。 次として送信する: キャンセル