OSDN Git Service

初期状態のままだと全文検索が機能していなかった問題を修正した
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / DatabaseConnection.java
index 95ea023..03dd230 100644 (file)
@@ -282,6 +282,11 @@ public class DatabaseConnection {
                        executeSql("update note set attributeContentClass = ''");
                }
                
+               // Evernoteサムネイルカラムを追加
+               if (!dbTableColumnExists("NOTE", "ENTHUMBNAIL")) {
+                       executeSql("alter table note add column enThumbNail Blob");
+               }
+               
                // Apache Luceneを使った日本語検索のためのプレーンテキストノートコンテンツカラムを準備
                if (!dbTableColumnExists("NOTE", "CONTENTTEXT")) {
                        executeSql("alter table note add column contentText VarChar");
@@ -319,6 +324,8 @@ public class DatabaseConnection {
                        
                        Global.rebuildFullTextResourceTarget(this);
                }
+               
+               // 注意:ここから先でnoteテーブルとnoteResourcesテーブルの構造を変更するな。全文検索ができなくなる。
        }
        
        public void executeSql(String sql) {