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 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(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(targetVersion int, verbose bool) error
- func (mm *MigrationManager) Import(verbose bool) error
- func (mm *MigrationManager) InitDir(fsys fs.FS, logger io.Writer) 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 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)
Constants ¶
View Source
const ( PlaceholderSchema = "[schema]" PlaceholderSrcSchema = "[src_schema]" PlaceholderTargetSchema = "[target_schema]" )
View Source
const MULTI_SQL_SPLITPOINT = "---next"
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) AddStructure ¶
func (*MigrationManager) Down ¶
func (mm *MigrationManager) Down(targetVersion int, verbose bool) error
func (*MigrationManager) Import ¶
func (mm *MigrationManager) Import(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
Click to show internal directories.
Click to hide internal directories.