Files
iris-context/commands/ops/knex.go
T
VERSE 2ef3c90819 feat(commands): more commands (#30)
- I wrote a scripts to copy and generate all commands missing in iris
from fig repo: https://github.com/withfig/autocomplete
- Add a new script to generate commands docs about which commands
currently are inside commands folder
377d4aac663590e504fe39a92eb4dac4cbd333b2
- Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
2026-07-04 22:08:36 +07:00

43 lines
2.3 KiB
Go

package ops
import (
"github.com/versenilvis/iris/commands/core"
)
func init() {
core.Register(&core.Spec{
Name: "knex",
Description: "SQL query builder for JavaScript",
Subcommands: []core.Subcommand{
{Name: "init", Description: "Create a fresh knexfile"},
{Name: "migrate:make", Description: "Create a named migration file"},
{Name: "migrate:latest", Description: "Run all migrations that have not yet been run"},
{Name: "migrate:up", Description: "Run the next or the specified migration that has not yet been run"},
{Name: "migrate:rollback", Description: "Rollback the last batch of migrations performed"},
{Name: "migrate:down", Description: "Undo the last or the specified migration that was already run"},
{Name: "migrate:currentVersion", Description: "View the current version for the migration"},
{Name: "migrate:list|migrate:status", Description: "List all migrations files with status"},
{Name: "migrate:unlock", Description: "Forcibly unlocks the migrations lock table"},
{Name: "seed:make", Description: "Create a named seed file"},
{Name: "seed:run", Description: "Run seed files"},
{Name: "help", Description: "Display help for command"},
},
Options: []core.Option{
{Name: "--version", Description: "Output the version number"},
{Name: "--debug", Description: "Run with debugging"},
{Name: "--knexfile", Description: "Specify the knexfile path"},
{Name: "--knexpath", Description: "Specify the path to knex instance"},
{Name: "--cwd", Description: "Specify the working directory"},
{Name: "--client", Description: "Set DB client without a knexfile"},
{Name: "--connection", Description: "Set DB connection without a knexfile"},
{Name: "--migrations-directory", Description: "Set migrations directory without a knexfile"},
{Name: "--migrations-table-name", Description: "Set migrations table name without a knexfile"},
{Name: "--env", Description: "Environment, default: process.env.NODE_ENV || development"},
{Name: "--esm", Description: "Enable ESM interop"},
{Name: "--specific", Description: "Specify one seed file to execute"},
{Name: "--timestamp-filename-prefix", Description: "Enable a timestamp prefix on name of generated seed files"},
{Name: "--help", Description: "Display help for command"},
},
})
}