mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-10 02:26:23 -07:00
Move database schema updating to gochan-migration
This commit is contained in:
parent
1da4330780
commit
17c28e5ebe
8 changed files with 260 additions and 119 deletions
|
@ -24,7 +24,7 @@ func RunSQLFile(path string, db *gcsql.GCDB) error {
|
|||
sqlArr := strings.Split(sqlStr, ";")
|
||||
|
||||
for _, statement := range sqlArr {
|
||||
statement = strings.Trim(statement, " \n\r\t")
|
||||
statement = strings.TrimSpace(statement)
|
||||
if len(statement) > 0 {
|
||||
if _, err = db.ExecSQL(statement); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue