MCPcopy Index your code
hub / github.com/TruthHun/BookStack / MigrationDatabase

Interface MigrationDatabase

commands/migrate/migrate.go:32–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30)
31
32type MigrationDatabase interface {
33 //获取当前的版本
34 Version() int64
35 //校验当前是否可更新
36 ValidUpdate(version int64) error
37 //校验并备份表结构
38 ValidForBackupTableSchema() error
39 //校验并更新表结构
40 ValidForUpdateTableSchema() error
41 //恢复旧数据
42 MigrationOldTableData() error
43 //插入新数据
44 MigrationNewTableData() error
45 //增加迁移记录
46 AddMigrationRecord(version int64) error
47 //最后的清理工作
48 MigrationCleanup() error
49 //回滚本次迁移
50 RollbackMigration() error
51}
52
53type migrationCache struct {
54 items *list.List

Callers 9

RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65
RunMigrationFunction · 0.65

Implementers 1

MigrationVersion03commands/migrate/migrate_v03.go

Calls

no outgoing calls

Tested by

no test coverage detected