migrations

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package migrations embeds SQL migration files into the Go binary. These migrations are used by the application to manage the database schema, ensuring it is always up-to-date.

Index

Constants

This section is empty.

Variables

FS embeds main database SQL migration files.

View Source
var ThumbsFS embed.FS

ThumbsFS embeds thumbnail database SQL migration files.

Functions

func NewMigrator

func NewMigrator(dbPath string) (*migrate.Migrate, error)

NewMigrator creates a new migrator instance from the embedded migration files. It initializes the migration engine using the embedded FS and connects it to the provided database path. dbPath should be the SQLite database file path (e.g., "/tmp/test.db") or ":memory:" for in-memory.

func NewThumbsMigrator added in v0.3.0

func NewThumbsMigrator(dbPath string) (*migrate.Migrate, error)

NewThumbsMigrator creates a migrator for the thumbnail blob database (thumbs.db).

Types

This section is empty.

Jump to

Keyboard shortcuts

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