Fossil SCM
Ensure that that the chatfts1 table and triggers are created in the repository db, rather than the main db, else it breaks when running via the ui command (where the checkout is the main db).
Commit
cdbdaee6421987ba07de435431d2c738007c08214f21d8e0227cd1609bd8d56b
Parent
09ee2c8e718a8a0…
1 file changed
+4
-4
+4
-4
| --- src/chat.c | ||
| +++ src/chat.c | ||
| @@ -342,21 +342,21 @@ | ||
| 342 | 342 | db_multi_exec("ALTER TABLE chat ADD COLUMN lmtime TEXT"); |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | if( !db_table_exists("repository", "chatfts1") ){ |
| 346 | 346 | db_multi_exec( |
| 347 | - "CREATE VIRTUAL TABLE chatfts1 USING fts5(" | |
| 347 | + "CREATE VIRTUAL TABLE repository.chatfts1 USING fts5(" | |
| 348 | 348 | " xmsg, content=chat, content_rowid=msgid, tokenize=porter" |
| 349 | 349 | ");" |
| 350 | - "CREATE TRIGGER chat_ai AFTER INSERT ON chat BEGIN " | |
| 350 | + "CREATE TRIGGER repository.chat_ai AFTER INSERT ON chat BEGIN " | |
| 351 | 351 | " INSERT INTO chatfts1(rowid, xmsg) VALUES(new.msgid, new.xmsg);" |
| 352 | 352 | "END;" |
| 353 | - "CREATE TRIGGER chat_ad AFTER DELETE ON chat BEGIN " | |
| 353 | + "CREATE TRIGGER repository.chat_ad AFTER DELETE ON chat BEGIN " | |
| 354 | 354 | " INSERT INTO chatfts1(chatfts1, rowid, xmsg) " |
| 355 | 355 | " VALUES('delete', old.msgid, old.xmsg);" |
| 356 | 356 | "END;" |
| 357 | - "INSERT INTO chatfts1(chatfts1) VALUES('rebuild');" | |
| 357 | + "INSERT INTO repository.chatfts1(chatfts1) VALUES('rebuild');" | |
| 358 | 358 | ); |
| 359 | 359 | } |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /* |
| 363 | 363 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -342,21 +342,21 @@ | |
| 342 | db_multi_exec("ALTER TABLE chat ADD COLUMN lmtime TEXT"); |
| 343 | } |
| 344 | |
| 345 | if( !db_table_exists("repository", "chatfts1") ){ |
| 346 | db_multi_exec( |
| 347 | "CREATE VIRTUAL TABLE chatfts1 USING fts5(" |
| 348 | " xmsg, content=chat, content_rowid=msgid, tokenize=porter" |
| 349 | ");" |
| 350 | "CREATE TRIGGER chat_ai AFTER INSERT ON chat BEGIN " |
| 351 | " INSERT INTO chatfts1(rowid, xmsg) VALUES(new.msgid, new.xmsg);" |
| 352 | "END;" |
| 353 | "CREATE TRIGGER chat_ad AFTER DELETE ON chat BEGIN " |
| 354 | " INSERT INTO chatfts1(chatfts1, rowid, xmsg) " |
| 355 | " VALUES('delete', old.msgid, old.xmsg);" |
| 356 | "END;" |
| 357 | "INSERT INTO chatfts1(chatfts1) VALUES('rebuild');" |
| 358 | ); |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | /* |
| 363 |
| --- src/chat.c | |
| +++ src/chat.c | |
| @@ -342,21 +342,21 @@ | |
| 342 | db_multi_exec("ALTER TABLE chat ADD COLUMN lmtime TEXT"); |
| 343 | } |
| 344 | |
| 345 | if( !db_table_exists("repository", "chatfts1") ){ |
| 346 | db_multi_exec( |
| 347 | "CREATE VIRTUAL TABLE repository.chatfts1 USING fts5(" |
| 348 | " xmsg, content=chat, content_rowid=msgid, tokenize=porter" |
| 349 | ");" |
| 350 | "CREATE TRIGGER repository.chat_ai AFTER INSERT ON chat BEGIN " |
| 351 | " INSERT INTO chatfts1(rowid, xmsg) VALUES(new.msgid, new.xmsg);" |
| 352 | "END;" |
| 353 | "CREATE TRIGGER repository.chat_ad AFTER DELETE ON chat BEGIN " |
| 354 | " INSERT INTO chatfts1(chatfts1, rowid, xmsg) " |
| 355 | " VALUES('delete', old.msgid, old.xmsg);" |
| 356 | "END;" |
| 357 | "INSERT INTO repository.chatfts1(chatfts1) VALUES('rebuild');" |
| 358 | ); |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | /* |
| 363 |