migrations

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package migrations contains database migrations for WriteFreely

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentVer

func CurrentVer() int

CurrentVer returns the current migration version the application is on

func Migrate

func Migrate(db *datastore) error

func NewDatastore

func NewDatastore(db *sql.DB, dn string) *datastore

func SetInitialMigrations

func SetInitialMigrations(db *datastore) error

Types

type Migration

type Migration interface {
	Description() string
	Migrate(db *datastore) error
}

func New

func New(d string, fn func(db *datastore) error) Migration

Jump to

Keyboard shortcuts

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