Fossil SCM

Make sure the 'modreq' table is created, if necessary, in the repository database.

mistachkin 2014-09-18 22:51 UTC trunk
Commit 12b463ca05d54958f51e776167c672c7803e8940
1 file changed +2 -2
+2 -2
--- src/moderate.c
+++ src/moderate.c
@@ -26,15 +26,15 @@
2626
** Create a table to represent pending moderation requests, if the
2727
** table does not already exist.
2828
*/
2929
void moderation_table_create(void){
3030
db_multi_exec(
31
- "CREATE TABLE IF NOT EXISTS modreq(\n"
31
+ "CREATE TABLE IF NOT EXISTS %s.modreq(\n"
3232
" objid INTEGER PRIMARY KEY,\n" /* Record pending approval */
3333
" attachRid INT,\n" /* Object attached */
3434
" tktid TEXT\n" /* Associated ticket id */
35
- ");\n"
35
+ ");\n", db_name("repository")
3636
);
3737
}
3838
3939
/*
4040
** Return TRUE if the modreq table exists
4141
--- src/moderate.c
+++ src/moderate.c
@@ -26,15 +26,15 @@
26 ** Create a table to represent pending moderation requests, if the
27 ** table does not already exist.
28 */
29 void moderation_table_create(void){
30 db_multi_exec(
31 "CREATE TABLE IF NOT EXISTS modreq(\n"
32 " objid INTEGER PRIMARY KEY,\n" /* Record pending approval */
33 " attachRid INT,\n" /* Object attached */
34 " tktid TEXT\n" /* Associated ticket id */
35 ");\n"
36 );
37 }
38
39 /*
40 ** Return TRUE if the modreq table exists
41
--- src/moderate.c
+++ src/moderate.c
@@ -26,15 +26,15 @@
26 ** Create a table to represent pending moderation requests, if the
27 ** table does not already exist.
28 */
29 void moderation_table_create(void){
30 db_multi_exec(
31 "CREATE TABLE IF NOT EXISTS %s.modreq(\n"
32 " objid INTEGER PRIMARY KEY,\n" /* Record pending approval */
33 " attachRid INT,\n" /* Object attached */
34 " tktid TEXT\n" /* Associated ticket id */
35 ");\n", db_name("repository")
36 );
37 }
38
39 /*
40 ** Return TRUE if the modreq table exists
41

Keyboard Shortcuts

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