Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Cleaned up previous reportfmt commit to separate the schema from the data. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
f2b6459ef1da09618262b7757d19aeb5 |
| User & Date: | stephan 2013-04-30 18:37:04.281 |
Context
|
2013-05-01
| ||
| 09:42 | Add -v|--verbose as alternative to "-l|--detail" everywhere. And "v=" and "verbose=" as alternative to the "detail=" URL parameter. check-in: 5214a2a8b8 user: jan.nijtmans tags: trunk | |
|
2013-04-30
| ||
| 18:37 | Cleaned up previous reportfmt commit to separate the schema from the data. check-in: f2b6459ef1 user: stephan tags: trunk | |
| 18:18 | Replaced a DELETE with a DROP to avoid having to change the reportfmt default schema. check-in: de119db79f user: stephan tags: trunk | |
Changes
Changes to src/configure.c.
| ︙ | ︙ | |||
928 929 930 931 932 933 934 |
db_multi_exec("DELETE FROM user");
db_create_default_users(0, 0);
}else if( fossil_strcmp(zName,"@concealed")==0 ){
db_multi_exec("DELETE FROM concealed");
}else if( fossil_strcmp(zName,"@shun")==0 ){
db_multi_exec("DELETE FROM shun");
}else if( fossil_strcmp(zName,"@reportfmt")==0 ){
| | | | 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
db_multi_exec("DELETE FROM user");
db_create_default_users(0, 0);
}else if( fossil_strcmp(zName,"@concealed")==0 ){
db_multi_exec("DELETE FROM concealed");
}else if( fossil_strcmp(zName,"@shun")==0 ){
db_multi_exec("DELETE FROM shun");
}else if( fossil_strcmp(zName,"@reportfmt")==0 ){
db_multi_exec("DELETE FROM reportfmt");
db_multi_exec(zRepositorySchemaDefaultReports);
}
}
db_end_transaction(0);
fossil_print("Configuration reset to factory defaults.\n");
fossil_print("To recover, use: %s %s import %s\n",
g.argv[0], g.argv[1], zBackup);
}else
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
1225 1226 1227 1228 1229 1230 1231 |
** are not set by this routine and must be set separately in order
** to make the new file a valid database.
*/
void db_create_repository(const char *zFilename){
db_init_database(
zFilename,
zRepositorySchema1,
| | | 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 |
** are not set by this routine and must be set separately in order
** to make the new file a valid database.
*/
void db_create_repository(const char *zFilename){
db_init_database(
zFilename,
zRepositorySchema1,
zRepositorySchemaDefaultReports,
zRepositorySchema2,
(char*)0
);
db_delete_on_failure(zFilename);
}
/*
|
| ︙ | ︙ |
Changes to src/schema.c.
| ︙ | ︙ | |||
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | @ ); @ @ -- Artifacts that should not be pushed are stored in the "private" @ -- table. Private artifacts are omitted from the "unclustered" and @ -- "unsent" tables. @ -- @ CREATE TABLE private(rid INTEGER PRIMARY KEY); @ @ -- Some ticket content (such as the originators email address or contact @ -- information) needs to be obscured to protect privacy. This is achieved @ -- by storing an SHA1 hash of the content. For display, the hash is @ -- mapped back into the original text using this table. @ -- @ -- This table contains sensitive information and should not be shared @ -- with unauthorized users. @ -- @ CREATE TABLE concealed( @ hash TEXT PRIMARY KEY, -- The SHA1 hash of content @ mtime DATE, -- Time created. Seconds since 1970 @ content TEXT -- Content intended to be concealed @ ); ; /* | > > > > > > > > > > > > | | | < < < < < < < < < < < | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
@ );
@
@ -- Artifacts that should not be pushed are stored in the "private"
@ -- table. Private artifacts are omitted from the "unclustered" and
@ -- "unsent" tables.
@ --
@ CREATE TABLE private(rid INTEGER PRIMARY KEY);
@
@ -- An entry in this table describes a database query that generates a
@ -- table of tickets.
@ --
@ CREATE TABLE reportfmt(
@ rn INTEGER PRIMARY KEY, -- Report number
@ owner TEXT, -- Owner of this report format (not used)
@ title TEXT UNIQUE, -- Title of this report
@ mtime DATE, -- Last modified. seconds since 1970
@ cols TEXT, -- A color-key specification
@ sqlcode TEXT -- An SQL SELECT statement for this report
@ );
@
@ -- Some ticket content (such as the originators email address or contact
@ -- information) needs to be obscured to protect privacy. This is achieved
@ -- by storing an SHA1 hash of the content. For display, the hash is
@ -- mapped back into the original text using this table.
@ --
@ -- This table contains sensitive information and should not be shared
@ -- with unauthorized users.
@ --
@ CREATE TABLE concealed(
@ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
@ mtime DATE, -- Time created. Seconds since 1970
@ content TEXT -- Content intended to be concealed
@ );
;
/*
** The default reportfmt entry for the schema. This is in an extra
** script so that (configure reset) can install the default report.
*/
const char zRepositorySchemaDefaultReports[] =
@ INSERT INTO reportfmt(title,mtime,cols,sqlcode)
@ VALUES('All Tickets',julianday('1970-01-01'),'#ffffff Key:
@ #f2dcdc Active
@ #e8e8e8 Review
@ #cfe8bd Fixed
@ #bde5d6 Tested
@ #cacae5 Deferred
|
| ︙ | ︙ |