implemented swapping of project/task states
such that the state order is now * pending * open * started * complete * cancelled
This commit is contained in:
@@ -83,8 +83,10 @@ PRIMARY KEY (project_id, code)
|
||||
createUsersTable();
|
||||
case 1:
|
||||
createStatesTable();
|
||||
case 2:
|
||||
swapStates(TABLE_PROJECTS);
|
||||
}
|
||||
return setCurrentVersion(2);
|
||||
return setCurrentVersion(3);
|
||||
}
|
||||
|
||||
private void createUsersTable(){
|
||||
@@ -131,11 +133,6 @@ CREATE TABLE IF NOT EXISTS {0} (
|
||||
}
|
||||
}
|
||||
|
||||
private void init(){
|
||||
var version = createTables();
|
||||
LOG.log(INFO,"Updated project db to version {0}",version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Project load(long projectId) throws UmbrellaException {
|
||||
try {
|
||||
@@ -243,4 +240,5 @@ CREATE TABLE IF NOT EXISTS {0} (
|
||||
throw new UmbrellaException("Failed to create custom state!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user