SQLite: Set 0640 permissions on SQLite database file (#26339)

* SQLite: Set 640 permissions on SQLite database file
This commit is contained in:
Arve Knudsen
2020-07-23 15:47:26 +02:00
committed by GitHub
parent 37aa35ca45
commit 102448040d
2 changed files with 32 additions and 5 deletions
+3 -5
View File
@@ -51,9 +51,8 @@ func (mg *Migrator) GetMigrationLog() (map[string]MigrationLog, error) {
exists, err := mg.x.IsTableExist(new(MigrationLog))
if err != nil {
return nil, err
return nil, errutil.Wrap("failed to check table existence", err)
}
if !exists {
return logMap, nil
}
@@ -73,7 +72,7 @@ func (mg *Migrator) GetMigrationLog() (map[string]MigrationLog, error) {
}
func (mg *Migrator) Start() error {
mg.Logger.Info("Starting DB migration")
mg.Logger.Info("Starting DB migrations")
logMap, err := mg.GetMigrationLog()
if err != nil {
@@ -110,9 +109,8 @@ func (mg *Migrator) Start() error {
_, err = sess.Insert(&record)
return err
})
if err != nil {
return err
return errutil.Wrap("migration failed", err)
}
}