This repo contains scripts for managing (creating, dropping and filling) the main TTS testing database.
- Make sure you have your virtual environment set up properly
python3 -m venv .venv
source .venv/bin/activate
- Make sure all requirements are installed
pip install -r requirements.txt
- Create .env file
cp .env.example .env
- update .env file with your credentials
The database is equipped with the following scripts, located in the script
folder:
create.py
: creates the database and fills it with testing data-s
flag skips the insert phase
drop.py
: drops the entire databaseinsert.py
: clears and re-inserts testing data into the database-s
flag skips the clear phase
- If you want to make changes, please test them in the development database
- To do so, simply change the
DB_NAME
in the.env
file to the dev database name
- To do so, simply change the
Run these scripts with a command such as python3 script/create.py
.
The database diagram can be found here: full, readonly.
When the diagram is updated, just export it into MySql and copy the contents into manage/create.sql
and update the inserting scripts to go with your changes.
This graphs shows what table is required in witch table.
By traversing the graph from source to most distant node, we can determine the order in which the tables should be inserted. Dashed lines represents a split creation due to cyclic dependencies.