Skip to main content

PostgreSQL

Setup

  1. Install, configure, and start PostgreSQL:

  2. Create a new database for AutoKitteh:

    • CLI
      createdb -e <DB NAME>
    • SQL
      CREATE DATABASE <DB NAME>;
  3. Configure AutoKitteh to use it:

    (Temporary)
    ak up --config db.type=postgres --config db.dsn="dbname=<DB NAME>"

    Or:

    (Persistent, next time you run 'ak up')
    ak config set db.type postgres
    ak config set db.dsn "dbname=<DB NAME>"
tip

The Data Source Name (DSN) is a string with one or more key=value pairs with space(s) between them.

All the recognized parameter keys are listed here.

Reset

If you want to reset all the data in the database:

CLI
dropdb -efi <DB NAME>
createdb -e <DB NAME>

Or:

SQL
DROP DATABASE <DB NAME>;
CREATE DATABASE <DB NAME>;