Documentation
¶
Overview ¶
Package migrations reads the migration files of an application and the rows that drel already applied. The CLI prints them, and the boot check of the root package proves that none is pending. See the SDD, S14 and DX-8.
Index ¶
Constants ¶
const TrackingTable = "drel_migrations"
TrackingTable is the table that drel writes when it applies a migration.
Variables ¶
This section is empty.
Functions ¶
func Applied ¶
Applied returns the time of each applied migration, keyed by version. A database with no tracking table holds none.
func Unpack ¶ added in v0.2.0
Unpack writes the migrations of an embedded file system into a temporary directory and returns it with the function that removes it.
drel applies migrations from a directory, so an application that carries its migrations in its binary writes them out for the moment of the boot. One artifact therefore holds the server, the front end and the schema.
Types ¶
type Migration ¶
type Migration struct {
// Version is the fourteen digit version of the file name.
Version string
// Name is the part of the file name after the version.
Name string
}
Migration is one file pair of the migrations directory.
func PendingFS ¶ added in v0.2.0
PendingFS returns the migrations of the embedded sets that the database does not hold.