Fossil SCM
Improved comment on the automatic MLINK column adding that is done in db_open_repository().
Commit
c33c574e43e384f9b3dfd3f29a7d1ee9aac3af13
Parent
3bb88739409958b…
1 file changed
+6
M
src/db.c
+6
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1176,10 +1176,16 @@ | ||
| 1176 | 1176 | db_open_or_attach(g.zRepositoryName, "repository", 0); |
| 1177 | 1177 | g.repositoryOpen = 1; |
| 1178 | 1178 | /* Cache "allow-symlinks" option, because we'll need it on every stat call */ |
| 1179 | 1179 | g.allowSymlinks = db_get_boolean("allow-symlinks", 0); |
| 1180 | 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 | + */ | |
| 1181 | 1187 | if( !db_table_has_column("repository","mlink","isaux") ){ |
| 1182 | 1188 | db_begin_transaction(); |
| 1183 | 1189 | db_multi_exec( |
| 1184 | 1190 | "ALTER TABLE %s.mlink ADD COLUMN pmid INTEGER DEFAULT 0;" |
| 1185 | 1191 | "ALTER TABLE %s.mlink ADD COLUMN isaux INTEGER DEFAULT 0;", |
| 1186 | 1192 |
| --- 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 |