Burdy allows you to choose from multiple databases. At the core, Burdy uses TypeORM as the main database driver. TypeORM allows you to create models with a very simple approach, and ensures consistency through the migrations. TypeORM can be used with wide array of database types.

Out of the box, the following types of databases are supported.

  • MySQL
  • PostgreSQL
  • MariaDB
  • SQLite

Internally, we run E2E tests to ensure consistency and quality across these database types.

Environment Variables

To customize your set-up, you can use the following environment variables:

TYPEORM_CONNECTION = 'mysql' | 'mariadb' | 'postgresql' | 'sqlite'
TYPEORM_DATABASE = <Database Name>
TYPEORM_HOST = <Database Host>
TYPEORM_USERNAME = <Database Username>
TYPEORM_PASSWORD = <Database Password>
TYPEORM_PORT = <Database Port>
TYPEORM_SYNCHRONIZE = true | false - Useful in development, synchronizes changes with the database without the need for migrations.

For a full list of the available environment variables refer to TypeORM documentation.

CLI Commands

At the initialization of the project, we run the following command(s):

burdy db migration:generate -n initial # Generates initial migration
burdy db migration:run # Runs the generated migration

The database CLI is extension (proxy) of TypeORM CLI, which gathers all the registred models through Filter::getModels hook. In other words, you can place your models wherever you'd like and Burdy's engine will find it.

Copyright © Burdy Technologies. All rights reserved.