Documentation
¶
Index ¶
- type MigrationOpts
- type MigrationOptsCH
- type MigrationOptsPG
- type Migrator
- func (m *Migrator) Close(ctx context.Context) (error, error)
- func (m *Migrator) Down(ctx context.Context, n int) (int, int, error)
- func (m *Migrator) Force(ctx context.Context, version int) error
- func (m *Migrator) Up(ctx context.Context, n int) (int, int, error)
- func (m *Migrator) Version(ctx context.Context) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationOpts ¶
type MigrationOpts struct { PG MigrationOptsPG CH MigrationOptsCH }
type MigrationOptsCH ¶
type MigrationOptsPG ¶
type MigrationOptsPG struct {
URL string
}
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts MigrationOpts) (*Migrator, error)
func (*Migrator) Down ¶
Down migrates the database down by n migrations. It returns the updated version, the number of migrations rolled back, and an error.
Click to show internal directories.
Click to hide internal directories.