migration

package
v1.0.1-0...-39f75b5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 11 Imported by: 0

README

migration

这里包含所有的数据库升级脚本。

v17 开始只支持 SQLite3。

每次升级,提供一个版本更新函数,递增版本号。 同时记得在 ../data/schemas.sqlite.sql 里面保存最新的完整数据库语句。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(db *sql.DB, path string)

Init ...

func MaxVersionNumber

func MaxVersionNumber() int

MaxVersionNumber ...

func Migrate

func Migrate(gdb *sql.DB)

Migrate ...

Types

type MapStr2Str

type MapStr2Str map[string]string

func (*MapStr2Str) Scan

func (m *MapStr2Str) Scan(value any) error

func (MapStr2Str) Value

func (m MapStr2Str) Value() (driver.Value, error)

type VersionUpdater

type VersionUpdater struct {
	// contains filtered or unexported fields
}

VersionUpdater is

Jump to

Keyboard shortcuts

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