Module svc_storage::postgres::init

source ·
Expand description

Database init helper functions to create a database from scratch with all required tables initialized

Traits

Functions

  • If the database is fresh, we need to create all tables. This function makes sure the tables will be created in the correct order
  • If we want to recreate the database tables created by this module, we will want to drop the existing tables first. This function makes sure the tables will be dropped in the correct order
  • Recreate the database by dropping all tables first (if they exist) and recreating them again