@@ -85,7 +85,7 @@ CommandLineRunner initDataBaseProd(UserRepository userRepository, FileSystemRepo
85
85
86
86
if (foundUsers .isEmpty () && foundFileSystemEntities .isEmpty ()) {
87
87
addDefaultAdminAndRuntimeUser (userRepository , passwordEncoder );
88
- log .info ("Inserting Home directories and default structure: {} {}." , fileSystemRepository .save (FileSystemEntity
88
+ log .info ("Inserting Home directory and default structure: {}." , fileSystemRepository .save (FileSystemEntity
89
89
.builder ()
90
90
.lastUpdatedBy (RUNTIME_USER_ID )
91
91
.lastUpdated (Instant .now ().getEpochSecond ())
@@ -98,17 +98,6 @@ CommandLineRunner initDataBaseProd(UserRepository userRepository, FileSystemRepo
98
98
.size (420 )
99
99
.typeId (FOLDER .getId ())
100
100
.itemIds (new long []{1 })
101
- .build ()),
102
- fileSystemRepository .save (FileSystemEntity .builder ()
103
- .lastUpdatedBy (RUNTIME_USER_ID )
104
- .lastUpdated (Instant .now ().getEpochSecond ())
105
- .ownerId (1 )
106
- .fileSystemId (1 )
107
- .isFile (true )
108
- .name ("dummyFile.txt" )
109
- .size (420 )
110
- .typeId (TEXT .getId ())
111
- .mimeType ("text/plain" )
112
101
.build ()));
113
102
114
103
if (userRepository .findAll ().size () == 2 ) {
@@ -117,7 +106,7 @@ CommandLineRunner initDataBaseProd(UserRepository userRepository, FileSystemRepo
117
106
log .error ("Inserting Users " + MESSAGE_ON_FAILURE );
118
107
}
119
108
120
- if (fileSystemRepository .findAll ().size () == 2 ) {
109
+ if (fileSystemRepository .findAll ().size () == 1 ) {
121
110
log .info ("Inserting FileSystemEntities " + MESSAGE_ON_SUCCESS );
122
111
} else {
123
112
log .error ("Inserting FileSystemEntities " + MESSAGE_ON_FAILURE );
0 commit comments