Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- type FS
- type Import
- func (m Import) Exec(db *sql.DB, sql string) error
- func (m Import) Path(rootDir path.Relative, suffix string) path.Relative
- func (m Import) PathClear() path.Relative
- func (m Import) PathImport() path.Relative
- func (m Import) PathTest() path.Relative
- func (m Import) QueryRow(db *sql.DB, sql string) *sql.Row
- func (m Import) ReadSQL(fsys FS, rootDir path.Relative, target *string, suffix string) error
- func (m Import) RunClear(db *sql.DB, srcdbname, targetdbname string) error
- func (m Import) RunImport(db *sql.DB, srcdbname, targetdbname string) error
- func (m Import) RunTest(db *sql.DB, srcdbname, targetdbname string) error
- func (m *Import) Scan(fsys FS, mt path.Relative) (err error)
- type Imports
- type Migration
- func (m Migration) Exec(db *sql.DB, sql string) error
- func (m Migration) Path(rootDir path.Relative, suffix string) path.Relative
- func (m Migration) PathDown() path.Relative
- func (m Migration) PathTest() path.Relative
- func (m Migration) PathUp() path.Relative
- func (m Migration) QueryRow(db *sql.DB, sql string) *sql.Row
- func (m Migration) ReadSQL(fsys FS, rootDir path.Relative, target *string, suffix string) error
- func (m Migration) RunDown(db *sql.DB, dbname string) error
- func (m Migration) RunTest(db *sql.DB, dbname string) error
- func (m Migration) RunUp(db *sql.DB, dbname string) error
- func (m *Migration) Scan(fsys FS, mt path.Relative) (err error)
- type MigrationManager
- func (mm *MigrationManager) AddImport() error
- func (mm *MigrationManager) AddStructure() error
- func (mm *MigrationManager) AddTest() error
- func (mm *MigrationManager) Down(verbose bool) error
- func (mm *MigrationManager) Import(verbose bool) error
- func (mm *MigrationManager) InitDir(logger io.Writer) error
- func (mm *MigrationManager) PrepareImport(verbose bool) error
- func (mm *MigrationManager) Rebuild(verbose bool) error
- func (mm *MigrationManager) Run(verbose bool) error
- func (mm *MigrationManager) Test(verbose bool) error
- func (mm *MigrationManager) Up(verbose bool) error
- type Migrations
- type Tester
- func (m Tester) Exec(db *sql.DB, sql string) error
- func (m Tester) Path(rootDir path.Relative, suffix string) path.Relative
- func (m Tester) PathSrc() path.Relative
- func (m Tester) PathTarget() path.Relative
- func (m Tester) QueryRow(db *sql.DB, sql string) *sql.Row
- func (m Tester) ReadSQL(fsys FS, rootDir path.Relative, target *string, suffix string) error
- func (m Tester) Run(db *sql.DB, srcDB, targetDB string) error
- func (m Tester) RunSrc(db *sql.DB, dbname string) (string, error)
- func (m Tester) RunTarget(db *sql.DB, dbname string) (string, error)
- func (m *Tester) Scan(fsys FS, mt path.Relative) (err error)
- type Testers
Constants ¶
View Source
const ( PlaceholderSchema = "[schema]" PlaceholderSrcSchema = "[src_schema]" PlaceholderTargetSchema = "[target_schema]" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Import ¶
type Import struct {
ImportSQL string
TestSQL string
ClearSQL string
// contains filtered or unexported fields
}
func (Import) PathImport ¶
type Migration ¶
type Migration struct {
UpSQL string
DownSQL string
TestSQL string
// contains filtered or unexported fields
}
type MigrationManager ¶
type MigrationManager struct {
Config
// contains filtered or unexported fields
}
func (*MigrationManager) AddImport ¶
func (mm *MigrationManager) AddImport() error
func (*MigrationManager) AddStructure ¶
func (mm *MigrationManager) AddStructure() error
func (*MigrationManager) AddTest ¶
func (mm *MigrationManager) AddTest() error
func (*MigrationManager) Down ¶
func (mm *MigrationManager) Down(verbose bool) error
func (*MigrationManager) Import ¶
func (mm *MigrationManager) Import(verbose bool) error
func (*MigrationManager) PrepareImport ¶
func (mm *MigrationManager) PrepareImport(verbose bool) error
func (*MigrationManager) Rebuild ¶
func (mm *MigrationManager) Rebuild(verbose bool) error
func (*MigrationManager) Run ¶
func (mm *MigrationManager) Run(verbose bool) error
func (*MigrationManager) Test ¶
func (mm *MigrationManager) Test(verbose bool) error
func (*MigrationManager) Up ¶
func (mm *MigrationManager) Up(verbose bool) error
type Migrations ¶
type Migrations []Migration
func (Migrations) CheckForDuplicates ¶
func (m Migrations) CheckForDuplicates() error
func (Migrations) Len ¶
func (m Migrations) Len() int
func (Migrations) Less ¶
func (m Migrations) Less(a, b int) bool
func (Migrations) Swap ¶
func (m Migrations) Swap(a, b int)
Click to show internal directories.
Click to hide internal directories.