@opensesame/course-authoring-library-simple-evolutionary-database v1.0.6-alpha
Simple Evolutionary Database
Can be used to manage a simple evolutionary database
Concept
An evolutionary database allows a database to evolve over time, and should allow you to recreate the database from scratch at any point in its evolution.
The simple evolutionary database library will allow you to specify credentials to access a PostgreSQL database, create the version table used to track the current version of the database, and run scripts in the specified folder that follows the correct naming pattern against the database. Given the correct access rights, and connection string, the database schema should evolve automatically to the latest state.
Required Configuration Information
For now, the following must be set as environment variables:
CONNECTION_STRING: the connection string that allows the ts-postgres library to connect to the PostgreSQL database and management system SCRIPT_FOLDER: the folder where the scripts are stored that should be run in order (NOTE: files should be named in a specific format: 1-firstscript.sql; 2-secondscript.sql; 3-lastscript.sql, etc.)