Commit 6e941272 by Lee Jaebin

マイグレーション処理追加

parent 91109368
...@@ -4,6 +4,7 @@ import java.util.ArrayList; ...@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase; import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
import jp.agentec.adf.util.StringUtil; import jp.agentec.adf.util.StringUtil;
/** /**
...@@ -43,7 +44,11 @@ public class MOperationGroupMaster extends SQLiteTableScript { ...@@ -43,7 +44,11 @@ public class MOperationGroupMaster extends SQLiteTableScript {
@Override @Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) { public List<String> getUpgradeScript(int oldVersion, int newVersion) {
return null; List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Ver1_1_0) {
ddl.addAll(getCreateScript(newVersion));
}
return ddl;
} }
@Override @Override
......
...@@ -4,6 +4,7 @@ import java.util.ArrayList; ...@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase; import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.data.DatabaseVersions;
/** /**
* Created by leej on 2019/06/25. * Created by leej on 2019/06/25.
...@@ -35,7 +36,11 @@ public class ROperationGroupMasterOperation extends SQLiteTableScript { ...@@ -35,7 +36,11 @@ public class ROperationGroupMasterOperation extends SQLiteTableScript {
@Override @Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) { public List<String> getUpgradeScript(int oldVersion, int newVersion) {
return null; List<String> ddl = new ArrayList<String>();
if (oldVersion < DatabaseVersions.Ver1_1_0) {
ddl.addAll(getCreateScript(newVersion));
}
return ddl;
} }
@Override @Override
......
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