mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-12 18:46:24 -07:00
Started work on migration script for old database
This commit is contained in:
parent
f0c1fbba94
commit
c84b27d7ce
4 changed files with 86 additions and 4 deletions
|
@ -69,8 +69,11 @@ func initDB(initFile string) *gcutil.GcError {
|
|||
return gcutil.NewError(fmt.Sprintf(
|
||||
"SQL database initialization file (%s) missing. Please reinstall gochan", initFile), false)
|
||||
}
|
||||
return runSQLFile(filePath)
|
||||
}
|
||||
|
||||
sqlBytes, err := ioutil.ReadFile(filePath)
|
||||
func runSQLFile(path string) *gcutil.GcError {
|
||||
sqlBytes, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return gcutil.FromError(err, false)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue