1 | #ifndef __SCHEMA_MIGRATION__␊ |
2 | #define __SCHEMA_MIGRATION__␊ |
3 | ␊ |
4 | // copyright (C) 2002, 2003 graydon hoare <graydon@pobox.com>␊ |
5 | // all rights reserved.␊ |
6 | // licensed to the public under the terms of the GNU GPL (>= 2)␊ |
7 | // see the file COPYING for details␊ |
8 | ␊ |
9 | #include <string>␊ |
10 | #include <vector>␊ |
11 | ␊ |
12 | // this file knows how to migrate schema databases. the general strategy is␊ |
13 | // to hash each schema we ever use, and make a list of the SQL commands␊ |
14 | // required to get from one hash value to the next. when you do a␊ |
15 | // migration, the migrator locates your current db's state on the list and␊ |
16 | // then runs all the migration functions between that point and the target␊ |
17 | // of the migration.␊ |
18 | ␊ |
19 | struct sqlite;␊ |
20 | ␊ |
21 | void calculate_schema_id(sqlite *sql, std::string & id);␊ |
22 | void migrate_depot_schema(sqlite *sql);␊ |
23 | void migrate_monotone_schema(sqlite *sql);␊ |
24 | ␊ |
25 | #endif // __SCHEMA_MIGRATION__␊ |