mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Clean up index page
This commit is contained in:
@@ -23,10 +23,21 @@ public class SchemaMigration implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
cleanupSpringSessionTables();
|
||||
ensureChannelCanvasColumns();
|
||||
ensureAssetMediaColumns();
|
||||
}
|
||||
|
||||
private void cleanupSpringSessionTables() {
|
||||
try {
|
||||
jdbcTemplate.execute("DELETE FROM SPRING_SESSION_ATTRIBUTES");
|
||||
jdbcTemplate.execute("DELETE FROM SPRING_SESSION");
|
||||
logger.info("Cleared persisted Spring Session tables on startup to avoid stale session conflicts");
|
||||
} catch (DataAccessException ex) {
|
||||
logger.debug("Spring Session tables not available for cleanup", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureChannelCanvasColumns() {
|
||||
List<String> columns;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user