Commit 67bed2d6 by Kazuyuki Hida

サブモジュールの更新

parent eb63cad7
......@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public class DBConnector {
private static volatile DBConnector dbConnector = null;
public static final String DatabaseName = "ABVJE";
public static final int DatabaseVersion = DatabaseVersions.Ver1_0_7;
public static final int DatabaseVersion = DatabaseVersions.Ver1_0_4;
protected SQLiteDatabase db = null;
......
......@@ -5,8 +5,5 @@ public class DatabaseVersions {
public static final int Ver1_0_0 = 1;
public static final int Ver1_0_2 = 11; // SATO HACCP 1.0.2
public static final int Ver1_0_3 = 21; // @From カテゴリ選択機能追加
public static final int Ver1_0_4 = 31; // @From 作業の進捗状況を追加
public static final int Ver1_0_5 = 41; // @From 作業のロック、差し戻し対応
public static final int Ver1_0_6 = 51; // @From 作業のロック情報を追加
public static final int Ver1_0_7 = 61; // @From ダッシュボード対応
public static final int Ver1_0_4 = 31; // @From ロック、ダッシュボード対応
}
......@@ -46,6 +46,8 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" ) ");
ddl.add(sql.toString());
ddl.add("CREATE INDEX idx_task_key1 ON t_task_report(task_key, task_report_id, report_start_date)");
return ddl;
}
......@@ -53,7 +55,7 @@ public class TTaskReport extends SQLiteTableScript {
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Ver1_0_5) {
if (oldVersion < DatabaseVersions.Ver1_0_4) {
ddl.add(" ALTER TABLE t_task_report ADD COLUMN report_lock_user_id TEXT"); // 報告ロックユーザId
ddl.add(" ALTER TABLE t_task_report ADD COLUMN report_lock_user_name TEXT"); //報告ロックユーザ名
ddl.add(" ALTER TABLE t_task_report ADD COLUMN report_lock_time DATETIME"); // 報告ロック日時
......@@ -61,10 +63,11 @@ public class TTaskReport extends SQLiteTableScript {
ddl.add(" ALTER TABLE t_task_report ADD COLUMN send_back_user_name TEXT"); // 差し戻しユーザ名 差し戻された場合のみ
ddl.add(" ALTER TABLE t_task_report ADD COLUMN send_back_comment TEXT"); // 確認コメント 差し戻された場合のみ
ddl.add(" ALTER TABLE t_task_report ADD COLUMN task_status INTEGER NOT NULL DEFAULT 0"); // 状況 0:未実施、1:作業中、999:作業完了
}
if (oldVersion < DatabaseVersions.Ver1_0_6) {
ddl.add(" ALTER TABLE t_task_report ADD COLUMN report_status INTEGER NOT NULL DEFAULT 0"); // 0:ロック成功、1:ロック中、2:承認中、999:その他エラー
ddl.add("CREATE INDEX idx_task_key1 on t_task_report(task_key, task_id, report_start_date)");
ddl.add("CREATE INDEX idx_task_key2 on t_task_report_status(task_key, task_id, report_start_date)");
}
return ddl;
}
......
......@@ -5,7 +5,7 @@ import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import static jp.agentec.abook.abv.bl.data.DatabaseVersions.Ver1_0_7;
import static jp.agentec.abook.abv.bl.data.DatabaseVersions.Ver1_0_4;
public class TTaskReportStatus extends SQLiteTableScript {
......@@ -34,12 +34,14 @@ public class TTaskReportStatus extends SQLiteTableScript {
ddl.add(sql.toString());
ddl.add("CREATE INDEX idx_task_key2 ON t_task_report_status(task_key, task_report_id, report_start_date)");
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
if (oldVersion < Ver1_0_7) {
if (oldVersion < Ver1_0_4) {
return getCreateScript(newVersion);
} else {
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment