database

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStartupBackup

func CreateStartupBackup(db *sql.DB, dbPath string)

CreateStartupBackup creates an automatic backup before migrations run. It reads the backup_auto_on_startup setting directly via raw SQL to avoid service layer dependencies. Skips silently on fresh databases (no settings table).

func DefaultDBPath

func DefaultDBPath() (string, error)

DefaultDBPath returns the default database path (~/.daedalus/daedalus.db).

func Open

func Open(path string) (*sql.DB, error)

Open opens or creates a SQLite database at the given path. It configures WAL mode, foreign keys, and busy timeout.

func RunMigrations

func RunMigrations(db *sql.DB) error

RunMigrations applies the embedded schema to the database.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL