cmd

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Down = cli.Command{
	Name:   "down",
	Usage:  "Downgrades the database a certain number of migrations or until a certain version.",
	Action: runMigrationAction(downAction),
	Flags:  migrationFlags,
}
View Source
var Generate = cli.Command{
	Name:   "gen",
	Usage:  "Generate kallax models",
	Action: generateAction,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "input",
			Value: ".",
			Usage: "Input package directory",
		},
		cli.StringFlag{
			Name:  "output",
			Value: "kallax.go",
			Usage: "Output file name",
		},
		cli.StringSliceFlag{
			Name:  "exclude, e",
			Usage: "List of excluded files from the package when generating the code for your models. Use this to exclude files in your package that uses the generated code. You can use this flag as many times as you want.",
		},
	},
}
View Source
var Migrate = cli.Command{
	Name:   "migrate",
	Usage:  "Generate migrations for current kallax models",
	Action: migrateAction,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "out, o",
			Usage: "Output directory of migrations",
		},
		cli.StringFlag{
			Name:  "name, n",
			Usage: "Descriptive name for the migration",
			Value: "migration",
		},
		cli.StringSliceFlag{
			Name:  "input, i",
			Usage: "List of directories to scan models from. You can use this flag as many times as you want.",
		},
	},
	Subcommands: cli.Commands{
		Up,
		Down,
	},
}
View Source
var Up = cli.Command{
	Name:   "up",
	Usage:  "Executes the migrations from the current version until the specified version.",
	Action: runMigrationAction(upAction),
	Flags: append(migrationFlags, cli.BoolFlag{
		Name:  "all",
		Usage: "If this flag is used, the database will be migrated all the way up.",
	}),
}

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