[DEV] update migration
This commit is contained in:
parent
caa3ccba33
commit
dd80f0ecd8
@ -88,7 +88,7 @@ public class WebLauncher {
|
|||||||
WebLauncher.LOGGER.info("Add migration since last version");
|
WebLauncher.LOGGER.info("Add migration since last version");
|
||||||
// NOTHING for now
|
// NOTHING for now
|
||||||
WebLauncher.LOGGER.info("Migrate the DB [START]");
|
WebLauncher.LOGGER.info("Migrate the DB [START]");
|
||||||
migrationEngine.migrateErrorThrow(GlobalConfiguration.dbConfig);
|
migrationEngine.migrateWaitAdmin(GlobalConfiguration.dbConfig);
|
||||||
WebLauncher.LOGGER.info("Migrate the DB [STOP]");
|
WebLauncher.LOGGER.info("Migrate the DB [STOP]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,22 +9,27 @@ import org.kar.karso.model.Settings;
|
|||||||
import org.kar.karso.model.UserAuth;
|
import org.kar.karso.model.UserAuth;
|
||||||
|
|
||||||
public class Initialization extends MigrationSqlStep {
|
public class Initialization extends MigrationSqlStep {
|
||||||
|
|
||||||
public static final int KARSO_INITIALISATION_ID = 1;
|
public static final int KARSO_INITIALISATION_ID = 1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Initialization";
|
return "Initialization";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Initialization() throws Exception {
|
public Initialization() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateStep() throws Exception {
|
||||||
addClass(Settings.class);
|
addClass(Settings.class);
|
||||||
addClass(UserAuth.class);
|
addClass(UserAuth.class);
|
||||||
addClass(Application.class);
|
addClass(Application.class);
|
||||||
addClass(ApplicationToken.class);
|
addClass(ApplicationToken.class);
|
||||||
addClass(RightDescription.class);
|
addClass(RightDescription.class);
|
||||||
addClass(Right.class);
|
addClass(Right.class);
|
||||||
|
|
||||||
addAction("""
|
addAction("""
|
||||||
INSERT INTO `application` (`id`, `name`, `description`, `redirect`, `redirectDev`, `notification`, `ttl`) VALUES
|
INSERT INTO `application` (`id`, `name`, `description`, `redirect`, `redirectDev`, `notification`, `ttl`) VALUES
|
||||||
(1, 'karso', 'Root SSO interface', 'http://atria-soft/karso', '', '', 666);
|
(1, 'karso', 'Root SSO interface', 'http://atria-soft/karso', '', '', 666);
|
||||||
@ -72,5 +77,5 @@ public class Initialization extends MigrationSqlStep {
|
|||||||
""", "mysql");
|
""", "mysql");
|
||||||
display();
|
display();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,12 @@ public class Migration20231015 extends MigrationSqlStep {
|
|||||||
return "refactor creation and update time";
|
return "refactor creation and update time";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Migration20231015() throws Exception {
|
public Migration20231015() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateStep() throws Exception {
|
||||||
|
|
||||||
for (String elem : List.of("application", "applicationToken", "right", "rightDescription", "settings", "user", "user_link_application", "user_link_cover")) {
|
for (String elem : List.of("application", "applicationToken", "right", "rightDescription", "settings", "user", "user_link_application", "user_link_cover")) {
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 9fc25b4feaeba509ff39f70b24d97be47f4b30e1
|
Subproject commit ea5a4f6b7537eb707916f4610bf79fbe86c6296f
|
Loading…
x
Reference in New Issue
Block a user