MCPcopy Create free account
hub / github.com/cloudwan/gohan / getCreateInitialMigrationSubcommand

Function getCreateInitialMigrationSubcommand

cli/cli.go:454–469  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

452}
453
454func getCreateInitialMigrationSubcommand() cli.Command {
455 return cli.Command{
456 Name: "initial",
457 ShortName: "init",
458 Usage: "Generate initial goose migration script from schema",
459 Description: `Generates initial goose migraion script from schema`,
460 Flags: []cli.Flag{
461 cli.StringFlag{Name: "name, n", Value: "init_schema", Usage: "name of migrate"},
462 cli.StringFlag{Name: "schema, s", Value: "", Usage: "Schema definition"},
463 cli.StringFlag{Name: "config-file, c", Value: defaultConfigFile, Usage: "Config file"},
464 cli.StringFlag{Name: "path, p", Value: "etc/db/migrations", Usage: "Migrate path"},
465 cli.BoolFlag{Name: "cascade", Usage: "If true, FOREIGN KEYS in database will be created with ON DELETE CASCADE"},
466 },
467 Action: actionMigrateCreateInitialMigration(),
468 }
469}
470
471func getConverterCommand() cli.Command {
472 return cli.Command{

Callers 1

getMigrateCommandFunction · 0.85

Tested by

no test coverage detected