Knex utilities to interact with Postgres database.
Usage: cli [options] [command]
Options:
-V, --version output the version number
--docker Use docker.
--docker-service [service] Docker service name, default: "postgres".
--knexfile [path] Specify the knexfile path.
--cwd [path] Specify the working directory.
--env [name] environment, default: process.env.NODE_ENV || development
-h, --help output usage information
Commands:
create Create database.
drop Drop database.
dump Dump database.
load Load database.
check-structure Check structure.
truncate Truncate all tables.
import knex from 'knex' import { truncate } from 'knex-scripts' import config from './knexfile' // Truncate all database truncate({ getKnex: () => knex(config) }) .then(() => console.log('Truncated')) .catch(console.error)
// knexfile.js const config = { knexScripts: { docker: false, structurePath: 'db/structure.sql', }, development: { client: 'postgresql', connection: { user: 'postgres', database: 'development', timezone: 'utc', }, }, } module.exports = config
MIT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4