Documentation
¶
Index ¶
- func NewMigrationLogger(logger2 *zap.Logger) migrate.Logger
- type EmbedDir
- type Revision
- type RevisionReaderWriter
- func (r *RevisionReaderWriter) DeleteRevision(ctx context.Context, version string) error
- func (r *RevisionReaderWriter) Ident() *migrate.TableIdent
- func (r *RevisionReaderWriter) ReadRevision(ctx context.Context, version string) (*migrate.Revision, error)
- func (r *RevisionReaderWriter) ReadRevisions(ctx context.Context) ([]*migrate.Revision, error)
- func (r *RevisionReaderWriter) WriteRevision(ctx context.Context, revision *migrate.Revision) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmbedDir ¶
func NewEmbedDir ¶
type Revision ¶
type Revision struct {
Version pgtype.Text `db:"version"` // Version of the migration.
Description pgtype.Text `db:"description"` // Description of this migration.
Type pgtype.Int8 `db:"type"` // Type of the migration.
Applied pgtype.Int8 `db:"applied"` // Applied amount of statements in the migration.
Total pgtype.Int8 `db:"total"` // Total amount of statements in the migration.
ExecutedAt pgtype.Timestamptz `db:"executed_at"` // ExecutedAt is the starting point of execution.
ExecutionTime pgtype.Int8 `db:"execution_time"` // ExecutionTime of the migration.
Error pgtype.Text `db:"error"` // Error of the migration, if any occurred.
ErrorStmt pgtype.Text `db:"error_stmt"` // ErrorStmt is the statement that raised Error.
Hash pgtype.Text `db:"hash"` // Hash of migration file.
PartialHashes pgtype.Array[string] `db:"partial_hashes"` // PartialHashes is the hashes of applied statements.
OperatorVersion pgtype.Text `db:"operator_version"` // OperatorVersion that executed this migration.
}
func (*Revision) ToRevision ¶
type RevisionReaderWriter ¶
type RevisionReaderWriter struct {
// contains filtered or unexported fields
}
func NewRevisionReaderWriter ¶
func NewRevisionReaderWriter(exec sqlexec.Executor) (*RevisionReaderWriter, error)
func (*RevisionReaderWriter) DeleteRevision ¶
func (r *RevisionReaderWriter) DeleteRevision(ctx context.Context, version string) error
func (*RevisionReaderWriter) Ident ¶
func (r *RevisionReaderWriter) Ident() *migrate.TableIdent
func (*RevisionReaderWriter) ReadRevision ¶
func (*RevisionReaderWriter) ReadRevisions ¶
func (*RevisionReaderWriter) WriteRevision ¶
Click to show internal directories.
Click to hide internal directories.