migrate

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Overview

Package migrate provides migration logic for both sqlite and legacy JSON-based notes used until v0.4.x releases

Index

Constants

View Source
const (
	// LocalMode is a local migration mode
	LocalMode = iota
	// RemoteMode is a remote migration mode
	RemoteMode
)

Variables

View Source
var LocalSequence = []migration{
	lm1,
	lm2,
	lm3,
	lm4,
	lm5,
	lm6,
	lm7,
	lm8,
	lm9,
}

LocalSequence is a list of local migrations to be run

View Source
var RemoteSequence = []migration{
	rm1,
}

RemoteSequence is a list of remote migrations to be run

Functions

func Legacy added in v0.4.5

func Legacy(ctx infra.DnoteCtx) error

Legacy performs migration on JSON-based dnote if necessary

func Run added in v0.4.5

func Run(ctx infra.DnoteCtx, migrations []migration, mode int) error

Run performs unrun migrations

Types

This section is empty.

Jump to

Keyboard shortcuts

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