/** * Initaialization: Create the table mappings (@see PersistentObject), check the version and * create or update the table if necessary */ static { addMapping( TABLENAME, FLD_PARENT, FLD_TITLE, FLD_CONTENTS, "Datum=S:D:Date", FLD_REFS, FLD_KEYWORDS, FLD_MIMETYPE); Note start = load("1"); // $NON-NLS-1$ if (!start.exists()) { createOrModifyTable(create); } else { VersionInfo vi = new VersionInfo(start.get(FLD_TITLE)); if (vi.isOlder(DBVERSION)) { if (vi.isOlder("0.2.0")) { // $NON-NLS-1$ getConnection() .exec( "ALTER TABLE " + TABLENAME + " ADD deleted CHAR(1) default '0';"); //$NON-NLS-1$ //$NON-NLS-2$ } if (vi.isOlder("0.3.1")) { // $NON-NLS-1$ createOrModifyTable(upd031); } if (vi.isOlder("0.3.2")) { // $NON-NLS-1$ createOrModifyTable(upd032); } start.set(FLD_TITLE, DBVERSION); } } }