Documentation
¶
Index ¶
- Constants
- Variables
- func DirName(dirno int, suffix string) string
- func FileNameClear(fileno int, prefix string) string
- func FileNameDown(fileno int, prefix string) string
- func FileNameImport(fileno int, prefix string) string
- func FileNameTest(fileno int, prefix string) string
- func FileNameUp(fileno int, prefix string) string
- type Config
- type FS
- type Import
- func (m Import) Exec(db *sql.DB, sql string, testRun bool) 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, testRun bool) *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, testRun bool) error
- func (m Import) RunImport(db *sql.DB, srcdbname, targetdbname string, testRun bool) error
- func (m Import) RunTest(db *sql.DB, srcdbname, targetdbname string, testRun bool) error
- func (m *Import) Scan(fsys FS, mt path.Relative) (err error)
- type Migration
- func (m Migration) Exec(db *sql.DB, sql string, testRun bool) 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, testRun bool) *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, testRun bool) error
- func (m Migration) RunTest(db *sql.DB, dbname string, testRun bool) error
- func (m Migration) RunUp(db *sql.DB, dbname string, testRun bool) error
- func (m *Migration) Scan(fsys FS, mt path.Relative) (err error)
- type MigrationManager
- func (mm *MigrationManager) AddImport(fsys fs.FS, dir_prefix string, prefix string) error
- func (mm *MigrationManager) AddStructure(fsys fs.FS, dir_prefix string, prefix string) error
- func (mm *MigrationManager) AddTest(fsys fs.FS, dir_prefix string, prefix string) error
- func (mm *MigrationManager) Down(targetDir int, targetFile int, verbose bool, testRun bool) error
- func (mm *MigrationManager) Import(verbose bool, testRun bool) error
- func (mm *MigrationManager) InitDir(fsys fs.FS, logger io.Writer) error
- func (mm *MigrationManager) Rebuild(verbose bool, testRun bool) error
- func (mm *MigrationManager) Run(verbose bool, testRun bool) error
- func (mm *MigrationManager) Test(verbose bool) error
- func (mm *MigrationManager) Up(verbose bool, testRun bool) error
- type Tester
- func (m Tester) Exec(db *sql.DB, sql string, testRun bool) 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, testRun bool) *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)
Constants ¶
View Source
const ( PlaceholderSchema = "[schema]" PlaceholderSrcSchema = "[src_schema]" PlaceholderTargetSchema = "[target_schema]" )
View Source
const MULTI_SQL_SPLITPOINT = "---next"
Variables ¶
Functions ¶
func FileNameClear ¶ added in v0.1.10
func FileNameDown ¶ added in v0.1.10
func FileNameImport ¶ added in v0.1.10
func FileNameTest ¶ added in v0.1.10
func FileNameUp ¶ added in v0.1.10
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) AddStructure ¶
func (*MigrationManager) Import ¶
func (mm *MigrationManager) Import(verbose bool, testRun bool) error
func (*MigrationManager) Rebuild ¶
func (mm *MigrationManager) Rebuild(verbose bool, testRun bool) error
func (*MigrationManager) Test ¶
func (mm *MigrationManager) Test(verbose bool) error
Click to show internal directories.
Click to hide internal directories.