migrations

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Up000   = `CREATE TABLE IF NOT EXISTS migrations (name VARCHAR(255) PRIMARY KEY, time DATETIME) WITHOUT ROWID;`
	Down000 = `DROP TABLE migrations;`
)
View Source
const (
	Up001   = `CREATE TABLE IF NOT EXISTS code (code TEXT PRIMARY KEY, user TEXT) WITHOUT ROWID;`
	Down001 = `DROP TABLE code`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

type Migration struct {
	Name string
	Up   string
	Down string
}

type Migrator

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

func NewMigrator

func NewMigrator(db *gorqlite.Connection) (*Migrator, error)

func (*Migrator) Migrate

func (m *Migrator) Migrate() error

Jump to

Keyboard shortcuts

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