mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-09 07:05:08 +02:00
Create func to automatically create DB indexes rather than just documenting them in a comment that has to be manually executed
This commit is contained in:
@ -95,6 +95,10 @@ func OpenDB() (*database.DB, error) {
|
||||
return nil, fmt.Errorf("failed to create underlying DB tables: %w", err)
|
||||
}
|
||||
}
|
||||
err := db.CreateIndices()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return db, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user