Versions in this module Expand all Collapse all v0 v0.1.0 Jan 3, 2022 Changes in this version + func CreateMigrationTable(db *sqlx.DB, query string) (string, error) + func HasMigrationTable(db *sqlx.DB, query string) (bool, error) + func InsertRecord(tx *sqlx.Tx, query string, args ...interface{}) error + func QueryPrevious(db *sqlx.DB, query string) (map[string]string, error) + func RepairHashes(tx *sqlx.Tx, query string, hashes map[string]string) error + type Backend interface + CreateMigrationTable func() (string, error) + HasMigrationTable func() (bool, error) + InsertRecord func(tx *sqlx.Tx, name string, hash string, comment string) error + QueryPrevious func() (map[string]string, error) + RepairHashes func(tx *sqlx.Tx, hashes map[string]string) error + Setup func(db *sqlx.DB, table string, tableSchema string) + type MigrationRecord struct + Comment string + Date time.Time + Hash string + ID int + Name string + type MySQL struct + func (m *MySQL) CreateMigrationTable() (string, error) + func (m *MySQL) HasMigrationTable() (bool, error) + func (m *MySQL) InsertRecord(tx *sqlx.Tx, name string, hash string, comment string) error + func (m *MySQL) QueryPrevious() (map[string]string, error) + func (m *MySQL) RepairHashes(tx *sqlx.Tx, hashes map[string]string) error + func (m *MySQL) Setup(db *sqlx.DB, table string, tableSchema string) + type Postgres struct + func (p *Postgres) CreateMigrationTable() (string, error) + func (p *Postgres) HasMigrationTable() (bool, error) + func (p *Postgres) InsertRecord(tx *sqlx.Tx, name string, hash string, comment string) error + func (p *Postgres) QueryPrevious() (map[string]string, error) + func (p *Postgres) RepairHashes(tx *sqlx.Tx, hashes map[string]string) error + func (p *Postgres) Setup(db *sqlx.DB, table string, tableSchema string) + type SQLite struct + func (s *SQLite) CreateMigrationTable() (string, error) + func (s *SQLite) HasMigrationTable() (bool, error) + func (s *SQLite) InsertRecord(tx *sqlx.Tx, name string, hash string, comment string) error + func (s *SQLite) QueryPrevious() (map[string]string, error) + func (s *SQLite) RepairHashes(tx *sqlx.Tx, hashes map[string]string) error + func (s *SQLite) Setup(db *sqlx.DB, table string, tableSchema string)