Documentation ¶
Overview ¶
Package schema provides sql schema migrations for sqlq.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmbeddedMigration ¶
type EmbeddedMigration struct {
// contains filtered or unexported fields
}
func (*EmbeddedMigration) Name ¶
func (e *EmbeddedMigration) Name() string
func (*EmbeddedMigration) Version ¶
func (e *EmbeddedMigration) Version() (v int)
type EmbeddedMigrations ¶
type EmbeddedMigrations []*EmbeddedMigration
func ReadMigrations ¶
func ReadMigrations(root embed.FS) EmbeddedMigrations
func (EmbeddedMigrations) Len ¶
func (e EmbeddedMigrations) Len() int
func (EmbeddedMigrations) Less ¶
func (e EmbeddedMigrations) Less(i, j int) bool
func (EmbeddedMigrations) Swap ¶
func (e EmbeddedMigrations) Swap(i, j int)
type Migration ¶
type Migration interface { // Name returns the user-friendly name of the migration. Name() string // Version returns an incremental version number for this migration Version() int // Apply applies the given migration to the provided connection Apply(*sql.Tx) error }
Migration represents a single sql migration, that can apply any combination of DDL + DML to alter the database.
Click to show internal directories.
Click to hide internal directories.