Fossil SCM

Improved comment on the automatic MLINK column adding that is done in db_open_repository().

drh 2015-01-26 14:44 UTC mlink-improvements
Commit c33c574e43e384f9b3dfd3f29a7d1ee9aac3af13
1 file changed +6
+6
--- src/db.c
+++ src/db.c
@@ -1176,10 +1176,16 @@
11761176
db_open_or_attach(g.zRepositoryName, "repository", 0);
11771177
g.repositoryOpen = 1;
11781178
/* Cache "allow-symlinks" option, because we'll need it on every stat call */
11791179
g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
11801180
g.zAuxSchema = db_get("aux-schema","");
1181
+
1182
+ /* Verify that the MLINK table has the newer columns added by the
1183
+ ** 2015-01-24 schema change. Create them if necessary. This code
1184
+ ** can be removed in the future, once all users have upgraded to the
1185
+ ** 2015-01-24 schema.
1186
+ */
11811187
if( !db_table_has_column("repository","mlink","isaux") ){
11821188
db_begin_transaction();
11831189
db_multi_exec(
11841190
"ALTER TABLE %s.mlink ADD COLUMN pmid INTEGER DEFAULT 0;"
11851191
"ALTER TABLE %s.mlink ADD COLUMN isaux INTEGER DEFAULT 0;",
11861192
--- src/db.c
+++ src/db.c
@@ -1176,10 +1176,16 @@
1176 db_open_or_attach(g.zRepositoryName, "repository", 0);
1177 g.repositoryOpen = 1;
1178 /* Cache "allow-symlinks" option, because we'll need it on every stat call */
1179 g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
1180 g.zAuxSchema = db_get("aux-schema","");
 
 
 
 
 
 
1181 if( !db_table_has_column("repository","mlink","isaux") ){
1182 db_begin_transaction();
1183 db_multi_exec(
1184 "ALTER TABLE %s.mlink ADD COLUMN pmid INTEGER DEFAULT 0;"
1185 "ALTER TABLE %s.mlink ADD COLUMN isaux INTEGER DEFAULT 0;",
1186
--- src/db.c
+++ src/db.c
@@ -1176,10 +1176,16 @@
1176 db_open_or_attach(g.zRepositoryName, "repository", 0);
1177 g.repositoryOpen = 1;
1178 /* Cache "allow-symlinks" option, because we'll need it on every stat call */
1179 g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
1180 g.zAuxSchema = db_get("aux-schema","");
1181
1182 /* Verify that the MLINK table has the newer columns added by the
1183 ** 2015-01-24 schema change. Create them if necessary. This code
1184 ** can be removed in the future, once all users have upgraded to the
1185 ** 2015-01-24 schema.
1186 */
1187 if( !db_table_has_column("repository","mlink","isaux") ){
1188 db_begin_transaction();
1189 db_multi_exec(
1190 "ALTER TABLE %s.mlink ADD COLUMN pmid INTEGER DEFAULT 0;"
1191 "ALTER TABLE %s.mlink ADD COLUMN isaux INTEGER DEFAULT 0;",
1192

Keyboard Shortcuts

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