смена имен бд тестов на актуальные. удаление старых при запуске
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package TestingSystem;
|
||||
import Common.Constants;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
import Common.Global;
|
||||
import GlobalData.Settings.SettingName;
|
||||
@@ -23,7 +24,6 @@ import java.sql.PreparedStatement;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
public class TasksDatabase extends SQLiteDatabase {
|
||||
public static final String tests_db_name = "tests2023";
|
||||
public TSettingsDBTable settings;
|
||||
public TasksPackageDBTable packages;
|
||||
public TasksPackageToKillDBTable packagesToKill;
|
||||
@@ -35,13 +35,13 @@ public class TasksDatabase extends SQLiteDatabase {
|
||||
public SapforTasksDBTable sapforTasks;
|
||||
//---------
|
||||
public TasksDatabase(String email) {
|
||||
super(Paths.get(Global.DataDirectory.getAbsolutePath(), email + "_" + tests_db_name + ".sqlite").toFile());
|
||||
super(Paths.get(Global.DataDirectory.getAbsolutePath(), email + "_" + Constants.tests_db_name + ".sqlite").toFile());
|
||||
}
|
||||
public TasksDatabase(File file_in) {
|
||||
super(file_in);
|
||||
}
|
||||
public void setFile(String email) {
|
||||
file = Paths.get(Global.DataDirectory.getAbsolutePath(), email + "_" + tests_db_name + ".sqlite").toFile();
|
||||
file = Paths.get(Global.DataDirectory.getAbsolutePath(), email + "_" + Constants.tests_db_name + ".sqlite").toFile();
|
||||
}
|
||||
@Override
|
||||
protected void initAllTables() throws Exception {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
|
||||
import static TestingSystem.TasksDatabase.tests_db_name;
|
||||
import static Common.Constants.tests_db_name;
|
||||
public class TestingPlanner {
|
||||
public String email;
|
||||
TasksPackage tasksPackage;
|
||||
|
||||
@@ -46,7 +46,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static TestingSystem.TasksDatabase.tests_db_name;
|
||||
import static Common.Constants.tests_db_name;
|
||||
public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
LinkedHashMap<String, TasksDatabase> accountsBases = new LinkedHashMap<>();
|
||||
//--------------------------------->>>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package TestingSystem;
|
||||
import Common.Constants;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import SapforTestingSystem.SapforConfiguration.SapforConfigurationDBTable;
|
||||
@@ -22,7 +23,7 @@ public class TestsDatabase extends SQLiteDatabase {
|
||||
//----
|
||||
public ServerSapforsDBTable serverSapfors;
|
||||
public TestsDatabase() {
|
||||
super(Paths.get(System.getProperty("user.dir"), "Data", TasksDatabase.tests_db_name + ".sqlite").toFile());
|
||||
super(Paths.get(System.getProperty("user.dir"), "Data", Constants.tests_db_name + ".sqlite").toFile());
|
||||
}
|
||||
@Override
|
||||
protected void initAllTables() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user