implemented swapping of project/task states

such that the state order is now
* pending
* open
* started
* complete
* cancelled
This commit is contained in:
2025-08-01 23:07:02 +02:00
parent eed0ce0e8e
commit d0d7baccf0
5 changed files with 27 additions and 11 deletions

View File

@@ -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!");
}
}
}