private LinkedNotebookTable linkedNotebookTable;
private SharedNotebookTable sharedNotebookTable;
private SyncTable syncTable;
+ private SystemIconTable systemIconTable;
private final ApplicationLogger logger;
private Connection conn;
int id;
syncTable = new SyncTable(logger, this);
linkedNotebookTable = new LinkedNotebookTable(logger, this);
sharedNotebookTable = new SharedNotebookTable(logger, this);
+ systemIconTable = new SystemIconTable(logger, this);
}
Global.setDatabaseVersion(version);
}
if (version.equals("0.86")) {
-/* sharedNotebookTable.dropTable();
- linkedNotebookTable.dropTable();
-
- executeSql("alter table notebook drop column publishingUri");
- executeSql("alter table notebook drop column publishingOrder");
- executeSql("alter table notebook drop column publishingAscending");
- executeSql("alter table notebook drop column publishingPublicDescription");
- executeSql("alter table notebook drop column stack");
- executeSql("alter table notebook drop column icon");
- executeSql("alter table tag drop column icon");
- executeSql("alter table SavedSearch drop column icon");
-
- executeSql("drop index NOTE_THUMBNAIL_INDEX;");
- executeSql("drop index NOTE_EXPUNGED_INDEX;");
- executeSql("drop index NOTE_DUEDATE_INDEX;");
- executeSql("drop index RESOURCES_GUID_INDEX;");
-*/
+
executeSql("alter table notebook add column publishingUri VarChar");
executeSql("alter table notebook add column publishingOrder Integer");
- executeSql("alter table notebook add column publishingAscending VarChar");
+ executeSql("alter table notebook add column publishingAscending Boolean");
executeSql("alter table notebook add column publishingPublicDescription varchar");
executeSql("alter table notebook add column stack varchar");
executeSql("alter table notebook add column icon blob");
+ executeSql("alter table notebook add column readOnly boolean");
executeSql("alter table tag add column icon blob");
executeSql("alter table SavedSearch add column icon blob");
executeSql("create index NOTE_DUEDATE_INDEX on note (attributeSubjectDate, guid);");
executeSql("create index RESOURCES_GUID_INDEX on noteresources (noteGuid, guid);");
executeSql("update note set thumbnailneeded=true, thumbnail=null;");
+ executeSql("update notebook set publishingUri='', " +
+ "publishingAscending=false, stack='', readonly=false, publishingOrder=1, " +
+ "publishingPublicDescription=''");
sharedNotebookTable.createTable();
linkedNotebookTable.createTable();
+ systemIconTable.createTable();
version = "0.95";
+ executeSql("Insert into Sync (key, value) values ('FullNotebookSync', 'true')");
executeSql("Insert into Sync (key, value) values ('FullLinkedNotebookSync', 'true')");
executeSql("Insert into Sync (key, value) values ('FullSharedNotebookSync', 'true')");
Global.setDatabaseVersion(version);
public void createTables() {
Global.setDatabaseVersion("0.85");
-// Global.setDatabaseVersion("0.95");
Global.setAutomaticLogin(false);
Global.saveCurrentNoteGuid("");
Global.saveUploadAmount(0);
watchFolderTable.createTable();
invalidXMLTable.createTable();
wordsTable.createTable();
- syncTable.createTable();
-
+ syncTable.createTable();
}
public Connection getConnection() {
public SharedNotebookTable getSharedNotebookTable() {
return sharedNotebookTable;
}
+ public SystemIconTable getSystemIconTable() {
+ return systemIconTable;
+ }
}