migrate

package
v0.0.0-...-042b7a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StartCmd = &cobra.Command{
	Use:          "migrate",
	Short:        "Migrate database",
	SilenceUsage: true,
	PreRun: func(cmd *cobra.Command, args []string) {
		lib.SetConfigPath(configFile)
	},
	Run: func(cmd *cobra.Command, args []string) {
		config := lib.NewConfig()
		database := lib.NewDatabase(config)
		migrate := lib.NewMigration(config)

		if err := migrate.Migrate(executeAs, filename, database); err != nil {
			log.Fatalf("Error to migrate: %v", err)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL