Database

Current Database Diagram

Software used

We are using PostgreSQL as our Database for persisting data and Sequalize ORM to simplify the interaction with the database in our Typescript project.

Sequalize Migrations & Seeders

These utility files are named and sorted by date when they were created to ensure consistent and deterministic deployment between multiple different computers or installations.

Migrations

Sequalize allows us to easily create migrations located in src/database/migrations folder, which allow us to easily recreate the db on new machines, as well to alter the db in the future consistently between multiple machines or team members.

Seeders

The seeders allow us to pre-fill the data of our tables such as User profiles, Admin profiles, Pallets etc.

Sequalize being in typescript, we can re-use our business logic configuration files and generate table entries dynamically during the setup without repeating our code.

Sequalize

These are the tables that sequalizes internally uses for it's own metadata:

  • sequalize_meta

  • sequalize_seed

Last updated