-
Notifications
You must be signed in to change notification settings - Fork 1
Database
François Poguet edited this page Apr 1, 2021
·
28 revisions
The database uses an automatic update system, allowing it to receive a script to perform the update. The update will be executed when the server is started.
When the number of updates increases, it is a good idea to recreate a database creation script with the new additions.
- Add the new version in the
versions
array in/server/db/database.js
- Add the update SQL script in the
/server/db/updates/
directory, following the naming convention :db_YYYYMMDD_to_YYYYMMDD.sql
- Complete the
structure
object inserver/test/database.test.js
-- YOUR SCRIPT HERE
UPDATE `server_informations`
SET `value` = "YYYY-MM-DD" WHERE `key` = "api_version";
Apothiquiz, by Éros Albérola, Nathanaël Houn, Valentin Perignon & François Poguet