aiondemand / AIOD-rest-api

A containerized application using FastAPI and SQLAlchemy connected to a MySQL database.
MIT License
10 stars 7 forks source link

Fix/rebuild db #322

Open PGijsbers opened 2 months ago

PGijsbers commented 2 months ago

The rebuild-db option "no" would still create the database if it did not exist yet. However, when using MySQL group replication the databases for the secondary nodes need to be created by MySQL's replication process, not the REST API. This PR makes it so that setting rebuild-db to "no" does not affect the database in any way. If this is set and the database does not exist, you will get a warning (as this is only for users using group replication, in all other cases it will lead to errors on every interaction).