Skip to content
Oxford Harrison edited this page Nov 9, 2024 · 20 revisions

The Linked QL CLI is a beautiful little utility that comes with your Linked QL installation. It gives you a seamless command-line interface over some of Linked QL's most powerful features: Automatic Schema Savepoints and Rollbacks and Diff-Based Migrations!

The command name is linkedql abd its assiciated commands are:

Some commands have been renamed from earlier versions of Linked QL (< 0.2.x):

  • linkedql migrate -> linkedql commit
  • linkedql state -> linkedql savepoints

Flags have changed significantly. You're are encouraged to migrate to Linked QL 0.2.

Usage

The linkedql command operates at the scope of your Linked QL installation, and so, for non-global installation of Linked QL, you'll need the npx prefix to run. E.g.

npx linkedql commit

If you have chosen a different location for your "database" directory (where you have your schema.json and driver.js files defined) other than the default ./database location, you can use the --dir flag along with each command to point Linked QL to this location:

npx linkedql commit --dir="./src/database-stuff"

(Relative paths will resolve against your current working directory (CWD).)

To turn off prompts and get Linked QL to take a predefined sensible-default action, use the flag --yes:

npx linkedql commit --yes
Clone this wiki locally