系统安装.
()
| 15 | |
| 16 | //系统安装. |
| 17 | func Install() { |
| 18 | |
| 19 | fmt.Println("Initializing...") |
| 20 | |
| 21 | err := orm.RunSyncdb("default", false, true) |
| 22 | if err == nil { |
| 23 | initialization() |
| 24 | } else { |
| 25 | panic(err.Error()) |
| 26 | os.Exit(1) |
| 27 | } |
| 28 | initSeo() |
| 29 | resetCategoryUniqueIndex() |
| 30 | migrateEbook() |
| 31 | fmt.Println("Install Successfully!") |
| 32 | os.Exit(0) |
| 33 | } |
| 34 | |
| 35 | // 删除分类中的title的唯一索引(兼容旧版本) |
| 36 | func resetCategoryUniqueIndex() { |
no test coverage detected