Fossil SCM

For "fossil chat backup", when transfering content from the transfer table into the repository, be explicit about column names, as the column names might be in a different order.

drh 2022-02-18 20:32 trunk
Commit e983a7dc93296217125440af60edfe2c8f54fc43d328e490b75bcba5e8eeaba4
1 file changed +4 -1
+4 -1
--- src/chat.c
+++ src/chat.c
@@ -1085,11 +1085,14 @@
10851085
fossil_fatal("cannot open patch database: %s", sqlite3_errmsg(g.db));
10861086
}
10871087
nChat = db_int(0, "SELECT count(*) FROM chatbu.chat");
10881088
fossil_print("Got %d new records, %d bytes\n", nChat, blob_size(&down));
10891089
db_multi_exec(
1090
- "REPLACE INTO repository.chat SELECT * FROM chatbu.chat;"
1090
+ "REPLACE INTO repository.chat(msgid,mtime,lmtime,xfrom,xmsg,"
1091
+ "fname,fmime,mdel,file)"
1092
+ " SELECT msgid,mtime,lmtime,xfrom,xmsg,fname,fmime,mdel,file"
1093
+ " FROM chatbu.chat;"
10911094
);
10921095
}
10931096
}else if( strcmp(g.argv[2],"url")==0 ){
10941097
/* Show the URL to access chat. */
10951098
fossil_print("%s/chat\n", zUrl);
10961099
--- src/chat.c
+++ src/chat.c
@@ -1085,11 +1085,14 @@
1085 fossil_fatal("cannot open patch database: %s", sqlite3_errmsg(g.db));
1086 }
1087 nChat = db_int(0, "SELECT count(*) FROM chatbu.chat");
1088 fossil_print("Got %d new records, %d bytes\n", nChat, blob_size(&down));
1089 db_multi_exec(
1090 "REPLACE INTO repository.chat SELECT * FROM chatbu.chat;"
 
 
 
1091 );
1092 }
1093 }else if( strcmp(g.argv[2],"url")==0 ){
1094 /* Show the URL to access chat. */
1095 fossil_print("%s/chat\n", zUrl);
1096
--- src/chat.c
+++ src/chat.c
@@ -1085,11 +1085,14 @@
1085 fossil_fatal("cannot open patch database: %s", sqlite3_errmsg(g.db));
1086 }
1087 nChat = db_int(0, "SELECT count(*) FROM chatbu.chat");
1088 fossil_print("Got %d new records, %d bytes\n", nChat, blob_size(&down));
1089 db_multi_exec(
1090 "REPLACE INTO repository.chat(msgid,mtime,lmtime,xfrom,xmsg,"
1091 "fname,fmime,mdel,file)"
1092 " SELECT msgid,mtime,lmtime,xfrom,xmsg,fname,fmime,mdel,file"
1093 " FROM chatbu.chat;"
1094 );
1095 }
1096 }else if( strcmp(g.argv[2],"url")==0 ){
1097 /* Show the URL to access chat. */
1098 fossil_print("%s/chat\n", zUrl);
1099

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button