[FIX] initialization error
This commit is contained in:
parent
8911eed0fb
commit
8780ea8e63
@ -18,21 +18,18 @@ public class Initialization extends MigrationSqlStep {
|
|||||||
private static final Logger LOGGER = LoggerFactory.getLogger(Initialization.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(Initialization.class);
|
||||||
|
|
||||||
public static final int KARSO_INITIALISATION_ID = 1;
|
public static final int KARSO_INITIALISATION_ID = 1;
|
||||||
public static final List<Class<?>> CLASSES_BASE = List.of(Album.class, Artist.class, Data.class, Gender.class, Playlist.class, Track.class, User.class);
|
public static final List<Class<?>> CLASSES_BASE = List.of(Album.class, Artist.class, Data.class, Gender.class,
|
||||||
|
Playlist.class, Track.class, User.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return "Initialization";
|
return "Initialization";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Initialization() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateStep() throws Exception {
|
public void generateStep() throws Exception {
|
||||||
for (final Class<?> elem : CLASSES_BASE) {
|
for (final Class<?> clazz : CLASSES_BASE) {
|
||||||
addClass(elem);
|
addClass(clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
addAction((final DBAccess da) -> {
|
addAction((final DBAccess da) -> {
|
||||||
@ -63,6 +60,7 @@ public class Initialization extends MigrationSqlStep {
|
|||||||
new Gender(24L, "Bande Originale"), //
|
new Gender(24L, "Bande Originale"), //
|
||||||
new Gender(25L, "Variété Belge"), //
|
new Gender(25L, "Variété Belge"), //
|
||||||
new Gender(26L, "Gospel"));
|
new Gender(26L, "Gospel"));
|
||||||
|
da.insertMultiple(data);
|
||||||
});
|
});
|
||||||
// set start increment element to permit to add after default elements
|
// set start increment element to permit to add after default elements
|
||||||
addAction("""
|
addAction("""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user