Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column[T any] struct { // contains filtered or unexported fields }
Column represents the configuration of a column in a table.
type Dialect ¶
type Dialect struct {
// contains filtered or unexported fields
}
Dialect represents an SQL dialect. Dialects are comparable, and the instances of this struct returned by the various functions in this package are guaranteed to always be equal to the result of another call to the same function.
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index represents the configuration of an index in a table.
type M ¶
type M struct {
// contains filtered or unexported fields
}
M is a type passed to Migrate functions to configure the migration.
func (*M) CreateTable ¶
CreateTable creates a new table using a configuration determined by f.
func (*M) Require ¶
Require marks other migrations as being dependencies of this one. In other words, the named migrations should be applied before this one is.
Calling this function more than once is equivalent to calling it once with all of the same arguments.
The provided migration names should be the name of the migration function minus the "Migrate" prefix. For example,
func MigrateFirst(m *migrate.M) {} func MigrateSecond(m *migrate.M) { // MigrateSecond depends on MigrateFirst. m.Require("First") }
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
Migration represents a migration plan generated by the Migrate functions.
func Plan ¶
func Plan(funcs map[string]MigrationFunc) (*Migration, error)
Plan produces a migration plan for a given set of migration functions. It is intended for internal use.
type MigrationFunc ¶
type MigrationFunc func(m *M)
MigrationFunc is the signature matched by functions that define migrations.