1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
|
return zDb;
}
/*
** Return TRUE if the schema is out-of-date
*/
int db_schema_is_outofdate(void){
g.zAuxSchema = db_text(0, "SELECT value FROM config WHERE name='aux-schema'");
return strcmp(g.zAuxSchema,AUX_SCHEMA_MIN)<0
|| strcmp(g.zAuxSchema,AUX_SCHEMA_MAX)>0;
}
/*
** Return true if the database is writeable
*/
|
|
|
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
|
return zDb;
}
/*
** Return TRUE if the schema is out-of-date
*/
int db_schema_is_outofdate(void){
if( g.zAuxSchema==0 ) g.zAuxSchema = db_get("aux-schema","");
return strcmp(g.zAuxSchema,AUX_SCHEMA_MIN)<0
|| strcmp(g.zAuxSchema,AUX_SCHEMA_MAX)>0;
}
/*
** Return true if the database is writeable
*/
|
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
|
if( db_schema_is_outofdate() ){
#ifdef FOSSIL_ENABLE_JSON
g.json.resultCode = FSL_JSON_E_DB_NEEDS_REBUILD;
#endif
fossil_warning("incorrect repository schema version: "
"current repository schema version is \"%s\" "
"but need versions between \"%s\" and \"%s\".",
db_get("aux-schema",0), AUX_SCHEMA_MIN, AUX_SCHEMA_MAX);
fossil_fatal("run \"fossil rebuild\" to fix this problem");
}
}
/*
** COMMAND: test-move-repository
|
|
|
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
|
if( db_schema_is_outofdate() ){
#ifdef FOSSIL_ENABLE_JSON
g.json.resultCode = FSL_JSON_E_DB_NEEDS_REBUILD;
#endif
fossil_warning("incorrect repository schema version: "
"current repository schema version is \"%s\" "
"but need versions between \"%s\" and \"%s\".",
g.zAuxSchema, AUX_SCHEMA_MIN, AUX_SCHEMA_MAX);
fossil_fatal("run \"fossil rebuild\" to fix this problem");
}
}
/*
** COMMAND: test-move-repository
|