Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migration struct {
// contains filtered or unexported fields
}
func New ¶
New return new Migration object.
source must contains exactly one directory, and that directory must contains only *.sql file. each sql file must have lowercase name.
the migration is sorted by sql file name.
func (*Migration) Check ¶
Check the current state of the database.
will return list of migration that need to be executed.
also will return *MismatchHashError error if the database already execute a migration file but it has different hash with source.
type MismatchHashError ¶
func (*MismatchHashError) Error ¶
func (d *MismatchHashError) Error() string
Click to show internal directories.
Click to hide internal directories.