Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7fbbd6d5 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- improved database update (should affect those servers using an intermediate version)

parent 64c406ac
No related branches found
No related tags found
No related merge requests found
...@@ -1308,6 +1308,7 @@ public class SQLCache extends VolatilCache implements Cache { ...@@ -1308,6 +1308,7 @@ public class SQLCache extends VolatilCache implements Cache {
ResultSet rs = st.executeQuery("SELECT version FROM server WHERE port='port'"); ResultSet rs = st.executeQuery("SELECT version FROM server WHERE port='port'");
rs.next(); rs.next();
int version = rs.getInt("version") ; int version = rs.getInt("version") ;
logger.debug( "Current version: {}", version );
if ( version < VERSION ) { if ( version < VERSION ) {
if ( version >= 302 ) { if ( version >= 302 ) {
if ( version < 310 ) { if ( version < 310 ) {
...@@ -1475,11 +1476,15 @@ public class SQLCache extends VolatilCache implements Cache { ...@@ -1475,11 +1476,15 @@ public class SQLCache extends VolatilCache implements Cache {
} }
if ( version < 480 ) { if ( version < 480 ) {
logger.info("Upgrading to version 4.8"); logger.info("Upgrading to version 4.8");
logger.info("Creating EDOAL tables"); if ( version < 471 ) {
initEDOALTables( createStatement() ); logger.info("Creating EDOAL tables");
logger.info("Adding reltype attribute"); initEDOALTables( createStatement() );
st.executeUpdate("ALTER TABLE alignment ADD reltype VARCHAR(255);"); }
st.executeUpdate("ALTER TABLE alignment ADD conftype VARCHAR(255);"); if ( version < 472 ) {
logger.info("Adding reltype attribute");
st.executeUpdate("ALTER TABLE alignment ADD reltype VARCHAR(255);");
st.executeUpdate("ALTER TABLE alignment ADD conftype VARCHAR(255);");
}
} }
// ALTER version // ALTER version
st.executeUpdate("UPDATE server SET version='"+VERSION+"'"); st.executeUpdate("UPDATE server SET version='"+VERSION+"'");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment