Package edu.suffolk.litlab.efsp.db
Class DatabaseVersion
java.lang.Object
edu.suffolk.litlab.efsp.db.DatabaseVersion
Updates all of the collective tables for a consistent "schema". Since this class should work
going back to extremely old versions of the code, this class should be completely self contained,
only using SQL queries from here.
To add a new version:
- Increment CURRENT_VERSION
- Add an else-if to the end of updateDatabase() for the new version.
- Write your actual upgrade function (upgradeFromYYToZZ()).
- Author:
- brycew
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateTablesIfAbsent(boolean brandNew) intbooleansetSchemaVersion(int newVersion) voidvoidvoidvoidvoidboolean
-
Constructor Details
-
DatabaseVersion
-
-
Method Details
-
createTablesIfAbsent
- Throws:
SQLException
-
setSchemaVersion
- Throws:
SQLException
-
getSchemaVersion
- Throws:
SQLException
-
updateToLatest
- Throws:
NoSuchAlgorithmException
-
update5To6
- Throws:
SQLException
-
update8To9
- Throws:
SQLException
-
update9To10
- Throws:
SQLException
-
update10To11
- Throws:
SQLException
-
update11To12
- Throws:
SQLException
-