Don't drop max_session_age column in transaction during upgrade

It depends on what version of schema we are upgrading from as to
whether or not this column exists in the system_config table.  If
the database is relatively new and was created from a schema which
does not define this column, it won't have it, and the upgrade would
abort with an error.  Therefore we need to process this outside of
the transaction block, allowing it to fail and continue.

Change-Id: I7e625a2d5269eb76e64901c2302a661135bd9021
Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/src/main/webapp/WEB-INF/sql/upgrade016_017_mysql.sql b/src/main/webapp/WEB-INF/sql/upgrade016_017_mysql.sql
index bb4454e..43b2a92 100644
--- a/src/main/webapp/WEB-INF/sql/upgrade016_017_mysql.sql
+++ b/src/main/webapp/WEB-INF/sql/upgrade016_017_mysql.sql
@@ -1,8 +1,9 @@
 -- Upgrade: schema_version 16 to 17 (MySQL)
 --
 
-ALTER TABLE system_config DROP xsrf_private_key;
 ALTER TABLE system_config DROP max_session_age;
+
+ALTER TABLE system_config DROP xsrf_private_key;
 ALTER TABLE system_config CHANGE COLUMN account_private_key register_email_private_key VARCHAR(36) NOT NULL;
 ALTER TABLE changes ADD change_key VARCHAR(60);
 
diff --git a/src/main/webapp/WEB-INF/sql/upgrade016_017_postgres.sql b/src/main/webapp/WEB-INF/sql/upgrade016_017_postgres.sql
index b3d5f70..66f5a7e 100644
--- a/src/main/webapp/WEB-INF/sql/upgrade016_017_postgres.sql
+++ b/src/main/webapp/WEB-INF/sql/upgrade016_017_postgres.sql
@@ -21,12 +21,13 @@
 END;
 $$ LANGUAGE plpgsql;
 
+ALTER TABLE system_config DROP max_session_age;
+
 BEGIN;
 
 SELECT check_schema_version(16);
 
 ALTER TABLE system_config DROP xsrf_private_key;
-ALTER TABLE system_config DROP max_session_age;
 ALTER TABLE system_config RENAME account_private_key TO register_email_private_key;
 ALTER TABLE changes ADD change_key VARCHAR(60);