1
14
15 package com.liferay.portal.upgrade.v5_1_6;
16
17 import com.liferay.portal.kernel.upgrade.UpgradeProcess;
18 import com.liferay.portal.kernel.upgrade.util.DateUpgradeColumnImpl;
19 import com.liferay.portal.kernel.upgrade.util.UpgradeColumn;
20 import com.liferay.portal.kernel.upgrade.util.UpgradeTable;
21 import com.liferay.portal.kernel.upgrade.util.UpgradeTableFactoryUtil;
22 import com.liferay.portal.upgrade.v5_1_6.util.SocialActivityTable;
23 import com.liferay.portal.upgrade.v5_1_6.util.SocialRelationTable;
24 import com.liferay.portal.upgrade.v5_1_6.util.SocialRequestTable;
25
26
31 public class UpgradeSocial extends UpgradeProcess {
32
33 protected void doUpgrade() throws Exception {
34
35
37 UpgradeColumn createDateColumn = new DateUpgradeColumnImpl(
38 "createDate");
39 UpgradeColumn modifiedDateColumn = new DateUpgradeColumnImpl(
40 "modifiedDate");
41
42 UpgradeTable upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
43 SocialActivityTable.TABLE_NAME, SocialActivityTable.TABLE_COLUMNS,
44 createDateColumn);
45
46 upgradeTable.setCreateSQL(SocialActivityTable.TABLE_SQL_CREATE);
47
48 upgradeTable.updateTable();
49
50
52 upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
53 SocialRelationTable.TABLE_NAME, SocialRelationTable.TABLE_COLUMNS,
54 createDateColumn);
55
56 upgradeTable.setCreateSQL(SocialRelationTable.TABLE_SQL_CREATE);
57
58 upgradeTable.updateTable();
59
60
62 upgradeTable = UpgradeTableFactoryUtil.getUpgradeTable(
63 SocialRequestTable.TABLE_NAME, SocialRequestTable.TABLE_COLUMNS,
64 createDateColumn, modifiedDateColumn);
65
66 upgradeTable.setCreateSQL(SocialRequestTable.TABLE_SQL_CREATE);
67
68 upgradeTable.updateTable();
69 }
70
71 }