id = "knex" name = "Knex.js" description = "SQL query builder CLI for migrations and seeds." homepage = "https://knexjs.org" executables = ["knex"] [commands] format = 1 label = "Knex" description = "Run and create migrations and seeds. Connection-override options are left out; use a knexfile." quality = "ai-draft" base = "fig:knex" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/knex.ts" license = "MIT" [[commands.field]] id = "knexfile" label = "Knexfile" type = "path" option = ["--knexfile"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "env" label = "Environment" type = "string" option = ["--env"] suggestions = [{ value = "development", label = "development" }, { value = "staging", label = "staging" }, { value = "production", label = "production" }] sources = ["fig"] [[commands.field]] id = "cwd" label = "Working directory" type = "path" option = ["--cwd"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.group]] id = "basic" label = "Basic" fields = ["knexfile", "env", "cwd"] [[commands.subcommand]] path = ["migrate:latest"] label = "Run migrations" description = "Run all migrations that have not yet been run." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/knex.ts" license = "MIT" [[commands.subcommand.group]] id = "basic" label = "Basic" fields = [] [[commands.subcommand]] path = ["migrate:rollback"] label = "Roll back migrations" description = "Roll back the last batch of migrations." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/knex.ts" license = "MIT" [[commands.subcommand.group]] id = "basic" label = "Basic" fields = [] [[commands.subcommand]] path = ["migrate:make"] label = "Create migration" description = "Create a named migration file." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/knex.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Migration name" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.task]] id = "make" label = "Create migration" fields = ["name"] required = ["name"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name"] [[commands.subcommand]] path = ["seed:run"] label = "Run seeds" description = "Run seed files." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/knex.ts" license = "MIT" [[commands.subcommand.group]] id = "basic" label = "Basic" fields = []