Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Migration MigrationInfo `yaml:"migration"` Database DatabaseInfo `yaml:"database"` }
func (*Config) SetDefault ¶
func (c *Config) SetDefault()
type DatabaseInfo ¶
type DatabaseInfo struct { User string `yaml:"user,omitempty"` Password string `yaml:"password,omitempty"` Name string `yaml:"name,omitempty"` Port string `yaml:"port,omitempty"` SSLMode string `yaml:"sslmode,omitempty"` Host string `yaml:"host,omitempty"` URL string `yaml:"url,omitempty"` }
func (*DatabaseInfo) ConnString ¶
func (d *DatabaseInfo) ConnString() (string, error)
func (*DatabaseInfo) ParseURL ¶
func (d *DatabaseInfo) ParseURL() error
type Definition ¶
type Definition struct { MigrationMetadata UpQuery *sqlf.Query DownQuery *sqlf.Query }
Definition represents the definition of a single migration. It contains what gets executed by the migration operation.
type MigrationInfo ¶
type MigrationLog ¶
type MigrationMetadata ¶
MigrationMetadata represents the metadata of a migration file.
type MigrationOperationType ¶
type MigrationOperationType int
MigrationOperationType represents the type of migration operation.
const ( // UpMigrationOperation represents an upgrade operation. UpMigrationOperation MigrationOperationType = iota // DownMigrationOperation represents a downgrade operation. DownMigrationOperation )
Click to show internal directories.
Click to hide internal directories.